Created
October 8, 2025 20:43
-
-
Save oliverisaac/67d460d92044d2efba720882d5f51b80 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/dockerReleasePipelineHardToTest.groovy | |
| def call(Map config = [:]) { | |
| def target = (config.remove('target') ?: 'release') as String | |
| def owner = config.remove('owner') as String | |
| if (owner == null || owner.isEmpty()) { | |
| throw new Exception('owner must be defined') | |
| } | |
| pipeline { | |
| agent { | |
| label 'dockerce' | |
| } | |
| stages { | |
| stage('Build') { | |
| steps { | |
| sh """ | |
| aws ecr create-repository --region=us-west-2 --repository-name=example --tags 'Key=owner,Value=${owner}'" | |
| docker buildx build --target='${target}' --tag example:latest . | |
| docker push example:latest | |
| """ | |
| } | |
| } | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment