Skip to content

Commit 4d8ca77

Browse files
committed
Updated jenkins script
1 parent 995d534 commit 4d8ca77

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.citd/Jenkinsfilek8s

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ pipeline {
1515
BITBUCKET_CREDENTIAL_ID = 'BITBUCKET_INTERNAL_TOKEN'
1616
GITHUB_PRODUCTION_DEPLOY_URL ='https://github.com/microchip-pic-avr-examples'
1717
GITHUB_TEST_DEPLOY_URL ='https://github.com/mchpTestArea'
18-
//Selects the deployment URL(production or test) based on the merge target branch, selects "microchip-pic-avr-examples" if target branch is "master" else selects "mchpTestArea"
19-
GITHUB_URL = "${env.BRANCH_NAME == 'master' ? env.GITHUB_PRODUCTION_DEPLOY_URL : env.GITHUB_TEST_DEPLOY_URL}"
20-
GITHUB_CREDENTIAL_ID = 'GITHUB_PIC_AVR_TEST_TOKEN'
21-
GITHUB_PRODUCTION_DEPLOY_CREDENTIAL_ID=''
22-
GITHUB_TEST_DEPLOY_CREDENTIAL_ID=''
18+
//Selects the deployment URL(production or test) based on the merge target branch, selects "microchip-pic-avr-examples" if target branch is "master" , if target branch is "test_deploy" selects "mchpTestArea"
19+
GITHUB_URL = ("${env.BRANCH_NAME" == "master") ? GITHUB_PRODUCTION_DEPLOY_URL : ("${env.BRANCH_NAME" == "test_deploy") ? GITHUB_TEST_DEPLY_URL : null
20+
GITHUB_PRODUCTION_DEPLOY_CREDENTIAL_ID='GITHUB_MICROCHIP_PIC_AVR_EXAMPLES_TOKEN'
21+
GITHUB_TEST_DEPLOY_CREDENTIAL_ID='GITHUB_PIC_AVR_TEST_TOKEN'
22+
GITHUB_CREDENTIAL_ID = ("${env.BRANCH_NAME" == "master") ? GITHUB_PRODUCTION_DEPLOY_CREDENTIAL_ID : ("${env.BRANCH_NAME" == "test_deploy") ? GITHUB_TEST_DEPLOY_CREDENTIAL_ID : null
2323
//Files or folders to be excluded from deployment, if multiple files or folders use comma separator
2424
DEPLOY_EXCLUDE_FOLDER_FILE_LIST = 'mchp_private'
2525
//Branch(s) to be deployed, if multiple branches use comma separator. ${env.BRANCH_NAME} is the target branch of the PR.
@@ -45,6 +45,8 @@ pipeline {
4545
stage('Build') {
4646
steps {
4747
script {
48+
echo "${env.GITHUB_URL}"
49+
echo "${env.GITHUB_CREDENTIAL_ID}"
4850
execute("git clone https://bitbucket.microchip.com/scm/citd/tool-mplabx-c-build.git")
4951
execute("cd ./tool-mplabx-c-build && node buildLauncher.js sp=../ rp=./output genMK=true")
5052
}

0 commit comments

Comments
 (0)