Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pipeline {
- agent { label "aws-build-agent" }
- stages {
- stage('scm') {
- steps {
- checkout scm
- }
- }
- stage('build') {
- steps {
- sh './.cicd/build.sh'
- }
- }
- stage('deploy') {
- when { branch 'master' }
- steps {
- withCredentials(
- [
- sshUserPrivateKey(
- credentialsId: "my-deploy-key",
- keyFileVariable: 'RSA_PRIVATE_KEY_FILE'
- )
- ]
- ) {
- sh './.cicd/deploy.sh'
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement