Skip to content

Commit

Permalink
ci: update Jenkins configuration and job parameters
Browse files Browse the repository at this point in the history
- Update Jenkins action version to `v1.1.1`
- Change Jenkins URL and user credentials
- Rename job names and add `insecure` parameter
- Add a step to set a random word using OpenSSL
- Add parameters to trigger Job with parameters
- Correct parameter name from `parameter` to `parameters` in README and action.yml

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Oct 6, 2024
1 parent b3c82aa commit bf2832a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,26 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: trigger single Job
uses: appleboy/jenkins-action@master
- name: trigger Job without parameters
uses: appleboy/jenkins-action@v1.1.1
with:
url: "http://example.com"
user: "example"
url: https://jenkins.com
user: jenkins
token: ${{ secrets.TOKEN }}
job: "foobar"
job: AIDE_TEST
insecure: true

- name: trigger multiple Job
uses: appleboy/jenkins-action@master
- name: set random word
id: random-word
run: |
echo TEST1234=$(openssl rand -hex 12) >> $GITHUB_OUTPUT
- name: trigger Job with parameters
uses: appleboy/[email protected]
with:
url: "http://example.com"
user: "example"
url: https://jenkins.com
user: jenkins
token: ${{ secrets.TOKEN }}
job: "job_1,job_2"
insecure: "true"
job: AIDE_TEST2
insecure: true
parameters: parameter01=${{ steps.random-word.outputs.TEST1234 }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Trigger jenkins job with parameter:
user: "example"
token: ${{ secrets.TOKEN }}
job: "job_1"
parameter: "param1=value1,param2=value2"
parameters: "param1=value1,param2=value2"
```
## Input variables
Expand All @@ -77,4 +77,4 @@ Trigger jenkins job with parameter:
* job - Required. jenkins job name.
* token - Required. jenkins api token.
* insecure - Optional. Allow insecure server connections when using SSL. Default is `false`.
* parameter - Optional. jenkins job parameter, example: `param1=value1,param2=value2`.
* parameters - Optional. jenkins job parameter, example: `param1=value1,param2=value2`.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
insecure:
description: "insecure skip verify"
default: "false"
parameter:
parameters:
description: "jenkins job parameters"
runs:
using: "docker"
Expand Down

0 comments on commit bf2832a

Please sign in to comment.