Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to deploy files to service.unece.org

Back to: 

Linktoparent

Table of Contents

Table of Contents
exclude^.*service.unece.org|Table of Contents$

This how-to describes process of getting files from your local PC to service.unece.org using Repositories and Pipelines. Should be reffered to typically when a new version of UN/EDIFACT, UN/LOCODE or other deliverable hosted on service.unece.org is produced and needs to be published.


Info
titleTerms
  • Local Repository - Folders and files on your Local PC
  • Remote Repository - Folders and files on remote Server, these files are used by Pipeline
  • Clone - Process of initial copying files from a Remote Repository to your Local Repository
  • Commit - Finalizing a change in files, should contain comment message, describing reason for and nature of the change
  • Push - Process of moving changes from Local Repository to Remote Repository, one Push can contain multiple commits
  • Pipeline - Automated process for moving files between environments (typicaly Remote Repository → Stage → Production)
  • Stage - Staging / Testing / Quality Assurance (QA) environemnt, serves for final validation of our files before moving them into Production environement (service-qa.unece.org)
  • Production - Production environment, final destination of our files (service.unece.org)

(Terms not covered: Pull (to be added), Pull-request, Branch, Merge, other Git's features)

Diagram

Simplified diagram of the whole process:

ToC

Table of Contents

Diagram

Gliffy Diagram
nameFiles-Deployment
pagePin5

Prerequisities

Installing tools

Working with Git

 

Step-by-step guide

Cloning Repo

Adding changes

Commiting to Repo

Running Pipelines

From repo to Stage

From Stage to Prod

11

Resources

Repository Web interface

Repository GUI

Pipeline Web interface

Working with Git

Official Sourcetree documentation

Step-by-step guide

Installing and Configuring tools

Sourcetree Initial configuration 

  • Download and install Sourcetree, if needed install also MS .NET Framework 7.4.1, as this requires Administrator privilegies, ask ISU for assistance
  • After Installation run Sourcetree application
  • As part of initial execution, configure Sourcetree - useraccount and tools

    1. Login to remote Repository 
      1. Image Added
    2. Authenticate user (using Windows / Active Directory credentials)
      1. Image Added
    3. If Credentials are correct, you should see confirmation
      1. Image Added
    4. Select modules for installation (we need only Git)
      1. Image Added
    5. Module installation - progress
      1. Image Added
    6. Module installation - confirmation
      1. Image Added
    7. SSH key configuration (can be skipped)
      1. Image Added

Cloning Repository

  • After Initial setup we configure and clone repositories
    1. Add a new repository
      1. Image Added
    2. On Remote Repository (bitbucket.unece.org), select your Repository and click "Clone in SourceTree" for easy configuration, or click on "Clone" and copy repository link (for Git repositories the link ends with .git)
      1. Image Added
    3. Review Cloning configuration, select your local folder where files shoud be stored
      1. Image Added
    4. Run Clone and wait for process to finish
      1. Image Added
      2. Image Added
      3. Image Added

Making a change in files

Warning
titleBe sure you are working on up to date copy

Before you perform any changes in your local files, be sure you have the latest state of remote repository synchronized with your local repository

to do this we perform "Pull" action, this will retrieve the latest files from remote repository and update the local one, this will also make sure we are working on the latest version of files and generally prevent conflicts when commiting changes. 

Image Added

and confirm pull from master branch

Image Added


  • Local repo without a change, after Initial Cloning we have a files in Local Repo the same state as they appear on Remote Repo (local repo is in sync with the remote repo)

    • Image Added
  • Local Repository in windows explorer
    • Image Added
  • New files (selected) to be transferred to local repo in windows explorer
    • Image Added
  • Transfer to local repo Overwrite prompt (if updating files to a new version)

    • Image Added
  • Transfer to Local repo running
    • Image Added

  • We have a new files (we updated the current files) in our local repo (this is considedred as a change, another type of change is adding and removing files/folders) 
    1. New files in local repo - see file status and commit log
      1. Image Added
      2. Image Added
    2. Differences - after selecting the file we can see details of Changes 
      1. Image Added
      2. Image Added
      3. Image Added
    3. Staging files - by selecting files clicking on "Stage Selected", selected files are staged and moved to Staged file window
      1. Image Added
    4. Adding commit message - we add commit message explaining nature of the change
      1. Image Added
    5. User info for the first commit - we are asked to provide email (full name should be automatically populated)
      1. Image Added
      2. Image Added
    6. Commit is linked to user account and we can click on "Commit" button to execute a commit
      1. Image Added
    7. After commit is executed, changes are prepared to be Pushed to remote repository, Push will became available
      1. Image Added
      2. Image Added
    8. Push - after clicking on "Push" button, we are asked to select branch, in this simple example we are staying in only one branch - master
      1. Image Added
    9. Push running, after clicking on Push button from branch selection, Commits (containing changes) are pushed to Remote Repository
      1. Image Added
    10. Push completed, we can see our changes in Graph view on Log/History tab
      1. Image Added
    11. Bitbucket - on Remote repo - Commits - we can also see our Commits
      1. Image Added
    12. Bitbucket - on Remote repo - Sources - we can also see each individual file together with commit message
      1. Image Added

Running Pipelines

  • Go to Trade Division pipelines - https://bamboo.unece.org/browse/TRADE
    • Image Added
    1. Select desired Pipeline (in our case, as we are deploying new LOCODE Directory version - we use "Service LOCODE" pipeline)

      1. Image Added
    2. Select job (plan) to run
      1. Image Added

From Local Repository to Stage

  1. Deploy to Stage - Run plan
    1. Image Added
  2. Deploy to Stage - running

    1. Image Added
  3. Deploy to Stage - completed

    1. Image Added
  4. Changes appear on Stage for validation (service-qa.unece.org)

    1. in our example https://service-qa.unece.org/trade/locode*
      1. https://service-qa.unece.org/trade/locode/af.htm
      2. https://service-qa.unece.org/trade/locode/ax.htm
      3. https://service-qa.unece.org/trade/locode/ae.htm
      4. Etc.
    2. We can see changes on Page
      1. Image Added
    3. And in it's Source
      1. Image Added 

From Stage to Prod

  1. Deploy to production - run option 1 from the left menu
    1. Image Added
  2. Deploy to production - run option 2 from the top menu
    1. Image Added
  3. Confirmation of "Deploy to PRD" run
    1. Image Added
  4. Deploy to production - running
    1. Image Added
  5. Deploy to production - completed
    1. Image Added
  6. Changes appear on Production (service.unece.org) in pages
    1. Image Added
  7. Changes appear on Production (service.unece.org) - in it's sources
    1. Image Added
  8. Link files to Production
    1. in our example https://service.unece.org/trade/locode*
    2. https://service.unece.org/trade/locode/af.htm
    3. https://service.unece.org/trade/locode/ax.htm
    4. https://service.unece.org/trade/locode/ae.htm
    5. Etc.

Prerequisities

 

Step-by-step guide

 

Info

Content by Label
showLabelsfalse
max5
spacesthemepressdemo
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "themepressdemo"
labelskb-how-to-article

Page properties
hiddentrue
Related issues