Last active
August 14, 2024 18:08
Revisions
-
smulvih2 revised this gist
Aug 14, 2024 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains 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 charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,8 @@ resources: repositories: - repository: site-XYZ type: github endpoint: XYZDrupalWxT name: smulvih2/site-XYZ variables: - name: GIT_TAG -
smulvih2 created this gist
Aug 14, 2024 .There are no files selected for viewing
This file contains 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,70 @@ # Starter pipeline for the drupalwxt/docker-scaffold appsvc image trigger: tags: include: - '*' pr: none # Use a generic Ubuntu pool provided by Azure DevOps pool: vmImage: 'ubuntu-latest' resources: repositories: - repository: site-XYZ type: github endpoint: ECCCDrupalWxT name: openplus/site-XYZ variables: - name: GIT_TAG value: '' steps: - task: DockerInstaller@0 displayName: 'Update Docker' inputs: dockerVersion: '23.0.1' releaseType: 'stable' - bash: | export GIT_TAG=$(echo $(Build.SourceBranch) | sed -e "s/^refs\/tags\///") echo "Using git tag $GIT_TAG" echo "##vso[task.setvariable variable=GIT_TAG]$GIT_TAG" displayName: 'Export github tag name' - checkout: site-XYZ path: site-XYZ displayName: 'Checkout XYZ application code' - script: | echo "Fetching tag " $(GIT_TAG) git checkout $(GIT_TAG) displayName: 'Switch git tag' - script: export COMPOSER_MEMORY_LIMIT=-1 && composer install --ignore-platform-reqs displayName: 'Install dependencies with composer' - script: make build displayName: 'Setup environment' - script: | docker compose -f docker-compose.appsvc.yml build --no-cache docker compose -f docker-compose.appsvc.yml up -d docker tag site-XYZ-web:latest $(XYZ_ACR_ENV)/site-XYZ:$(GIT_TAG)-appsvc docker ps -a sleep 10 displayName: 'Create and tag appsvc image' env: GIT_TAG: $(Build.SourceBranch) - task: Docker@2 env: GIT_TAG: $(Build.SourceBranch) inputs: command: 'push' containerRegistry: 'Drupal ACR' repository: 'site-XYZ' tags: $(GIT_TAG)-appsvc