File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Trigger Jenkins Job AUTH Microservice
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - " main-auth"
7
+ pull_request :
8
+ branches :
9
+ - " main-auth"
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ trigger-job :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ # Step 1: Build Jenkins URL
18
+ - name : Build Jenkins URL
19
+ run : |
20
+ JENKINS_URL="https://automation.prms.cgiar.org/job/auth-microservice/build"
21
+ echo "Jenkins job URL: $JENKINS_URL"
22
+ echo "JENKINS_URL=${JENKINS_URL}" >> $GITHUB_ENV
23
+
24
+ # Step 2: Trigger Jenkins Job
25
+ - name : Trigger Jenkins Job
26
+ run : |
27
+ curl -X POST ${{ env.JENKINS_URL }} --user ${{ secrets.JENKINS_USERNAME }}:${{ secrets.JENKINS_API_TOKEN }}
28
+ env :
29
+ JENKINS_URL : ${{ env.JENKINS_URL }}
30
+ JENKINS_USERNAME : ${{ secrets.JENKINS_USERNAME }}
31
+ JENKINS_API_TOKEN : ${{ secrets.JENKINS_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments