This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| - master | |
| pr: | |
| branches: | |
| include: | |
| - master | |
| stages: | |
| - stage: CI | |
| displayName: CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - stage: Deploy_to_Prod | |
| condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | |
| dependsOn: CI | |
| jobs: | |
| - deployment: Deployment | |
| displayName: Deploy container in Prod | |
| pool: | |
| vmImage: ubuntu-latest | |
| environment: | |
| name: prod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - task: Docker@2 | |
| displayName: Push | |
| inputs: | |
| command: push | |
| containerRegistry: "ACR01" | |
| repository: "image_name" | |
| tags: | | |
| $(Build.SourceVersion) | |
| latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - script: | | |
| sudo apt-get install rpm | |
| wget https://github.com/aquasecurity/trivy/releases/download/v$(trivyVersion)/trivy_$(trivyVersion)_Linux-64bit.deb | |
| sudo dpkg -i trivy_$(trivyVersion)_Linux-64bit.deb | |
| trivy -v | |
| displayName: 'Download and install Trivy' | |
| - task: CmdLine@2 | |
| displayName: "Run trivy scan" | |
| inputs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - task: Docker@2 | |
| displayName: Build | |
| inputs: | |
| command: build | |
| containerRegistry: "ACR01" | |
| repository: "image_name" | |
| dockerfile: /path/to/Dockerfile | |
| tags: | | |
| $(Build.SourceVersion) # commit sha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| steps: | |
| - task: NodeTool@0 | |
| inputs: | |
| versionSpec: 12.x | |
| displayName: Cache Yarn packages | |
| - script: yarn install --prefer-offline --pure-lockfile --no-progress | |
| displayName: Yarn Install | |
| - script: yarn test:ci -w 2 | |
| displayName: 'Run tests' | |
| - script: yarn security:check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stages: | |
| - stage: CI | |
| displayName: CI | |
| jobs: | |
| - job: Tests | |
| displayName: Tests | |
| pool: | |
| vmImage: ubuntu-latest | |
| steps: | |
| - template: tests.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger: | |
| - master | |
| pr: | |
| branches: | |
| include: | |
| - master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| terraform apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| terraform init |
NewerOlder