Skip to content

Commit

Permalink
wip: Upgrade to Quasar 2 / Vue 3 : updated CI scripts #393
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Aug 22, 2022
1 parent 05bbd66 commit 0cd85f1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .travis.android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"

25 changes: 11 additions & 14 deletions .travis.app.sh
Original file line number Diff line number Diff line change
@@ -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
#
Expand All @@ -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"

Expand All @@ -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"
3 changes: 1 addition & 2 deletions .travis.ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 0cd85f1

Please sign in to comment.