Skip to content

Commit

Permalink
adding target branch as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosrodlop committed Oct 16, 2024
1 parent 42d9057 commit 56835b4
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions blueprints/02-at-scale/cbci/casc/oc/items.admin-folder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,32 +122,28 @@ items:
concurrentBuild: false
- kind: freeStyle
name: validate-all-casc-bundles
blockBuildWhenDownstreamBuilding: false
blockBuildWhenUpstreamBuilding: false
builders:
- shell:
command: |
casc_repo="https://github.com/cloudbees/terraform-aws-cloudbees-ci-eks-addon"
target_branch="casc"
casc_zip_bundle_path="terraform-aws-cloudbees-ci-eks-addon/blueprints/02-at-scale/cbci/casc-zip/pre-validate-casc.zip"
username="admin_cbci_a"
target_branch="^${TARGET_BRANCH}"
api_token="^${API_TOKEN}"
git clone -b "$target_branch" "$casc_repo"
curl -s -H 'Accept: application/json' -H 'Content-Type: application/zip;charset=utf-8' --user "$username:$api_token" --data-binary @"$casc_zip_bundle_path" -XPOST "^${JENKINS_URL}casc-bundle/pre-validate-bundle"
concurrentBuild: false
description: ''
disabled: false
displayName: validate-all-casc-bundles
label: busybox-L
parameters:
- string:
trim: true
name: API_TOKEN
description: Insert here a valid API TOKEN for user admin_cbci_a
scm:
none: {
}
scmCheckoutStrategy:
standard: {
}
description: API TOKEN for user admin_cbci_a
- string:
trim: true
name: TARGET_BRANCH
description: Branch to validate casc bundles before merging to production branch



0 comments on commit 56835b4

Please sign in to comment.