{ "kind": "Template", "apiVersion": "v1", "metadata": { "name": "${NAME}-pipeline-template", "creationTimestamp": null }, "objects": [ { "kind": "BuildConfig", "apiVersion": "v1", "metadata": { "name": "${NAME}-pipeline", "creationTimestamp": null, "labels": { "app": "${NAME}-pipeline", "name": "${NAME}-pipeline", "template": "${NAME}-pipeline" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" } }, { "type": "Generic", "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" } } ], "runPolicy": "Parallel", "source": { "type": "Git", "git": { "uri": "${SOURCE_REPOSITORY_URL}", "ref": "${SOURCE_REPOSITORY_REF}" }, "contextDir": "${CONTEXT_DIR}" }, "strategy": { "type": "JenkinsPipeline", "jenkinsPipelineStrategy": { "jenkinsfilePath": "${JENKINSFILE_PATH}" } }, "output": {}, "resources": {}, "postCommit": {} }, "status": { "lastVersion": 0 } } ], "parameters": [ { "name": "NAME", "displayName": "name of pipeline", "description": "name of pipeline", "required": true }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "A secret string used to configure the GitHub webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository containing the Jenkinsfile the pipeline buildconfig will use.", "value": "https://github.com/BCDevOps/openshift-tools", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "JENKINSFILE_PATH", "displayName": "Jenkinsfile path", "description": "Set this to the path to your Jenkinsfile (include the filename), relative to the contextDir." } ] }