Description
Run an existing job jenkins given a name
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| jobName | string | Name of jenkins item | |
| jobParameters | object | - |
Output Schema
No output schema defined for this action.
Usage Examples
Trigger a Jenkins seed job without parameters
Runs a pre-existing seed job to initialize pipeline configuration for the new service. Use this after fetch:template and publish:github when the Jenkins job does not require parameters.
steps:
- id: fetchBase
action: fetch:template
input:
url: https://github.com/acme/templates/service-skeleton/archive/main.zip
targetPath: .
values:
name: ${{ parameters.componentId }}
owner: ${{ parameters.owner }}
- id: triggerSeedJob
action: jenkins:job:build
input:
jobName: seed/${{ parameters.organization }}/setup-pipelinesBuild and deploy with parameterized Jenkins pipeline
Triggers a foldered Jenkins pipeline with parameters to build the image and deploy to the selected environment. Use this to start CI and an initial deploy after scaffolding.
steps:
- id: fetchBase
action: fetch:template
input:
url: https://github.com/acme/templates/node-service/archive/main.zip
targetPath: .
values:
name: ${{ parameters.componentId }}
description: ${{ parameters.description }}
- id: triggerCiCd
action: jenkins:job:build
input:
jobName: ci/${{ parameters.teamSlug }}/build-and-deploy
jobParameters:
repository: github.com/acme/${{ parameters.repoName }}
branch: ${{ parameters.defaultBranch }}
imageTag: ${{ parameters.version }}
environment: ${{ parameters.environment }}
deploy: true
timeoutMinutes: 30
notifyChannel: '#svc-ci'