diff --git a/.travis.android.sh b/.travis.android.sh index f874442a..d1af779f 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 0 "Building the app" +check_code $EXIT_CODE 1 "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 $? 0 "Copying the artefact to s3" +check_code $? 1 "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 $? 0 "Deploying the app" +check_code $? 1 "Deploying the app" travis_fold end "deploy" diff --git a/.travis.app.sh b/.travis.app.sh index 8eac9c5e..cc38df40 100644 --- a/.travis.app.sh +++ b/.travis.app.sh @@ -25,17 +25,17 @@ travis_fold start "build" yarn build EXIT_CODE=$? tail -n 24 build.log -check_code $EXIT_CODE 0 "Builing the client" +check_code $EXIT_CODE 1 "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 $? 0 "Connecting to Docker" +check_code $? 1 "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 $? 0 "Building the app docker image" +check_code $? 1 "Building the app docker image" travis_fold end "build" @@ -46,5 +46,6 @@ 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" travis_fold end "deploy" diff --git a/.travis.ios.sh b/.travis.ios.sh index edb831e1..17412bb8 100644 --- a/.travis.ios.sh +++ b/.travis.ios.sh @@ -57,11 +57,12 @@ 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 rclone copy src-cordova/platforms/ios/build scw:kalisio-builds/${BUILD_BUCKET}/ios > /dev/null -check_code $? 0 "Copying the artefact to s3" +check_code $? 1 "Copying the artefact to s3" travis_fold end "build" @@ -75,7 +76,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 0 "Deploying the app" +check_code $EXIT_CODE 1 "Deploying the app" travis_fold end "deploy"