Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Set Up New Environment

Part 1: Set up a pipeline

To be able to deploy the code automatically when one commit the code to the repository, we need to create a pipeline that auto deploy the code, we use a Docker image to the new environment.

In this example we create a pipeline for the Development environment. Every time a developer commit their code to the CAMMS Repo (Dev Branch) , the pipeline is triggered and pushes the code to the Development environment.

  1. Go to https://dev.azure.com/transport-canada/Medical Certificate Processing/_build and click on create a new pipeline

  2. Select Use the classic editor

  3. Select the correct branch you need for the pipeline and click Continue

  4. Under the Select a template select Empty job or Docker container

  5. Give the pipeline a name

  6. Under Get sources make sure to select the correct repo and branch

  7. Under Agent job check that you have a check mark under Allow scripts to access the OAuth token

  8. Click to add a task if you selected an empty job, if selected Docker container in step 4 you will have this task already.

  9. Configure the first task “Build an image”. Under the Task version make sure to change it to 0.*. The Action should be Build an image. The Display name you can change to reflect building an image. Select the correct Subscription.

  10. Select the Dockerfile by clicking on the 3 dots

  11. Under Build Arguments add the following:

    PAT=$(System.AccessToken)
    FEED_URL=https://pkgs.dev.azure.com/transport-canada/_packaging/DevOps-Nuget/nuget/v3/index.json

12. Under the Image name add the environment name - pipeline name : $(Build.BuildNumber)

ncdsafsecsurcr-camms-smmac-dev:$(Build.BuildNumber)

13. Click add a new task (similar to step 8). Search for Docker container and add the task and configure the “Push an image” task. Under Task version select 0.*. Under Action select Push an image. the Display name should change to Push an image. Make sure the subscription and container are correct.

14. Repeat step 12 to configure the image name for the push an image, if not already done.

15. Save the pipeline so you won’t lose any info before continuing to the Variables.

16. Add two new pipeline variables:

BuildConfiguration              Release
BuildPlatform                   any cpu

17. Configure the Triggers: Check “Enable continuous integration”

18. Configure the options. Make sure the Build number is in the following format:

$(date:yyyyMMdd)$(rev:.r)

Part 2: Set up and configure Azure AD

< Azure Portal configurations etc >

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.