Skip to content

Instantly share code, notes, and snippets.

@marcellodesales
Created October 24, 2015 22:14
Show Gist options
  • Save marcellodesales/2197ec2dca5afa4e1ab8 to your computer and use it in GitHub Desktop.
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
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
@marcellodesales
Copy link
Author

The old Wercker build is https://github.com/marcellodesales/box-cordova-cca... Since Wercker is using Docker, this must be migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment