Created
June 29, 2020 16:01
-
-
Save jamalx31/345fe46f9f582a5433d358bc8a612962 to your computer and use it in GitHub Desktop.
A pipeline template to automate app deployments
This file contains 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
pipeline { | |
agent any | |
options { | |
// timeout(time: 60, unit: 'MINUTES') | |
} | |
parameters { | |
// choice(name: 'update', choices: ['PATCH', 'MINOR', 'MAJOR'], description: 'Increasing version major.minor.patch') | |
} | |
environment { | |
// ENVFILE = ".env.${getBuildEnv()}" | |
} | |
stages { | |
// Step 1 | |
stage('Checkout') { | |
steps { | |
// fetch the repot | |
// install packages | |
// and notify Slack | |
} | |
} | |
// Step 2 | |
stage('Detox Testing') { | |
when { | |
equals expected: 'master', actual: env.BRANCH_NAME | |
} | |
steps { | |
// Run tests | |
} | |
post { | |
success { | |
// set tests results | |
} | |
} | |
} | |
// Step 3 build iOS App | |
stage('Build iOS') { | |
steps { | |
// Build | |
} | |
post { | |
success { | |
// upload to App Center | |
} | |
} | |
} | |
// Step 3 build Android App | |
stage('Build Android') { | |
steps { | |
// build | |
} | |
post { | |
success { | |
// sign APK | |
// upload to App Center | |
} | |
} | |
} | |
// step 4 if prodcution | |
stage('Submit To Stores') { | |
when { | |
equals expected: 'master', actual: env.BRANCH_NAME | |
} | |
steps { | |
// submit apps to App Store & Play Store | |
} | |
post { | |
success { | |
// update version number on Github | |
} | |
} | |
} | |
} | |
post { | |
always { | |
// send report and results to Slack | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment