github.com/confluentinc/cli@v1.100.0/system-tests-pipelines.yml (about)

     1  jobs:
     2  - job: system_test
     3    displayName: cli system-tests
     4    timeoutInMinutes: 90
     5  
     6    pool:
     7      vmImage: 'ubuntu-18.04'
     8    
     9    variables:
    10      IMAGE_NAME: DUMMY_IMAGE_NAME # dummy image name to stop mk-include/docker.mk from crashing as it requires image name (not needed for CLI system tests)
    11      CI: "true"
    12      BIN_PATH: "$(Agent.BuildDirectory)"
    13    
    14    steps:
    15      
    16    - task: HelmInstaller@1 # Azure Pipelines preinstalls helm, replace it with version 2.9.1 specified in cc-helm.mk
    17      displayName: Helm installer
    18      inputs:
    19        helmVersionToInstall: 2.9.1
    20   
    21    - template: azure-pipelines-templates/setup-secrets.yml
    22  
    23    - template: azure-pipelines-templates/setup-go.yml
    24        
    25    - bash: |
    26        echo "##vso[task.setvariable variable=GOROOT]$(Agent.BuildDirectory)/go"
    27        echo "##vso[task.setvariable variable=GOPATH]$(Agent.BuildDirectory)/gopath"
    28        echo "##vso[task.setvariable variable=GOBIN]$(Agent.BuildDirectory)/go/bin"
    29        echo "##vso[task.setvariable variable=modulePath]$(Agent.BuildDirectory)/go/src/github.com/$(build.repository.name)"
    30      displayName: Properly configure our custom Go environment
    31    
    32    - script: |
    33        echo '##vso[task.prependpath]$(GOROOT)/bin'
    34        echo '##vso[task.prependpath]$(GOPATH)/bin'
    35        mkdir -p ${GOPATH}\bin
    36        mkdir -p ${GOROOT}\bin
    37      displayName: Set up the Go workspace
    38    
    39    - task: DownloadSecureFile@1
    40      name: vaultsecrets
    41      displayName: Securely download secrets for vault login (VAULT_ADDR, VAULT_ROLE_ID, VAULT_SECRET_ID)
    42      inputs:
    43        secureFile: 'vault_secrets'
    44    
    45    - script: |
    46        make deps
    47      displayName: make deps
    48    
    49    - script: |
    50        make build
    51      displayName: make build
    52    
    53    - task: GoTool@0
    54      inputs:
    55        version: '1.12.7'
    56      displayName: Switch to Go 1.12.7 for cc-system-tests
    57    
    58    - bash: |
    59        git clone git@github.com:confluentinc/cc-mk-include.git mk-include
    60        echo "include ./mk-include/cc-begin.mk" >> Makefile
    61        echo "include ./mk-include/cc-end.mk" >> Makefile
    62        echo "include ./mk-include/cc-docker.mk" >> Makefile
    63        echo "include ./mk-include/cc-vault.mk" >> Makefile
    64        echo "include ./mk-include/cc-helm.mk" >> Makefile
    65        echo "include ./mk-include/cc-cpd.mk" >> Makefile
    66        echo "include ./mk-files/cli-cpd.mk" >> Makefile
    67      displayName: clone mk-include and include in Makefile
    68    
    69    - bash: |
    70        make install-vault
    71      displayName: install vault
    72    
    73  
    74    - bash: |
    75        export PATH="$(BIN_PATH):$PATH" #export path where vault is loaded to
    76        . $(vaultsecrets.secureFilePath) # export secrets for vault login (VAULT_ADDR, VAULT_ROLE_ID, VAULT_SECRET_ID)
    77        . mk-include/bin/vault-setup
    78        . vault-sem-get-secret ssh_id_rsa
    79        . vault-sem-get-secret netrc
    80        . vault-sem-get-secret semaphore-secrets-global
    81        . vault-sem-get-secret eng_aws
    82        . vault-sem-get-secret aws_credentials
    83        . vault-sem-get-secret cpd_gcloud
    84        . vault-sem-get-secret ssh_config
    85        . vault-sem-get-secret gitconfig
    86        make docker-login
    87        make helm-init-ci
    88        make helm-update-repo
    89      displayName: try to inject secrets and setup docker and helm
    90    
    91    - bash: |
    92        make gcloud-install
    93      displayName: Install gcloud
    94    
    95    - bash: |
    96        make cpd-update
    97      displayName: Download CPD
    98    
    99    - bash: |
   100        make checkout-cc-system-tests
   101      displayName: checkout cc-system-tests
   102    
   103    - bash: |
   104        make cpd-priv-create-if-missing
   105      env:
   106        AZURE_PIPELINES: "true" # IMPORTANT: for cpd leakage check
   107        AZURE_PIPELINES_JOB_ID: $(Build.BuildId) # IMPORTANT: for cpd leakage check
   108        AZURE_PIPELINES_PROJECT_NAME: "cli" # IMPORTANT: for cpd leakage check
   109      displayName: create cpd cluster
   110    
   111    - bash: |
   112        make show-cpd
   113      displayName: show cc-cpd.mk variables
   114  
   115    - bash: |
   116        make cpd-deploy-local
   117      displayName: cpd deploy
   118    
   119    - bash: |
   120        make cpd-priv-testenv || make cpd-debug-and-err
   121      displayName: cpd priv testenv
   122    
   123    - bash: |
   124        CREATE_KAFKA_CLUSTERS=true SKIP_SETUP_S3_BUCKET_FOR_CONNECT=true make system-test-init-env || make cpd-debug-and-err
   125      displayName: make init-env
   126    
   127    - bash: |
   128        make replace-cli-binary
   129      displayName: Replace CLI binary
   130    
   131    - bash: |
   132        GO_TEST_PACKAGE_ARGS=./test/cli/... TESTS_TO_RUN=Test make run-system-tests || make cpd-debug-and-err
   133      displayName: Run system tests
   134    
   135    - bash: |
   136        make cpd-destroy
   137      condition: always()
   138      displayName: Free CPD
   139