Merge pull request #319 from WorldWideTelescope/build-script

Update build script
This commit is contained in:
Jon Carifio 2024-09-26 14:40:50 -04:00 коммит произвёл GitHub
Родитель 8fadf90c0c 13362778cf
Коммит 755dfb526d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 16 добавлений и 5 удалений

Просмотреть файл

@ -1,12 +1,21 @@
trigger:
- master
- staging
pr:
- master
- staging
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
- name: buildPlatform
value: 'Any CPU'
- name: buildConfiguration
value: 'Release'
- name: dockerTag
${{ if eq( variables['Build.SourceBranchName'], 'master' ) }}:
value: 'latest'
${{ if ne( variables['Build.SourceBranchName'], 'master' ) }}:
value: ${{ variables['Build.SourceBranchName'] }}
stages:
- stage: Build
@ -164,13 +173,14 @@ stages:
Dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
buildContext: '$(Build.SourcesDirectory)'
tags: |
latest
${{ variables.dockerTag }}
- bash: |
set -xeuo pipefail
mkdir $(build.artifactStagingDirectory)/dockerImage
echo 'tag = ${{ variables.dockerTag }}'
docker save -o $(build.artifactStagingDirectory)/dockerImage/core-data.tar.gz \
aasworldwidetelescope/core-data:latest
aasworldwidetelescope/core-data:${{ variables.dockerTag }}
displayName: Save image as artifact
- publish: $(build.artifactStagingDirectory)/dockerImage
@ -201,6 +211,7 @@ stages:
# new app and doing any final testing.
- job: AzureAppService
condition: eq(variables['Build.SourceBranchName'], 'master')
pool:
vmImage: 'windows-latest'
steps:
@ -244,4 +255,4 @@ stages:
repository: 'aasworldwidetelescope/core-data'
command: 'push'
tags: |
latest
${{ variables.dockerTag }}