From e92fbeadc1b762c2ab639ee20d05cbcf89f90c6a Mon Sep 17 00:00:00 2001 From: Dylan Page Date: Mon, 12 Jun 2023 18:47:07 -0400 Subject: [PATCH 1/3] feat(ci): create Jenkinsfile.forge --- Jenkinsfile.forge | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Jenkinsfile.forge diff --git a/Jenkinsfile.forge b/Jenkinsfile.forge new file mode 100644 index 00000000..c9715629 --- /dev/null +++ b/Jenkinsfile.forge @@ -0,0 +1,7 @@ +#! groovy + +node ("aws-centos") { + Checkout() + BuildDocker() + PushDocker() +} From 7ba85e32a30c1dd4ce2cef71b6109bcb6b093931 Mon Sep 17 00:00:00 2001 From: Dylan Page Date: Mon, 12 Jun 2023 18:52:08 -0400 Subject: [PATCH 2/3] fix: add jenkins trigger action --- .github/workflows/trigger_jenkins.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/trigger_jenkins.yml diff --git a/.github/workflows/trigger_jenkins.yml b/.github/workflows/trigger_jenkins.yml new file mode 100644 index 00000000..43483372 --- /dev/null +++ b/.github/workflows/trigger_jenkins.yml @@ -0,0 +1,11 @@ +# This is a basic workflow to help you trigger jobs on corporate Jenkins +name: Trigger Jenkins CI + +# Controls when the workflow will run +on: + - push + +jobs: + call-jenkins-workflow: + uses: plangrid/acs-jenkins-github-connector/.github/workflows/trigger_jenkins.yml@main + secrets: inherit \ No newline at end of file From 0ba88643cc1a6a240fd372325ef788bb15372919 Mon Sep 17 00:00:00 2001 From: Dylan Page Date: Mon, 12 Jun 2023 20:52:35 -0400 Subject: [PATCH 3/3] fix: cant reference internal workflow due to repo being public --- .github/workflows/trigger_jenkins.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/trigger_jenkins.yml b/.github/workflows/trigger_jenkins.yml index 43483372..cc6141b4 100644 --- a/.github/workflows/trigger_jenkins.yml +++ b/.github/workflows/trigger_jenkins.yml @@ -6,6 +6,14 @@ on: - push jobs: - call-jenkins-workflow: - uses: plangrid/acs-jenkins-github-connector/.github/workflows/trigger_jenkins.yml@main - secrets: inherit \ No newline at end of file + trigger_jenkins: + # The type of runner that the job will run on + runs-on: jenkins-trigger + env: + REPO_NAME: ${{ github.event.repository.name }} + JENKINS_ROOT: ${{ secrets.JENKINS_CONTROLLER_URL }}job/${{ secrets.JENKINS_TRIGGER_ROOT_FOLDER }}/job/${{ secrets.JENKINS_TRIGGER_ORG_FOLDER }}/job + steps: + - name: trigger single Job + run: > + curl -X POST -u "${{ secrets.JENKINS_TRIGGER_USER }}:${{ secrets.JENKINS_TRIGGER_TOKEN }}" + ${{ env.JENKINS_ROOT}}/${{ env.REPO_NAME }}/build\?delay=\0 \ No newline at end of file