Skip to content

Commit

Permalink
Merge pull request #989 from pentaho/hosted-json
Browse files Browse the repository at this point in the history
[CLEANUP] - Triggering GHA build
  • Loading branch information
cardosov authored Jun 28, 2024
2 parents 3773d43 + ed31b12 commit c47c08b
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions resources/builders/suite-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -656,20 +656,27 @@ jobGroups:
script: |
{ ->
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
withCredentials([usernamePassword(credentialsId: '${ARTIFACT_DEPLOYER_CREDENTIALS_ID}',
usernameVariable: 'JF_USER', passwordVariable: 'JF_TOKEN')]) {
def scriptToRun = """\
${WORKSPACE}/scripts/hosted/hosted.groovy \
--rtURL '${ARTIFACTORY_BASE_API_URL}' \
--rtUsername '${JF_USER}' \
--rtPassword '${JF_TOKEN}' \
--deploymentFolder ${DEPLOYMENT_FOLDER} \
--manifest-file ${ARCHIVING_CONFIG} \
--versions-file ${BUILD_CONFIG_ROOT_PATH}/version.properties \
--releaseVersion ${RELEASE_VERSION} \
--isSnapshot true
"""
sh(script: scriptToRun)
withCredentials([string(credentialsId: '${SCM_API_TOKEN_CREDENTIALS_ID}', variable: 'GITHUB_TOKEN')]) {
env.BRANCH_NAME = "${GIT_BRANCH.split("/")[1]}"
def script2Run = """\
# dispatch the github workflow
curl -L \
-X POST \
-H 'Accept: application/vnd.github+json' \
-H 'Authorization: Bearer ${GITHUB_TOKEN}'\
-H 'X-GitHub-Api-Version: 2022-11-28' \
https://api.github.com/repos/pentaho/devops-download-proxy-server/actions/workflows/update-file-mapping-json.yml/dispatches \
-d '{ "ref":"main", \
"inputs":{ \
"deployment-folder":"${DEPLOYMENT_FOLDER} ", \
"is-snapshot":"true", \
"release-version":"${RELEASE_VERSION}", \
"jenkins-pipelines-branch:"${env.BRANCH_NAME}" \
} \
}'
"""
def response = sh(script: script2Run, returnStdout: true).trim()
echo response
}
}
}
Expand Down

0 comments on commit c47c08b

Please sign in to comment.