Skip to content

Instantly share code, notes, and snippets.

@oliverisaac
Created October 8, 2025 20:43
Show Gist options
  • Save oliverisaac/c90a7f51e2f6314d9dded370022c589a to your computer and use it in GitHub Desktop.
Save oliverisaac/c90a7f51e2f6314d9dded370022c589a to your computer and use it in GitHub Desktop.
// 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