Skip to content

Commit

Permalink
Merge pull request #7 from ika-rwth-aachen/improvement/single-arch-im…
Browse files Browse the repository at this point in the history
…ages

[GitLab] Push regular images instead of manifest in case of single arch
  • Loading branch information
jpbusch authored Aug 22, 2023
2 parents e7f4ae3 + b7fcb3f commit b1ad47c
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions .gitlab-ci/docker-ros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,18 +250,37 @@ Test run-arm64:
script:
- |-
if [[ "${PLATFORM}" =~ amd64 && "${PLATFORM}" =~ arm64 ]]; then
if [[ "${TARGET}" =~ dev ]]; then docker manifest create ${IMG_DEV} --amend ${_IMAGE_DEV_CI_AMD64} --amend ${_IMAGE_DEV_CI_ARM64}; fi
if [[ "${TARGET}" =~ run ]]; then docker manifest create ${IMG_RUN} --amend ${_IMAGE_RUN_CI_AMD64} --amend ${_IMAGE_RUN_CI_ARM64}; fi
if [[ "${TARGET}" =~ dev ]]; then
docker manifest create ${IMG_DEV} --amend ${_IMAGE_DEV_CI_AMD64} --amend ${_IMAGE_DEV_CI_ARM64}
docker manifest push ${IMG_DEV}
fi
if [[ "${TARGET}" =~ run ]]; then
docker manifest create ${IMG_RUN} --amend ${_IMAGE_RUN_CI_AMD64} --amend ${_IMAGE_RUN_CI_ARM64}
docker manifest push ${IMG_RUN}
fi
elif [[ "${PLATFORM}" =~ amd64 ]]; then
if [[ "${TARGET}" =~ dev ]]; then docker manifest create ${IMG_DEV} --amend ${_IMAGE_DEV_CI_AMD64}; fi
if [[ "${TARGET}" =~ run ]]; then docker manifest create ${IMG_RUN} --amend ${_IMAGE_RUN_CI_AMD64}; fi
if [[ "${TARGET}" =~ dev ]]; then
docker pull ${_IMAGE_DEV_CI_AMD64}
docker tag ${_IMAGE_DEV_CI_AMD64} ${IMG_DEV}
docker push ${IMG_DEV}
fi
if [[ "${TARGET}" =~ run ]]; then
docker pull ${_IMAGE_RUN_CI_AMD64}
docker tag ${_IMAGE_RUN_CI_AMD64} ${IMG_RUN}
docker push ${IMG_RUN}
fi
elif [[ "${PLATFORM}" =~ arm64 ]]; then
if [[ "${TARGET}" =~ dev ]]; then docker manifest create ${IMG_DEV} --amend ${_IMAGE_DEV_CI_ARM64}; fi
if [[ "${TARGET}" =~ run ]]; then docker manifest create ${IMG_RUN} --amend ${_IMAGE_RUN_CI_ARM64}; fi
if [[ "${TARGET}" =~ dev ]]; then
docker pull ${_IMAGE_DEV_CI_ARM64}
docker tag ${_IMAGE_DEV_CI_ARM64} ${IMG_DEV}
docker push ${IMG_DEV}
fi
if [[ "${TARGET}" =~ run ]]; then
docker pull ${_IMAGE_RUN_CI_ARM64}
docker tag ${_IMAGE_RUN_CI_ARM64} ${IMG_RUN}
docker push ${IMG_RUN}
fi
fi
- |-
if [[ "${TARGET}" =~ dev ]]; then docker manifest push ${IMG_DEV}; fi
if [[ "${TARGET}" =~ run ]]; then docker manifest push ${IMG_RUN}; fi
Push CI:
stage: Push Multi-Arch Images
Expand Down

0 comments on commit b1ad47c

Please sign in to comment.