Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 2.5 KB

build_pipeline.md

File metadata and controls

44 lines (27 loc) · 2.5 KB

Azure DevOps build pipeline

About

The pipeline described here is created in Azure DevOps. The azure_pipelines.yml file in the PROJECT_ROOT is where the definition for this pipeline is. On a fresh checkout the YML has two variables you need to change before actual use. See Before running section below. The pipeline does the following in this order precisely:

  • logs in into the container registry in order to be able to publish new images
  • starts the test database containers (used during the build step if skipTests is set to false). These containers are vanilla MSSQL Server containers.
  • creates the DBs inside the containers it spun up in the previous step.
  • runs the maven build which creates the entire app and dependent artifacts (Spark scripts)
  • creates a docker container with the app packaged in the previous step
  • archives the artifacts (achieves this by means of the script that you can check out in bin/prepare_artifacts.sh)
  • uploads the artifacts archived previously into the blob storage account

Pre-requisites

In order to use the pipeline template you'll need to create 2 service connections in your Azure DevOps project

  1. service connection for uploading a new docker image to your container registry

  2. service connection for accessing and writing to the blob storage account where you want to push artifact archives which are created by the pipeline

Before running

Once the service connections are created you need to edit the YML file and change the placeholder values for the service connections mentioned above. In the variables section of the pipeline YML file you'll find two placeholders. Put the name of the service connections and you should be ready to run the pipeline.

Pipeline parameters

The pipeline has exposes three parameters for running it

  • tag_override

    controls the name of the build (jar artifact version, docker image tag and archive version naming). If left unchanged the build number generated by the Azure DevOps Pipeline mechanism will be used $(Build.BuildNumber)

  • skipTests

    if checked the build is also going to run the unit and integration tests. By default unchecked

  • uploadArtifacts

    if checked the build will, upon successful build completion, upload the artifacts to the container registry (docker image) and blob storage (the artifacts archive). By default unchecked

Pipeline artifacts

If the build was successful you should see a published artifact in the pipeline run which is the artifact archive.