Skip to content

Commit

Permalink
💚 添加manifest支持
Browse files Browse the repository at this point in the history
  • Loading branch information
YinAoXiong committed Dec 20, 2019
1 parent f8bfa87 commit d50ac8a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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

0 comments on commit d50ac8a

Please sign in to comment.