From d50ac8a818b4341b9f6ffe925a5d04f057bab8d3 Mon Sep 17 00:00:00 2001 From: YinAoXiong Date: Fri, 20 Dec 2019 22:08:17 +0800 Subject: [PATCH] =?UTF-8?q?:green=5Fheart:=20=E6=B7=BB=E5=8A=A0manifest?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4acf93a..6dd7fbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,7 @@ services: - docker language: bash env: - - IMAGE_NAME=12306_code_server - + - IMAGE_NAME=12306_code_server DOCKER_CLI_EXPERIMENTAL=enabled install: - docker run --rm --privileged multiarch/qemu-user-static:register --reset @@ -26,9 +25,14 @@ script: if [ $COMMIT_SHA == $LATEST_TAG_SHA ]; then docker tag $DOCKER_USERNAME/$IMAGE_NAME:$THIS_ARCH $DOCKER_USERNAME/$IMAGE_NAME:$THIS_ARCH-$(git describe --abbrev=0 --tags) fi - if [ "$THIS_ARCH" == "amd64" ]; then - # Tag as latest for amd64 images - docker tag $DOCKER_USERNAME/$IMAGE_NAME:$THIS_ARCH $DOCKER_USERNAME/$IMAGE_NAME:latest - fi done - - docker push $DOCKER_USERNAME/$IMAGE_NAME \ No newline at end of file + docker push $DOCKER_USERNAME/$IMAGE_NAME + docker manifest create $DOCKER_USERNAME/$IMAGE_NAME:latest $DOCKER_USERNAME/$IMAGE_NAME:amd64 $DOCKER_USERNAME/$IMAGE_NAME:arm32v7 $DOCKER_USERNAME/$IMAGE_NAME:arm64v8 + docker manifest inspect $DOCKER_USERNAME/$IMAGE_NAME:latest + docker manifest push $DOCKER_USERNAME/$IMAGE_NAME:latest + if [ $COMMIT_SHA == $LATEST_TAG_SHA ]; then + TAG=$(git describe --abbrev=0 --tags) + docker manifest create $DOCKER_USERNAME/$IMAGE_NAME:$TAG $DOCKER_USERNAME/$IMAGE_NAME:amd64 $DOCKER_USERNAME/$IMAGE_NAME:arm32v7 $DOCKER_USERNAME/$IMAGE_NAME:arm64v8 + docker manifest inspect $DOCKER_USERNAME/$IMAGE_NAME:$TAG + docker manifest push $DOCKER_USERNAME/$IMAGE_NAME:$TAG + fi \ No newline at end of file