From 0cd85f1f4de9385e3989ebdeb06e25b3fa1e2125 Mon Sep 17 00:00:00 2001 From: cnouguier Date: Mon, 22 Aug 2022 11:33:10 +0200 Subject: [PATCH] wip: Upgrade to Quasar 2 / Vue 3 : updated CI scripts #393 --- .travis.android.sh | 6 +++--- .travis.app.sh | 25 +++++++++++-------------- .travis.ios.sh | 3 +-- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.travis.android.sh b/.travis.android.sh index d1af779f..f874442a 100644 --- a/.travis.android.sh +++ b/.travis.android.sh @@ -34,11 +34,11 @@ npm run cordova:build:android > android.build.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy android.build.log scw:kalisio-builds/${BUILD_BUCKET}/android.build.log -check_code $EXIT_CODE 1 "Building the app" +check_code $EXIT_CODE 0 "Building the app" # Backup the android build to S3 rclone copy src-cordova/platforms/android/app/build/outputs/apk scw:kalisio-builds/${BUILD_BUCKET}/android > /dev/null -check_code $? 1 "Copying the artefact to s3" +check_code $? 0 "Copying the artefact to s3" travis_fold end "build" @@ -57,7 +57,7 @@ fastlane android $NODE_APP_INSTANCE > android.deploy.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy android.deploy.log scw:kalisio-builds/${BUILD_BUCKET}/android.deploy.log -check_code $? 1 "Deploying the app" +check_code $? 0 "Deploying the app" travis_fold end "deploy" diff --git a/.travis.app.sh b/.travis.app.sh index cc38df40..ef483369 100644 --- a/.travis.app.sh +++ b/.travis.app.sh @@ -1,13 +1,5 @@ #!/bin/bash -push_docker () { - docker push kalisio/$1:$2 - check_code $? "Pushing the $2 $1 docker image" - docker tag kalisio/$1:$2 kalisio/$1:$3 - docker push kalisio/$1:$3 - check_code $? "Pushing the $3 $1 docker image" -} - # # Provision the required files # @@ -25,17 +17,17 @@ travis_fold start "build" yarn build EXIT_CODE=$? tail -n 24 build.log -check_code $EXIT_CODE 1 "Builing the client" +check_code $EXIT_CODE 0 "Builing the client" # Log in to docker before building the app because of rate limiting docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD" -check_code $? 1 "Connecting to Docker" +check_code $? 0 "Connecting to Docker" # Create an archive to speed docker build process and build the image cd ../.. tar --exclude='kalisio/aktnmap/test' -zcf kalisio.tgz kalisio docker build --build-arg APP=$APP --build-arg FLAVOR=$FLAVOR --build-arg BUILD_NUMBER=$BUILD_NUMBER -f dockerfile -t kalisio/$APP:$TAG . -check_code $? 1 "Building the app docker image" +check_code $? 0 "Building the app docker image" travis_fold end "build" @@ -44,8 +36,13 @@ travis_fold end "build" # travis_fold start "deploy" -# Push the app image to the hub -push_docker $APP $TAG $FLAVOR -check_code $? 1 "Pushing the app to Docker Hub" +# Push the app image to the hub with the version tag +docker push kalisio/$APP:$TAG +check_code $? 0 "Pushing the $APP:$TAG docker image" + +# Push the app image to the hub with the flavor tag +docker tag kalisio/$APP:$TAG kalisio/$PP:$FLAVOR +docker push kalisio/$APP:$FLAVOR +check_code $? 0 "Pushing the $APP:$TAG docker image" travis_fold end "deploy" diff --git a/.travis.ios.sh b/.travis.ios.sh index 17412bb8..ea3b4f19 100644 --- a/.travis.ios.sh +++ b/.travis.ios.sh @@ -57,7 +57,6 @@ npm run cordova:build:ios > ios.build.log 2>&1 EXIT_CODE=$? # Copy the log whatever the result rclone copy ios.build.log scw:kalisio-builds/${BUILD_BUCKET}/ios.build.log -echo $EXIT_CODE check_code $EXIT_CODE 1 "Building the app" # Backup the ios build to S3 @@ -76,7 +75,7 @@ xcrun altool --upload-app -t ios -f "./src-cordova/platforms/ios/build/device/$T EXIT_CODE=$? # Copy the log whatever the result rclone copy ios.deploy.log scw:kalisio-builds/${BUILD_BUCKET}/ios.deploy.log -check_code $EXIT_CODE 1 "Deploying the app" +check_code $EXIT_CODE 0 "Deploying the app" travis_fold end "deploy"