Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

DDEPLOY-931: Create trigger for jenkins build when new helm chart is pushed in incubator #155

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
a821ee8
Create triggerJenkins.yml
Feb 6, 2020
18e5fe1
Update triggerJenkins.yml
Feb 6, 2020
b1ab3cc
Update triggerJenkins.yml
Feb 6, 2020
269e65f
Update triggerJenkins.yml
Feb 6, 2020
fc1e6a9
Update triggerJenkins.yml
Feb 6, 2020
d1b1459
Update triggerJenkins.yml
Feb 6, 2020
fdae7dd
Update triggerJenkins.yml
Feb 6, 2020
65ac85b
Update triggerJenkins.yml
Feb 6, 2020
4a7bb13
Update triggerJenkins.yml
Feb 6, 2020
9c4dd60
Update Chart.yaml
Feb 6, 2020
a7e9b08
Update Chart.yaml
Feb 6, 2020
f46efaa
Try pull request comment trigger
Feb 7, 2020
77cc95c
Update triggerJenkins.yml
Feb 7, 2020
6b2fca6
Update triggerJenkins.yml
Feb 7, 2020
3ebaba1
Update triggerJenkins.yml
Feb 7, 2020
5544542
Update triggerJenkins.yml
Feb 7, 2020
d4cc949
Update triggerJenkins.yml
Feb 7, 2020
aa7036e
Update triggerJenkins.yml
Feb 7, 2020
c3a4c23
Update triggerJenkins.yml
Feb 7, 2020
7b540ea
Update triggerJenkins.yml
Feb 7, 2020
60849e6
DEPLOY-931: Update jenkins trigger to start on pull_request opened or…
ehardon Feb 13, 2020
1b08ff6
DEPLOY-931: Update jenkins trigger to start on pull_request opened or…
ehardon Feb 13, 2020
f60ec4c
DEPLOY-931: Update trigger to start on push events and send the event…
ehardon Feb 14, 2020
df69c08
DEPLOY-931: Update trigger step to extract event
ehardon Feb 14, 2020
fa62045
DEPLOY-931: Remove trigger step to extract event
ehardon Feb 14, 2020
0ae9e38
DEPLOY-931: Extract event head branch
ehardon Feb 14, 2020
50ac19d
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
a41889e
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
63b190a
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
a235844
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
cde0c2f
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
0f9214e
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
5ea28b1
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
43b580c
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
7c5e95e
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
583054f
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
8f50df0
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
fe2519b
DEPLOY-931: Extract event base_Ref
ehardon Feb 14, 2020
dbe62ec
DEPLOY-931: Check issue events
ehardon Feb 14, 2020
aaa8895
DEPLOY-931: Check issue events
ehardon Feb 14, 2020
ac73ff2
DEPLOY-931: Check check_suite events
ehardon Feb 14, 2020
4b4ce3f
DEPLOY-931: Check check_suite events
ehardon Feb 14, 2020
8cd40ed
DEPLOY-931: Check pull_request events
ehardon Feb 14, 2020
df2daad
DEPLOY-931: Check pull_request events
ehardon Feb 14, 2020
76fe014
DEPLOY-931: Remove Event extraction step
ehardon Feb 17, 2020
a175214
DEPLOY-931: TRigger after check_run is completed and status is passed
ehardon Feb 17, 2020
f30a413
DEPLOY-931: TRigger after status is passed
ehardon Feb 17, 2020
831f680
DEPLOY-931: TRigger on dispatch event
ehardon Feb 17, 2020
937f1a3
DEPLOY-931: TRigger on dispatch event
ehardon Feb 17, 2020
e9b1577
DEPLOY-931: TRigger on status event
ehardon Feb 17, 2020
8380f22
DEPLOY-931: Try repository-dispatch
ehardon Feb 17, 2020
fa71e33
DEPLOY-931: Try repository-dispatch
ehardon Feb 17, 2020
84c794c
DEPLOY-931: Try repository-dispatch
ehardon Feb 17, 2020
28c5539
DEPLOY-931: Try repository-dispatch event
ehardon Feb 17, 2020
800ad16
DEPLOY-931: Try repository-dispatch event with conditionals based on …
ehardon Feb 18, 2020
36c331f
DEPLOY-931: Modify github secret names
ehardon Feb 18, 2020
d39b179
DEPLOY-931: Removed unused workflow
ehardon Feb 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/jenkinsBuildTrigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
repository_dispatch:
types: [bamboo-build]


jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Check if branch is involved in a PR
shell: bash
env:
BRANCH: ${{github.event.client_payload.ref}}
run: |
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

- name: Checkout branch
uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.ref }}
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
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
if: steps.check_prs.outputs.prs == 1
run: |
BRANCH=${{ github.event.client_payload.ref }}
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"