Skip to content

Commit

Permalink
Fix the docker promotion parameter types (#4812)
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya authored Jun 28, 2024
1 parent 5d5b77d commit 0f6eec9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions jenkins/promotion/release-promotion.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ pipeline {
build job: 'docker-promotion', wait: true, parameters: [
string(name: 'SOURCE_IMAGES', value: "opensearch:${params.RELEASE_VERSION}.${params.OPENSEARCH_RC_BUILD_NUMBER}, opensearch-dashboards:${params.RELEASE_VERSION}.${params.OPENSEARCH_DASHBOARDS_RC_BUILD_NUMBER}"),
string(name: 'RELEASE_VERSION', value: "${params.RELEASE_VERSION}"),
string(name: 'DOCKER_HUB_PROMOTE', value: true),
string(name: 'ECR_PROMOTE', value: true),
string(name: 'TAG_LATEST', value: "${params.TAG_DOCKER_LATEST}"),
string(name: 'TAG_MAJOR_VERSION', value: true)
booleanParam(name: 'DOCKER_HUB_PROMOTE', value: true),
booleanParam(name: 'ECR_PROMOTE', value: true),
booleanParam(name: 'TAG_LATEST', value: "${params.TAG_DOCKER_LATEST}"),
booleanParam(name: 'TAG_MAJOR_VERSION', value: true)
]
echo 'Promoted Docker successfully!'
}
Expand Down
8 changes: 4 additions & 4 deletions tests/jenkins/TestOpenSearchReleasePromotionTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ class TestOpenSearchReleasePromotionTest extends BuildPipelineTest {
assertCallStack().contains('stage(Promote Docker, groovy.lang.Closure)')
assertCallStack().contains('release-promotion.string({name=SOURCE_IMAGES, value=opensearch:1.0.0.2050, opensearch-dashboards:1.0.0.3050})')
assertCallStack().contains('release-promotion.string({name=RELEASE_VERSION, value=1.0.0})')
assertCallStack().contains('release-promotion.string({name=DOCKER_HUB_PROMOTE, value=true})')
assertCallStack().contains('release-promotion.string({name=ECR_PROMOTE, value=true})')
assertCallStack().contains('release-promotion.string({name=TAG_LATEST, value=true})')
assertCallStack().contains('release-promotion.string({name=TAG_MAJOR_VERSION, value=true})')
assertCallStack().contains('release-promotion.booleanParam({name=DOCKER_HUB_PROMOTE, value=true})')
assertCallStack().contains('release-promotion.booleanParam({name=ECR_PROMOTE, value=true})')
assertCallStack().contains('release-promotion.booleanParam({name=TAG_LATEST, value=true})')
assertCallStack().contains('release-promotion.booleanParam({name=TAG_MAJOR_VERSION, value=true})')
assertCallStack().contains('release-promotion.build({job=docker-promotion, wait=true, parameters=[null, null, null, null, null, null]})')

// Validation Workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,10 @@
release-promotion.echo(Triggering docker promotion)
release-promotion.string({name=SOURCE_IMAGES, value=opensearch:1.0.0.2050, opensearch-dashboards:1.0.0.3050})
release-promotion.string({name=RELEASE_VERSION, value=1.0.0})
release-promotion.string({name=DOCKER_HUB_PROMOTE, value=true})
release-promotion.string({name=ECR_PROMOTE, value=true})
release-promotion.string({name=TAG_LATEST, value=true})
release-promotion.string({name=TAG_MAJOR_VERSION, value=true})
release-promotion.booleanParam({name=DOCKER_HUB_PROMOTE, value=true})
release-promotion.booleanParam({name=ECR_PROMOTE, value=true})
release-promotion.booleanParam({name=TAG_LATEST, value=true})
release-promotion.booleanParam({name=TAG_MAJOR_VERSION, value=true})
release-promotion.build({job=docker-promotion, wait=true, parameters=[null, null, null, null, null, null]})
release-promotion.echo(Promoted Docker successfully!)
release-promotion.stage(Validate the artifacts, groovy.lang.Closure)
Expand Down

0 comments on commit 0f6eec9

Please sign in to comment.