Commit eca51ceb by shipengwei

Merge branch 'master' of git.aipark.com:eoc-group/dotnet-cicd-demo

parents f76a07b7 6dbeef29
...@@ -16,15 +16,16 @@ before_script: ...@@ -16,15 +16,16 @@ before_script:
build-init: build-init:
stage: build stage: build
script: script:
- FULLVERSION=$BASE_VERSION.$(date +"%y%m%d%H%M") - echo "FULLVERSION=$BASE_VERSION.$(date +"%y%m%d%H%M")" > .env
- export FULLVERSION
- echo $FULLVERSION
- echo $CI_REGISTRY_IMAGE - echo $CI_REGISTRY_IMAGE
artifacts: artifacts:
paths: [FULLVERSION] reports:
dotenv: .env
build-master-x86: build-master-x86:
stage: build stage: build
dependencies:
- build-init
script: script:
- docker build -t $CI_REGISTRY_IMAGE:$FULLVERSION-amd64 . --pull -f Dockerfile --platform linux/amd64 - docker build -t $CI_REGISTRY_IMAGE:$FULLVERSION-amd64 . --pull -f Dockerfile --platform linux/amd64
- docker push $CI_REGISTRY_IMAGE:$FULLVERSION-amd64 - docker push $CI_REGISTRY_IMAGE:$FULLVERSION-amd64
...@@ -35,6 +36,8 @@ build-master-x86: ...@@ -35,6 +36,8 @@ build-master-x86:
build-master-arm64: build-master-arm64:
stage: build stage: build
dependencies:
- build-init
script: script:
- docker build -t $CI_REGISTRY_IMAGE:$FULLVERSION-arm64 . --pull -f Dockerfile --platform linux/arm64 - docker build -t $CI_REGISTRY_IMAGE:$FULLVERSION-arm64 . --pull -f Dockerfile --platform linux/arm64
- docker push $CI_REGISTRY_IMAGE:$FULLVERSION-arm64 - docker push $CI_REGISTRY_IMAGE:$FULLVERSION-arm64
...@@ -45,6 +48,9 @@ build-master-arm64: ...@@ -45,6 +48,9 @@ build-master-arm64:
build-manifest: build-manifest:
stage: build stage: build
dependencies:
- build-master-x86
- build-master-arm64
script: script:
- docker manifest create $CI_REGISTRY_IMAGE:$FULLVERSION $CI_REGISTRY_IMAGE:$FULLVERSION-amd64 $CI_REGISTRY_IMAGE:$FULLVERSION-arm64 - docker manifest create $CI_REGISTRY_IMAGE:$FULLVERSION $CI_REGISTRY_IMAGE:$FULLVERSION-amd64 $CI_REGISTRY_IMAGE:$FULLVERSION-arm64
- docker manifest push $CI_REGISTRY_IMAGE:$FULLVERSION - docker manifest push $CI_REGISTRY_IMAGE:$FULLVERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment