Skip to content

Commit 4be8f12

Browse files
committed
replaces configure script with ciinaboxVPC step and allow override the branch of the bakery to checkout
1 parent f6e9ef2 commit 4be8f12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vars/bakeAMI.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def call(body) {
5252
node {
5353
println "bake config:${config}"
5454
deleteDir()
55-
git(url: 'https://github.com/base2Services/ciinabox-bakery.git', branch: 'master')
55+
git(url: 'https://github.com/base2Services/ciinabox-bakery.git', branch: config.get('ciinaboxBakeryBranch', 'master'))
5656
def sourceAMI = lookupAMI config
5757
def branchName = env.BRANCH_NAME.replaceAll("/", "-")
5858
bakeEnv << "SOURCE_AMI=${sourceAMI}"
5959
bakeEnv << "BRANCH=${branchName}"
6060
withEnv(bakeEnv) {
61-
sh './configure $CIINABOX_NAME $REGION $AMI_USERS'
61+
ciinaboxVPC config
6262

6363
if(skipCookbookUpload) {
6464
sh 'mkdir -p cookbooks'
@@ -76,6 +76,7 @@ def call(body) {
7676
'''
7777
sh '''#!/bin/bash
7878
AMI_BUILD_ID=${BRANCH}-${AMI_BUILD_NUMBER}
79+
OPT_VARS="-var ami_users=${AMI_USERS}"
7980
echo "==================================================="
8081
echo "Baking AMI: ${ROLE}"
8182
exho "AMI Build NO: ${AMI_BUILD_ID}"

0 commit comments

Comments
 (0)