-
-
Save oliverisaac/c90a7f51e2f6314d9dded370022c589a to your computer and use it in GitHub Desktop.
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
| // jenkinsLibraries/vars/dockerReleasePipeline.groovy | |
| def call(Map config = [:]) { | |
| def drt = config.remove('releaseTarget') | |
| if (drt == null) { | |
| throw new Exception('releaseTarget must be defined') | |
| } | |
| drt | |
| .setName(env.JOB_NAME) | |
| .runValidation() | |
| pipeline { | |
| agent { | |
| label 'dockerce' | |
| } | |
| stages { | |
| stage('Build') { | |
| steps { | |
| withCredentials([ | |
| usernamePassword(credentialsId: 'ecr-aws-creds', | |
| usernameVariable: 'AWS_ACCESS_KEY_ID', | |
| passwordVariable: 'AWS_SECRET_ACCESS_KEY'), | |
| ]) { | |
| sh drt.ecrRepoLoginScript() | |
| } | |
| sh drt.createEcrScript() | |
| sh drt.dockerBuildScript() | |
| sh drt.dockerPushScript() | |
| } | |
| } | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment