Created
October 24, 2015 22:14
-
-
Save marcellodesales/2197ec2dca5afa4e1ab8 to your computer and use it in GitHub Desktop.
Building Android Cordova CCA applications with Wercker, publising build to Amazon S3 with Slack Notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box: marcellodesales/[email protected] | |
build: | |
steps: | |
- script: | |
name: Install Node dependencies | |
code: sudo npm install | |
- script: | |
name: Update the path with the binaries from Node | |
code: export PATH="$WERCKER_SOURCE_DIR/node_modules/.bin:$PATH" | |
- script: | |
name: Install Bower dependencies | |
code: bower install | |
- script: | |
name: Setup project settings for CCA with Gulp | |
code: gulp | |
- script: | |
name: Setup and generate the Android Platform on CCA | |
code: cd build && cca analytics disable && cca platform add android && cca plugin add org.apache.cordova.device --skip-upgrade && cca build android --skip-upgrade | |
- script: | |
name: Create final versioned file based on the commit SHA | |
code: APK_FILE=$WERCKER_BUILD_ID-$(echo $WERCKER_GIT_COMMIT | cut -b 1-7).apk && cp $WERCKER_SOURCE_DIR/build/platforms/android/build/outputs/apk/android-armv7-debug.apk $WERCKER_OUTPUT_DIR && cp $WERCKER_SOURCE_DIR/build/platforms/android/build/outputs/apk/android-armv7-debug.apk $WERCKER_OUTPUT_DIR/$APK_FILE | |
after-steps: | |
- wantedly/pretty-slack-notify: | |
webhook_url: $SLACK_WEBHOOK_BUILD | |
deploy: | |
steps: | |
# Execute the s3sync deploy step, a step provided by wercker | |
- s3sync: | |
key_id: $AWS_ACCESS_KEY_ID | |
key_secret: $AWS_SECRET_ACCESS_KEY | |
bucket_url: $AWS_BUCKET_URL | |
source_dir: . | |
# Notify slack | |
after-steps: | |
- wantedly/pretty-slack-notify: | |
webhook_url: $SLACK_WEBHOOK_DEPLOYMENT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The old Wercker build is https://github.com/marcellodesales/box-cordova-cca... Since Wercker is using Docker, this must be migrated.