Sign inSign up

fourdollars/jenkins-resource

By fourdollars

•Updated 6 months ago

Image
0

3.4K

fourdollars/jenkins-resource repository overview

GitHub: fourdollars/jenkins-resource License: MIT Bash Docker Docker Pulls

⁠jenkins-resource

Concourse CI⁠'s jenkins-resource to watch and trigger the Jenkins builds by https://www.jenkins.io/doc/book/using/remote-access-api/⁠.

⁠Config

⁠Resource Type
resource_types:
- name: resource-jenkins
  type: registry-image
  source:
    repository: fourdollars/jenkins-resource
    tag: latest

or

resource_types:
- name: resource-jenkins
  type: registry-image
  source:
    repository: ghcr.io/fourdollars/jenkins-resource
    tag: latest
⁠Resource
  • host: Required
  • user: Required
  • token: Required
  • job: Required, such as 'job/JOB_NAME'.
  • port: Optional
  • protocol: Optional, using 'https' by default.
  • timezone: Optional, such as 'Asia/Taipei'. 'UTC' by default.
  • timeout: Optional, seconds to timeout. No timeout by default.
  • builds: Limit the build number to check. No limit by default.
  • debug: Optional
resources:
- name: test
  icon: bow-tie
  type: resource-jenkins
  check_every: 5m
  source:
    host: 127.0.0.1
    user: user
    token: wxdnqsclxzrmhb2k27frgjc7hdp3zqk0b4
    job: job/test
    port: 8080
    protocol: http
    builds: 5
- name: release
  icon: bow-tie
  type: resource-jenkins
  check_every: never
  source:
    host: 127.0.0.1
    user: user
    token: wxdnqsclxzrmhb2k27frgjc7hdp3zqk0b4
    job: job/release
    port: 8080
    protocol: http
    builds: 5
⁠get step params
  • expectedResult: Optional, waiting for the expected results.
  • timeout: Optional, seconds to timeout. No timeout by default.
  • skip: Don't wait for the result.
⁠put step params
  • stringParameters: Optional.
  • fileParameters: Optional.
  • timeout: Optional, seconds to timeout. No timeout by default.
⁠Job Example
jobs:
- name: check-test-job
  plan:
  - get: test
    trigger: true
  - task: check
    config:
      platform: linux
      image_resource:
        type: registry-image
        source:
          repository: alpine
          tag: latest
      inputs:
        - name: test
      outputs:
        - name: outgoing
      run:
        path: sh
        args:
        - -exc
        - |
          apk add jq
          jq -r < test/api.json
          cp test/api.json outgoing/api.json
  - put: release
    inputs: [outgoing]
    params:
      stringParameters:
        id: 123
        verbosity: high 
      fileParameters:
        FILE_LOCATION_AS_SET_IN_JENKINS: outgoing/api.json
    get_params:
      expectedResult:
        - SUCCESS
        - UNSTABLE
        - FAILURE
        - NOT_BUILT
        - ABORTED

Tag summary

Content type

Image

Digest

sha256:3414887b7…

Size

10.4 MB

Last updated

6 months ago

docker pull fourdollars/jenkins-resource