diff --git a/.travis.yml b/.travis.yml index 2f4a7aeb..2d7662e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,33 @@ script: # publish binaries - > if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + echo "ARCH=$ARCH" + echo "DEV_TAG=$DEV_TAG" + echo "PROD_TAG=$PROD_TAG" + pwd + ls -al + + docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" + docker push "ambianic/ambianic-edge:${DEV_TAG}" + docker manifest create "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-amd64" "ambianic/ambianic-edge:dev-arm32v7" + docker manifest annotate "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-arm32v7" --os=linux --arch=arm --variant=v7 + docker manifest annotate "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-amd64" --os=linux --arch=amd64 + docker manifest push "ambianic/ambianic-edge:dev" + + cd ${TRAVIS_BUILD_DIR} + pwd + ls -al + + cp README.md ./src + + docker build -f ./build/Prod.Dockerfile --platform ${ARCH} -t "ambianic/ambianic-edge:${PROD_TAG}" ./src + docker tag "ambianic/ambianic-edge:${PROD_TAG}" "ambianic/ambianic-edge:latest" + docker push "ambianic/ambianic-edge:${PROD_TAG}" + docker manifest create "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-amd64" "ambianic/ambianic-edge:latest-arm32v7" + docker manifest annotate "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-arm32v7" --os=linux --arch=arm --variant=v7 + docker manifest annotate "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-amd64" --os=linux --arch=amd64 + docker manifest push "ambianic/ambianic-edge:latest" + export DEV_TAG export PROD_TAG export ARCH diff --git a/build/prepare-release.sh b/build/prepare-release.sh index 541d6f95..396d66c1 100755 --- a/build/prepare-release.sh +++ b/build/prepare-release.sh @@ -3,34 +3,6 @@ # verbose mode set -x -echo "ARCH=$ARCH" -echo "DEV_TAG=$DEV_TAG" -echo "PROD_TAG=$PROD_TAG" -pwd -ls -al - -# push dev image -docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" -docker push "ambianic/ambianic-edge:${DEV_TAG}" -docker manifest create "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-amd64" "ambianic/ambianic-edge:dev-arm32v7" -docker manifest annotate "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-arm32v7" --os=linux --arch=arm --variant=v7 -docker manifest annotate "ambianic/ambianic-edge:dev" "ambianic/ambianic-edge:dev-amd64" --os=linux --arch=amd64 -docker manifest push "ambianic/ambianic-edge:dev" - -# push prod image -cd ${TRAVIS_BUILD_DIR} -pwd -ls -al - -cp README.md ./src - -docker build -f ./build/Prod.Dockerfile --platform ${ARCH} -t "ambianic/ambianic-edge:${PROD_TAG}" ./src -docker tag "ambianic/ambianic-edge:${PROD_TAG}" "ambianic/ambianic-edge:latest" -docker push "ambianic/ambianic-edge:${PROD_TAG}" -docker manifest create "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-amd64" "ambianic/ambianic-edge:latest-arm32v7" -docker manifest annotate "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-arm32v7" --os=linux --arch=arm --variant=v7 -docker manifest annotate "ambianic/ambianic-edge:latest" "ambianic/ambianic-edge:latest-amd64" --os=linux --arch=amd64 -docker manifest push "ambianic/ambianic-edge:latest" RELEASE_VERSION=$1 a=( ${RELEASE_VERSION//./ } ) MAJOR=${a[0]}