Skip to content

Commit

Permalink
feat: add production deployment stage (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve authored May 6, 2024
1 parent 9457920 commit 7fa5d46
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,34 @@ pipeline {
}
}
}

stage('Deploy to production') {
when {
allOf{
expression { env.BRANCH_IS_PRIMARY }
// Only deploy from infra.ci.jenkins.io
expression { infra.isInfra() }
}
}
steps {
script {
infra.withFileShareServicePrincipal([
servicePrincipalCredentialsId: 'infraci-docs-jenkins-io-fileshare-service-principal-writer',
fileShare: 'docs-jenkins-io',
fileShareStorageAccount: 'docsjenkinsio'
]) {
sh '''
# Synchronize the File Share content
set +x
azcopy sync \
--skip-version-check \
--recursive=true \
--delete-destination=true \
./playbook/build/site/ "${FILESHARE_SIGNED_URL}"
'''
}
}
}
}
}
}

0 comments on commit 7fa5d46

Please sign in to comment.