browser-asmjs: Use tagged version for the default dockcross image

This commit is contained in:
Matt McCormick 2019-01-01 21:15:02 -05:00
parent 9e57d19cea
commit 03931af69b
No known key found for this signature in database
GPG Key ID: 45DA982347954FA5
3 changed files with 15 additions and 7 deletions

View File

@ -73,7 +73,8 @@ jobs:
command: |
docker load -i ~/docker/base.tar
make browser-asmjs
docker save -o ~/docker/browser-asmjs.tar dockcross/browser-asmjs:latest
tagged=$(docker images -q -f 'since=dockcross/browser-asmjs:latest' --format '{{.Repository}}:{{.Tag}}')
docker save -o ~/docker/browser-asmjs.tar dockcross/browser-asmjs:latest $tagged
- run:
name: browser-asmjs test
command: |
@ -399,10 +400,9 @@ jobs:
docker load -i ~/docker/browser-asmjs.tar
if [ "${CIRCLE_BRANCH}" == "master" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
TAG=$(date '+%Y%m%d')-$(git rev-parse --short HEAD)
docker push dockcross/browser-asmjs:latest
docker tag dockcross/browser-asmjs:latest dockcross/browser-asmjs:${TAG}
docker push dockcross/browser-asmjs:${TAG}
tagged=$(docker images -q -f 'since=dockcross/browser-asmjs:latest' --format '{{.Repository}}:{{.Tag}}')
docker push $tagged
fi
- restore_cache:
key: linux-arm64-assets-{{ .Revision }}

View File

@ -78,7 +78,13 @@ browser-asmjs: browser-asmjs/Dockerfile
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
browser-asmjs
$(DOCKER) tag $(ORG)/browser-asmjs:latest $(ORG)/browser-asmjs:$(TAG)
$(DOCKER) build -t $(ORG)/browser-asmjs:$(TAG) \
--build-arg IMAGE=$(ORG)/browser-asmjs \
--build-arg VERSION=$(TAG) \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
browser-asmjs
rm -rf browser-asmjs/test
rm -rf $@/imagefiles

View File

@ -16,17 +16,19 @@ ENV CC=/emsdk_portable/sdk/emcc \
CXX=/emsdk_portable/sdk/em++ \
AR=/emsdk_portable/sdk/emar
ENV DEFAULT_DOCKCROSS_IMAGE dockcross/browser-asmjs
ENV CMAKE_TOOLCHAIN_FILE /emsdk_portable/sdk/cmake/Modules/Platform/Emscripten.cmake
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG IMAGE
ARG IMAGE=dockcross/browser-asmjs
ARG VERSION=latest
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name=$IMAGE \
org.label-schema.version=$VERSION \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.schema-version="1.0"
ENV DEFAULT_DOCKCROSS_IMAGE ${IMAGE}:${VERSION}