Skip to content

Commit

Permalink
Merge pull request #130 from ambianic/dev
Browse files Browse the repository at this point in the history
fix: sem rel CI
  • Loading branch information
Ivelin Ivanov authored Nov 13, 2019
2 parents 65c198e + 75373b2 commit 840d418
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 0 additions & 28 deletions build/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]}
Expand Down

0 comments on commit 840d418

Please sign in to comment.