From a821ee8a416a49d74b7f79ee705f5a6c5dc48f4b Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 15:32:18 +0200 Subject: [PATCH 01/57] Create triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/triggerJenkins.yml diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml new file mode 100644 index 0000000..be541a0 --- /dev/null +++ b/.github/workflows/triggerJenkins.yml @@ -0,0 +1,21 @@ +name: CI + +on: [pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - uses: actions/checkout@v2 + - name: Run a one-line script + run: echo Hello, world! + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 18e5fe161cdda216f17265ddc976e33f6c1dfaad Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 15:34:48 +0200 Subject: [PATCH 02/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index be541a0..63eab85 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,6 @@ name: CI -on: [pull_request] +on: [push,pull_request] jobs: build: From b1ab3cc2d90515564ad147ac7c80c1a8d90ecf3c Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:03:54 +0200 Subject: [PATCH 03/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 63eab85..b267fa0 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -12,10 +12,7 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - uses: actions/checkout@v2 - - name: Run a one-line script - run: echo Hello, world! - - name: Run a multi-line script + - name: Trigger Alfresco DBP Pipeline run: | - echo Add other actions to build, - echo test, and deploy your project. + echo ${{ steps.extract_branch.outputs.branch }} + echo "Hello World!" From 269e65fdf1a1b0dcb9f8434f2f3e12a38190db9d Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:10:13 +0200 Subject: [PATCH 04/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index b267fa0..087803a 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -14,5 +14,6 @@ jobs: id: extract_branch - name: Trigger Alfresco DBP Pipeline run: | - echo ${{ steps.extract_branch.outputs.branch }} - echo "Hello World!" + BRANCH=${{ steps.extract_branch.outputs.branch }} + CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/DEPLOY-932/buildWithParameters?BRANCH_NAME=$BRANCH' From fc1e6a915900bf3adc64de905d7b42d9cf3f8556 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:36:49 +0200 Subject: [PATCH 05/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 087803a..bbed9f9 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -12,8 +12,17 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Checkout + uses: actions/checkout@v1 + - name: Get Chart Version + shell: bash + run: | + cd alfresco-dbp-deployment/helm/alfresco-dbp + version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) + echo "Chart version: "+$version + echo "::set-output name=CHART_VERSION::$version" - name: Trigger Alfresco DBP Pipeline run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/DEPLOY-932/buildWithParameters?BRANCH_NAME=$BRANCH' + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?BRANCH_NAME=$BRANCH' From d1b1459b2a06df3bb2bb1630b7e17a54c3573b88 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:38:09 +0200 Subject: [PATCH 06/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index bbed9f9..d714d6b 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -17,7 +17,7 @@ jobs: - name: Get Chart Version shell: bash run: | - cd alfresco-dbp-deployment/helm/alfresco-dbp + cd helm/alfresco-dbp version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) echo "Chart version: "+$version echo "::set-output name=CHART_VERSION::$version" From fdae7dd513d9ed925c4342205b594ddc6ac36e5a Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:42:19 +0200 Subject: [PATCH 07/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index d714d6b..288aaf4 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -19,10 +19,12 @@ jobs: run: | cd helm/alfresco-dbp version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) - echo "Chart version: "+$version + echo "Chart version: "$version echo "::set-output name=CHART_VERSION::$version" + id: get_chart_version - name: Trigger Alfresco DBP Pipeline run: | BRANCH=${{ steps.extract_branch.outputs.branch }} + CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?BRANCH_NAME=$BRANCH' + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?CHART_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH' From 65ac85bdad19c76aeabcc2e82c6f0ccc2adda5b5 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:44:49 +0200 Subject: [PATCH 08/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 288aaf4..71fe730 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -27,4 +27,4 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?CHART_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH' + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH' From 4a7bb134f2a14db063a7018f01349a51b2f936b4 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:47:59 +0200 Subject: [PATCH 09/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 71fe730..9bef7f1 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -27,4 +27,4 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" 'http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH' + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" From 9c4dd60edc486f0510dd9b6284bec3cc954b6131 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 16:51:13 +0200 Subject: [PATCH 10/57] Update Chart.yaml --- helm/alfresco-dbp/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/alfresco-dbp/Chart.yaml b/helm/alfresco-dbp/Chart.yaml index 31a904e..ee76e9e 100644 --- a/helm/alfresco-dbp/Chart.yaml +++ b/helm/alfresco-dbp/Chart.yaml @@ -1,5 +1,5 @@ name: alfresco-dbp -version: 1.6.0-SNAPSHOT +version: 1.6.0-SNAPSHOT-DEPLOY-931 description: A Helm chart for the Alfresco Digital Business Platform keywords: - alfresco From a7e9b0891e51fd7395c9a017f5fa965d4023d8ce Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Thu, 6 Feb 2020 17:06:14 +0200 Subject: [PATCH 11/57] Update Chart.yaml --- helm/alfresco-dbp/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/alfresco-dbp/Chart.yaml b/helm/alfresco-dbp/Chart.yaml index ee76e9e..a6ee7a5 100644 --- a/helm/alfresco-dbp/Chart.yaml +++ b/helm/alfresco-dbp/Chart.yaml @@ -1,5 +1,5 @@ name: alfresco-dbp -version: 1.6.0-SNAPSHOT-DEPLOY-931 +version: 1.6.0-SNAPSHOT-DEPLOY-931-2 description: A Helm chart for the Alfresco Digital Business Platform keywords: - alfresco From f46efaa1c4ff33f2488ac24a9e24ac0ef2a4da00 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 12:56:17 +0200 Subject: [PATCH 12/57] Try pull request comment trigger --- .github/workflows/triggerJenkins.yml | 55 +++++++++++++++++----------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 9bef7f1..8da2f54 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,10 @@ name: CI -on: [push,pull_request] +on: + pull_request: + types: [opened] + issue_comment: + types: [created] jobs: build: @@ -8,23 +12,32 @@ jobs: runs-on: ubuntu-latest steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Checkout - uses: actions/checkout@v1 - - name: Get Chart Version - shell: bash - run: | - cd helm/alfresco-dbp - version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) - echo "Chart version: "$version - echo "::set-output name=CHART_VERSION::$version" - id: get_chart_version - - name: Trigger Alfresco DBP Pipeline - run: | - BRANCH=${{ steps.extract_branch.outputs.branch }} - CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" + - uses: khan/pull-request-comment-trigger@master + id: check + with: + trigger: '@test' +# reaction: rocket + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + - run: 'echo Found it!' + if: steps.check.outputs.triggered == 'true' +# - name: Extract branch name +# shell: bash +# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" +# id: extract_branch +# - name: Checkout +# uses: actions/checkout@v1 +# - name: Get Chart Version +# shell: bash +# run: | +# cd helm/alfresco-dbp +# version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) +# echo "Chart version: "$version +# echo "::set-output name=CHART_VERSION::$version" +# id: get_chart_version +# - name: Trigger Alfresco DBP Pipeline +# run: | +# BRANCH=${{ steps.extract_branch.outputs.branch }} +# CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} +# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') +# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" From 77cc95c0ff5b8b073c60ded92a1924a2fb6e4d6a Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 13:46:41 +0200 Subject: [PATCH 13/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 8da2f54..e2af7bf 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -18,7 +18,7 @@ jobs: trigger: '@test' # reaction: rocket env: - GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + GITHUB_TOKEN: '${{ secrets.GITHUBTOKEN }}' - run: 'echo Found it!' if: steps.check.outputs.triggered == 'true' # - name: Extract branch name From 6b2fca6bb0aea06e2144f2cb9fc94397c5f3541d Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 13:54:43 +0200 Subject: [PATCH 14/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 31 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index e2af7bf..de88e32 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -12,15 +12,28 @@ jobs: runs-on: ubuntu-latest steps: - - uses: khan/pull-request-comment-trigger@master - id: check - with: - trigger: '@test' -# reaction: rocket - env: - GITHUB_TOKEN: '${{ secrets.GITHUBTOKEN }}' - - run: 'echo Found it!' - if: steps.check.outputs.triggered == 'true' + - name: listen for PR Comments + uses: machine-learning-apps/actions-chatops@master + with: + TRIGGER_PHRASE: "/test-trigger-comment" + env: # you must supply GITHUB_TOKEN + GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} + id: prcomm + # This step clones the branch of the PR associated with the triggering phrase, but only if it is triggered. + - name: clone branch of PR + if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true' + uses: actions/checkout@master + with: + ref: ${{ steps.prcomm.outputs.SHA }} + + # This step is a toy example that illustrates how you can use outputs from the pr-command action + - name: print variables + if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true' + run: echo "${USERNAME} made a triggering comment on PR# ${PR_NUMBER} for ${BRANCH_NAME}" + env: + BRANCH_NAME: ${{ steps.prcomm.outputs.BRANCH_NAME }} + PR_NUMBER: ${{ steps.prcomm.outputs.PULL_REQUEST_NUMBER }} + USERNAME: ${{ steps.prcomm.outputs.COMMENTER_USERNAME }} # - name: Extract branch name # shell: bash # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" From 3ebaba1d62ab8e6aff380b9f942cbdc8c5bf53d2 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 16:59:14 +0200 Subject: [PATCH 15/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 35 ++++------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index de88e32..ffef57f 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,10 +1,7 @@ name: CI on: - pull_request: - types: [opened] - issue_comment: - types: [created] + status jobs: build: @@ -12,32 +9,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: listen for PR Comments - uses: machine-learning-apps/actions-chatops@master - with: - TRIGGER_PHRASE: "/test-trigger-comment" - env: # you must supply GITHUB_TOKEN - GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} - id: prcomm - # This step clones the branch of the PR associated with the triggering phrase, but only if it is triggered. - - name: clone branch of PR - if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true' - uses: actions/checkout@master - with: - ref: ${{ steps.prcomm.outputs.SHA }} - - # This step is a toy example that illustrates how you can use outputs from the pr-command action - - name: print variables - if: steps.prcomm.outputs.BOOL_TRIGGERED == 'true' - run: echo "${USERNAME} made a triggering comment on PR# ${PR_NUMBER} for ${BRANCH_NAME}" - env: - BRANCH_NAME: ${{ steps.prcomm.outputs.BRANCH_NAME }} - PR_NUMBER: ${{ steps.prcomm.outputs.PULL_REQUEST_NUMBER }} - USERNAME: ${{ steps.prcomm.outputs.COMMENTER_USERNAME }} -# - name: Extract branch name -# shell: bash -# run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" -# id: extract_branch + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch # - name: Checkout # uses: actions/checkout@v1 # - name: Get Chart Version From 554454271216de3dd046838a28d2031680983789 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 17:02:02 +0200 Subject: [PATCH 16/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index ffef57f..024bd29 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,8 @@ name: CI on: - status + check_run: + types: [completed] jobs: build: From d4cc949056c0aff4753a4693fa5e4898c34f5599 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 17:16:24 +0200 Subject: [PATCH 17/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 024bd29..fc40758 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -14,19 +14,19 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch -# - name: Checkout -# uses: actions/checkout@v1 -# - name: Get Chart Version -# shell: bash -# run: | -# cd helm/alfresco-dbp -# version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) -# echo "Chart version: "$version -# echo "::set-output name=CHART_VERSION::$version" -# id: get_chart_version -# - name: Trigger Alfresco DBP Pipeline -# run: | -# BRANCH=${{ steps.extract_branch.outputs.branch }} -# CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} -# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') -# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" + - name: Checkout + uses: actions/checkout@v1 + - name: Get Chart Version + shell: bash + run: | + cd helm/alfresco-dbp + version=$(sed -n 's/^version:[[:space:]]*//p' Chart.yaml) + echo "Chart version: "$version + echo "::set-output name=CHART_VERSION::$version" + id: get_chart_version + - name: Trigger Alfresco DBP Pipeline + run: | + BRANCH=${{ steps.extract_branch.outputs.branch }} + CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} + CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" From aa7036e4f965e4ac6b53d4282068a1e8a376dad0 Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 17:19:03 +0200 Subject: [PATCH 18/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index fc40758..9bef7f1 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,8 +1,6 @@ name: CI -on: - check_run: - types: [completed] +on: [push,pull_request] jobs: build: From c3a4c23aba2d8c2fddffb79b727a2b225a45bd1c Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 17:35:22 +0200 Subject: [PATCH 19/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 9bef7f1..be6b4aa 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,7 @@ name: CI -on: [push,pull_request] +on: + status: "success" jobs: build: From 7b540ea3322ef3c1850b91030a44940edfd28ddf Mon Sep 17 00:00:00 2001 From: Cristina Sirbu Date: Fri, 7 Feb 2020 17:36:19 +0200 Subject: [PATCH 20/57] Update triggerJenkins.yml --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index be6b4aa..cc8b162 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - status: "success" + status jobs: build: From 60849e6552041226d4b5aed7fc5cbfa9e5786904 Mon Sep 17 00:00:00 2001 From: ehardon Date: Thu, 13 Feb 2020 14:32:53 +0200 Subject: [PATCH 21/57] DEPLOY-931: Update jenkins trigger to start on pull_request opened or edited --- .github/workflows/triggerJenkins.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index cc8b162..89fc4c3 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,8 @@ name: CI on: - status + pull_request: + types: [opened, edited] jobs: build: From 1b08ff61a23bc8bf35c76f16fb7c881e250fb60c Mon Sep 17 00:00:00 2001 From: ehardon Date: Thu, 13 Feb 2020 14:56:08 +0200 Subject: [PATCH 22/57] DEPLOY-931: Update jenkins trigger to start on pull_request opened or synchronized --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 89fc4c3..6aac323 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -2,7 +2,7 @@ name: CI on: pull_request: - types: [opened, edited] + types: [opened, synchronized] jobs: build: From f60ec4c93d1372d335cb9ae8d0c3bb0241b436f1 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 11:11:28 +0200 Subject: [PATCH 23/57] DEPLOY-931: Update trigger to start on push events and send the event payload to jenkins --- .github/workflows/triggerJenkins.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 6aac323..b4a301d 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,8 +1,7 @@ name: CI on: - pull_request: - types: [opened, synchronized] + push jobs: build: @@ -14,6 +13,10 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Extract event + shell: bash + run: echo "##[set-output name=event;]$(echo ${GITHUB_EVENT_PATH})" + id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -29,4 +32,4 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From df69c08317949926ec0fd3cac469db9bb198db73 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 11:24:35 +0200 Subject: [PATCH 24/57] DEPLOY-931: Update trigger step to extract event --- .github/workflows/triggerJenkins.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index b4a301d..ca160a8 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -15,7 +15,8 @@ jobs: id: extract_branch - name: Extract event shell: bash - run: echo "##[set-output name=event;]$(echo ${GITHUB_EVENT_PATH})" + run: | + echo "::set-output name=EVENT::${GITHUB_EVENT_PATH}" id: extract_event - name: Checkout uses: actions/checkout@v1 From fa62045f9268818d9b65182273b70e5318f5491a Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 11:33:38 +0200 Subject: [PATCH 25/57] DEPLOY-931: Remove trigger step to extract event --- .github/workflows/triggerJenkins.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index ca160a8..0d0603d 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -13,11 +13,6 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Extract event - shell: bash - run: | - echo "::set-output name=EVENT::${GITHUB_EVENT_PATH}" - id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -32,5 +27,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} + EVENT=${{github.event}} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From 0ae9e38159da64bdb2141248938a693c1a3fe773 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 11:52:29 +0200 Subject: [PATCH 26/57] DEPLOY-931: Extract event head branch --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 0d0603d..f31cf26 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -27,6 +27,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{github.event}} + EVENT=${{github.event.head}} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From 50ac19d614181967cf78fc4951d086f643f1fe9c Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 11:55:36 +0200 Subject: [PATCH 27/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index f31cf26..f5ae3e0 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -27,6 +27,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{github.event.head}} + EVENT=${{ github.base_ref }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From a41889ef4da9826b0be33789e7bb03299f61e9f6 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:02:47 +0200 Subject: [PATCH 28/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index f5ae3e0..eadecf4 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -27,6 +27,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ github.base_ref }} + EVENT=${{ GITHUB_BASE_REF }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From 63b190a724f1330b67dea098b811ae4561a247fc Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:16:08 +0200 Subject: [PATCH 29/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index eadecf4..3a16666 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -13,6 +13,10 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Extract base ref + shell: bash + run: echo "##[set-output name=base_ref;]$(echo ${GITHUB_BASE_REF})" + id: extract_base_ref - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -27,6 +31,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ GITHUB_BASE_REF }} + BASE_REF=${{ steps.extract_base_ref.outputs.base_ref }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&BASE_REF=$BASE_REF" From a235844864c081ad1921c56ab4b7af98bcdc0324 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:26:41 +0200 Subject: [PATCH 30/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 3a16666..5e4926c 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -13,10 +13,10 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Extract base ref + - name: Extract event shell: bash - run: echo "##[set-output name=base_ref;]$(echo ${GITHUB_BASE_REF})" - id: extract_base_ref + run: echo "##[set-output name=event;]$(echo ${GITHUB_EVENT_PATH})" + id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -31,6 +31,8 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - BASE_REF=${{ steps.extract_base_ref.outputs.base_ref }} + EVENT=${{ steps.extract_event.outputs.event }} + HEAD_REF=${{ github.head_ref }} + BASE_REF=${{ github.base_ref }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&BASE_REF=$BASE_REF" + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From cde0c2f7e4f628ac1b1808fdbb3a799b7f647d84 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:29:23 +0200 Subject: [PATCH 31/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 5e4926c..1858a6c 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -15,7 +15,7 @@ jobs: id: extract_branch - name: Extract event shell: bash - run: echo "##[set-output name=event;]$(echo ${GITHUB_EVENT_PATH})" + run: echo "##[set-output name=event;]$(cat ${GITHUB_EVENT_PATH})" id: extract_event - name: Checkout uses: actions/checkout@v1 @@ -32,7 +32,7 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.outputs.event }} - HEAD_REF=${{ github.head_ref }} - BASE_REF=${{ github.base_ref }} + HEAD_REF:${{ github.head_ref }} + BASE_REF:${{ github.base_ref }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From 0f9214e7a82c22d3b3bbac2e5f5bdbbdb3c790c3 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:32:01 +0200 Subject: [PATCH 32/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 1858a6c..04213e0 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -32,7 +32,5 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.outputs.event }} - HEAD_REF:${{ github.head_ref }} - BASE_REF:${{ github.base_ref }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From 5ea28b159289ea524b9639b05de90ac5f4ffa12d Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:42:46 +0200 Subject: [PATCH 33/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 04213e0..9602fb1 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + run: echo "##[set-output name=branch;]$(echo $(cat ${GITHUB_REF#refs/heads/}))" id: extract_branch - name: Extract event shell: bash From 43b580cf63bf778dad97195e9af360f1da880d95 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:49:36 +0200 Subject: [PATCH 34/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 9602fb1..c984835 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -11,11 +11,11 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "##[set-output name=branch;]$(echo $(cat ${GITHUB_REF#refs/heads/}))" + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - name: Extract event shell: bash - run: echo "##[set-output name=event;]$(cat ${GITHUB_EVENT_PATH})" + run: echo "##[set-output name=event;]$(echo $(cat ${GITHUB_EVENT_PATH}))" id: extract_event - name: Checkout uses: actions/checkout@v1 From 7c5e95e79f16f6b15ac4d1d29e41d62117b717d6 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:50:54 +0200 Subject: [PATCH 35/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index c984835..bc64e84 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -15,7 +15,7 @@ jobs: id: extract_branch - name: Extract event shell: bash - run: echo "##[set-output name=event;]$(echo $(cat ${GITHUB_EVENT_PATH}))" + run: echo "##[set-output name=event;]$(echo "$(cat ${GITHUB_EVENT_PATH})")" id: extract_event - name: Checkout uses: actions/checkout@v1 From 583054f7814d59b37366f3cef49eb8b67a97073c Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:57:22 +0200 Subject: [PATCH 36/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index bc64e84..770a7a9 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -15,7 +15,7 @@ jobs: id: extract_branch - name: Extract event shell: bash - run: echo "##[set-output name=event;]$(echo "$(cat ${GITHUB_EVENT_PATH})")" + run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" id: extract_event - name: Checkout uses: actions/checkout@v1 From 8f50df0b5b95a55c82573b615e92a6f71369237a Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 12:57:40 +0200 Subject: [PATCH 37/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 770a7a9..29ab6b8 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -32,5 +32,5 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.outputs.event }} - CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" +# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') +# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" From fe2519b322fe82e96be15b09bcb27e2dfc0c03fa Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:02:31 +0200 Subject: [PATCH 38/57] DEPLOY-931: Extract event base_Ref --- .github/workflows/triggerJenkins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 29ab6b8..6a38b25 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -32,5 +32,5 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.outputs.event }} -# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') -# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" + CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file From dbe62ec62f1d307fcb91f7a95c8e2766bebb04a9 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:32:38 +0200 Subject: [PATCH 39/57] DEPLOY-931: Check issue events --- .github/workflows/triggerJenkins.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 6a38b25..10d8e97 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - push + issue jobs: build: @@ -32,5 +32,5 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.outputs.event }} - CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file +# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') +# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file From aaa88953ef6d9cdcd16f8ae4b48c5e5aa64cddb5 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:33:29 +0200 Subject: [PATCH 40/57] DEPLOY-931: Check issue events --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 10d8e97..6bd536a 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - issue + issues jobs: build: From ac73ff2c568e59d001c29edf29cab5855b4b34b0 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:38:31 +0200 Subject: [PATCH 41/57] DEPLOY-931: Check check_suite events --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 6bd536a..e3d676a 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - issues + check_suite jobs: build: From 4b4ce3f4e8a2c08651fb82b9b27aebcea5fa973f Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:45:24 +0200 Subject: [PATCH 42/57] DEPLOY-931: Check check_suite events --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index e3d676a..4421c7d 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - check_suite + pull_request jobs: build: From 8cd40ed2f7d3ae24dfb521e02d9dc885b4aea96e Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:49:26 +0200 Subject: [PATCH 43/57] DEPLOY-931: Check pull_request events --- .github/workflows/triggerJenkins.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 4421c7d..8c46677 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,8 @@ name: CI on: - pull_request + pull_request: + types: [synchronize, opened] jobs: build: @@ -31,6 +32,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ steps.extract_event.outputs.event }} -# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') -# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file + EVENT=${{ githiub.event.pull_request.action }} + CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file From df2daadf7358fde621381208b531acf77a497146 Mon Sep 17 00:00:00 2001 From: ehardon Date: Fri, 14 Feb 2020 13:50:04 +0200 Subject: [PATCH 44/57] DEPLOY-931: Check pull_request events --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 8c46677..41eff94 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -32,6 +32,6 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ githiub.event.pull_request.action }} + EVENT=${{ github.event.pull_request.action }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file From 76fe0142335fc0512c555a440903e02d1eb9217a Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 11:37:12 +0200 Subject: [PATCH 45/57] DEPLOY-931: Remove Event extraction step --- .github/workflows/triggerJenkins.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 41eff94..6fcc435 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -14,10 +14,6 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Extract event - shell: bash - run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" - id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -32,6 +28,5 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ github.event.pull_request.action }} CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH&&EVENT=$EVENT" \ No newline at end of file + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&DBP_DEPLOYMENT_BRANCH_NAME=$BRANCH" \ No newline at end of file From a1752147be6cb3349ff366358b88c5fb92321ef5 Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 12:06:18 +0200 Subject: [PATCH 46/57] DEPLOY-931: TRigger after check_run is completed and status is passed --- .github/workflows/triggerJenkins.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 6fcc435..31f2cda 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,8 +1,8 @@ name: CI on: - pull_request: - types: [synchronize, opened] + check_run: + types: [completed] jobs: build: @@ -14,6 +14,14 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Extract event + shell: bash + run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" + id: extract_event + - name: Extract check run status + shell: bash + run: echo "##[set-output name=status;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" + id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -28,5 +36,7 @@ jobs: run: | BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') - curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&DBP_DEPLOYMENT_BRANCH_NAME=$BRANCH" \ No newline at end of file + EVENT=${{ steps.extract_event.event }} + CHECK_RUN_STATUS= ${{ event.check_run[status] }} +# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') +# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" \ No newline at end of file From f30a413c34870c58d7c7bf1d1eff8f0a7fe41796 Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 12:19:58 +0200 Subject: [PATCH 47/57] DEPLOY-931: TRigger after status is passed --- .github/workflows/triggerJenkins.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 31f2cda..7b29bb6 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,8 +1,7 @@ name: CI on: - check_run: - types: [completed] + status jobs: build: @@ -37,6 +36,6 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.event }} - CHECK_RUN_STATUS= ${{ event.check_run[status] }} + CHECK_RUN_STATUS= ${{ github.event.status.state }} # CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') # curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" \ No newline at end of file From 831f680ac7ca2d406eecd3358ce003906f1b9aaa Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 12:32:49 +0200 Subject: [PATCH 48/57] DEPLOY-931: TRigger on dispatch event --- .github/workflows/triggerJenkins.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 7b29bb6..a69e878 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,7 @@ name: CI on: - status + repository_dispatch jobs: build: @@ -17,10 +17,6 @@ jobs: shell: bash run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" id: extract_event - - name: Extract check run status - shell: bash - run: echo "##[set-output name=status;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" - id: extract_event - name: Checkout uses: actions/checkout@v1 - name: Get Chart Version @@ -36,6 +32,5 @@ jobs: BRANCH=${{ steps.extract_branch.outputs.branch }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} EVENT=${{ steps.extract_event.event }} - CHECK_RUN_STATUS= ${{ github.event.status.state }} # CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') # curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" \ No newline at end of file From 937f1a33ab196f872d58ad416d1853bdbf64b1be Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 12:35:39 +0200 Subject: [PATCH 49/57] DEPLOY-931: TRigger on dispatch event --- .github/workflows/triggerJenkins.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index a69e878..b39e444 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,7 +1,6 @@ name: CI -on: - repository_dispatch +on: repository_dispatch jobs: build: From e9b1577b032cab110ceec170d5067df378ff15af Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 12:57:07 +0200 Subject: [PATCH 50/57] DEPLOY-931: TRigger on status event --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index b39e444..aaff241 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,6 @@ name: CI -on: repository_dispatch +on: status jobs: build: From 8380f2293b0875c40f1103d6d51d8e7e57316eb0 Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 14:45:16 +0200 Subject: [PATCH 51/57] DEPLOY-931: Try repository-dispatch --- .github/workflows/triggerJenkins.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index aaff241..2a57cbe 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,6 @@ name: CI -on: status +on: repository_dispatch jobs: build: @@ -12,6 +12,11 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.event.client_payload.ref }} + run: echo ${{ github.event.client_payload.ref }} - name: Extract event shell: bash run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" From fa71e3317366bdfba5903f873161e1c70acc4e85 Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 14:47:15 +0200 Subject: [PATCH 52/57] DEPLOY-931: Try repository-dispatch --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index 2a57cbe..bd54c79 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v2 with: ref: ${{ github.event.client_payload.ref }} - run: echo ${{ github.event.client_payload.ref }} + - run: echo ${{ github.event.client_payload.ref }} - name: Extract event shell: bash run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" From 84c794c1fc735e199cf6c43c3cebc0faafffaf51 Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 14:53:40 +0200 Subject: [PATCH 53/57] DEPLOY-931: Try repository-dispatch --- .github/workflows/triggerJenkins.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index bd54c79..fbf7457 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -1,6 +1,9 @@ name: CI -on: repository_dispatch +on: + repository_dispatch: + types: [build-test] + jobs: build: @@ -8,15 +11,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - name: Checkout uses: actions/checkout@v2 with: ref: ${{ github.event.client_payload.ref }} - - run: echo ${{ github.event.client_payload.ref }} + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch - name: Extract event shell: bash run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" From 28c55390547e730976c8ec9a9fdaa5810a302e8c Mon Sep 17 00:00:00 2001 From: ehardon Date: Mon, 17 Feb 2020 14:55:22 +0200 Subject: [PATCH 54/57] DEPLOY-931: Try repository-dispatch event --- .github/workflows/testTrigger | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/testTrigger diff --git a/.github/workflows/testTrigger b/.github/workflows/testTrigger new file mode 100644 index 0000000..45013fe --- /dev/null +++ b/.github/workflows/testTrigger @@ -0,0 +1,12 @@ +name: Repository Dispatch +on: + repository_dispatch: + types: [build-test] +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.client_payload.ref }} + - run: echo ${{ github.event.client_payload.ref }} \ No newline at end of file From 800ad169464a073fa9cb1100ce314c9a3e521e72 Mon Sep 17 00:00:00 2001 From: ehardon Date: Tue, 18 Feb 2020 10:31:40 +0200 Subject: [PATCH 55/57] DEPLOY-931: Try repository-dispatch event with conditionals based on opened PR's on a certain branch --- .github/workflows/triggerJenkins.yml | 35 +++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index fbf7457..d10e68e 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -2,7 +2,7 @@ name: CI on: repository_dispatch: - types: [build-test] + types: [bamboo-build] jobs: @@ -11,21 +11,23 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Check if branch is involved in a PR + shell: bash + env: + BRANCH: ${{github.event.client_payload.ref}} + run: | + PRS=$(curl -X GET -u ${{ secrets.GITHUB_USER }}:${{ secrets.GITHUB_TOKEN }} -H "Content-Type: application/vnd.github.v3+json" "https://api.github.com/repos/Alfresco/alfresco-dbp-deployment/pulls?head=Alfresco:$BRANCH" | jq length) + echo "::set-output name=prs::$PRS" + id: check_prs + + - name: Checkout branch uses: actions/checkout@v2 with: ref: ${{ github.event.client_payload.ref }} - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Extract event - shell: bash - run: echo "##[set-output name=event;]$(echo \"$(cat ${GITHUB_EVENT_PATH})\")" - id: extract_event - - name: Checkout - uses: actions/checkout@v1 + if: steps.check_prs.outputs.prs == 1 + - name: Get Chart Version + if: steps.check_prs.outputs.prs == 1 shell: bash run: | cd helm/alfresco-dbp @@ -33,10 +35,11 @@ jobs: echo "Chart version: "$version echo "::set-output name=CHART_VERSION::$version" id: get_chart_version + - name: Trigger Alfresco DBP Pipeline + if: steps.check_prs.outputs.prs == 1 run: | - BRANCH=${{ steps.extract_branch.outputs.branch }} + BRANCH=${{ github.event.client_payload.ref }} CHART_VERSION=${{ steps.get_chart_version.outputs.CHART_VERSION }} - EVENT=${{ steps.extract_event.event }} -# CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') -# curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" \ No newline at end of file + CRUMB=$(curl -u builduser:${{ secrets.JenkinsToken }} 'http://jenkins-jx.jx-ps.dev.alfresco.me/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') + curl -X POST -u builduser:${{ secrets.JenkinsToken }} -H "$CRUMB" "http://jenkins-jx.jx-ps.dev.alfresco.me/job/platform-services/job/alfresco-dbp-test/job/bamboo/buildWithParameters?DBP_VERSION=$CHART_VERSION&&BRANCH_NAME=$BRANCH" \ No newline at end of file From 36c331fbaca846385b2dd8f1728fe52f52d12d90 Mon Sep 17 00:00:00 2001 From: ehardon Date: Tue, 18 Feb 2020 11:18:29 +0200 Subject: [PATCH 56/57] DEPLOY-931: Modify github secret names --- .github/workflows/triggerJenkins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/triggerJenkins.yml index d10e68e..e719561 100644 --- a/.github/workflows/triggerJenkins.yml +++ b/.github/workflows/triggerJenkins.yml @@ -16,7 +16,7 @@ jobs: env: BRANCH: ${{github.event.client_payload.ref}} run: | - PRS=$(curl -X GET -u ${{ secrets.GITHUB_USER }}:${{ secrets.GITHUB_TOKEN }} -H "Content-Type: application/vnd.github.v3+json" "https://api.github.com/repos/Alfresco/alfresco-dbp-deployment/pulls?head=Alfresco:$BRANCH" | jq length) + PRS=$(curl -X GET -u alfresco-build:${{ secrets.GITHUBTOKEN }} -H "Content-Type: application/vnd.github.v3+json" "https://api.github.com/repos/Alfresco/alfresco-dbp-deployment/pulls?head=Alfresco:$BRANCH" | jq length) echo "::set-output name=prs::$PRS" id: check_prs From d39b17996b252d6d0474331ed33bfd9855d52b29 Mon Sep 17 00:00:00 2001 From: ehardon Date: Tue, 18 Feb 2020 11:32:52 +0200 Subject: [PATCH 57/57] DEPLOY-931: Removed unused workflow * updated jenkins workflow file name * revert chart version to default --- .../{triggerJenkins.yml => jenkinsBuildTrigger.yml} | 0 .github/workflows/testTrigger | 12 ------------ helm/alfresco-dbp/Chart.yaml | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) rename .github/workflows/{triggerJenkins.yml => jenkinsBuildTrigger.yml} (100%) delete mode 100644 .github/workflows/testTrigger diff --git a/.github/workflows/triggerJenkins.yml b/.github/workflows/jenkinsBuildTrigger.yml similarity index 100% rename from .github/workflows/triggerJenkins.yml rename to .github/workflows/jenkinsBuildTrigger.yml diff --git a/.github/workflows/testTrigger b/.github/workflows/testTrigger deleted file mode 100644 index 45013fe..0000000 --- a/.github/workflows/testTrigger +++ /dev/null @@ -1,12 +0,0 @@ -name: Repository Dispatch -on: - repository_dispatch: - types: [build-test] -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.client_payload.ref }} - - run: echo ${{ github.event.client_payload.ref }} \ No newline at end of file diff --git a/helm/alfresco-dbp/Chart.yaml b/helm/alfresco-dbp/Chart.yaml index a6ee7a5..31a904e 100644 --- a/helm/alfresco-dbp/Chart.yaml +++ b/helm/alfresco-dbp/Chart.yaml @@ -1,5 +1,5 @@ name: alfresco-dbp -version: 1.6.0-SNAPSHOT-DEPLOY-931-2 +version: 1.6.0-SNAPSHOT description: A Helm chart for the Alfresco Digital Business Platform keywords: - alfresco