Last active
May 22, 2021 19:41
-
-
Save csrwng/b7cfa95efa3641774a41a19aa9fc03c2 to your computer and use it in GitHub Desktop.
Inline Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Template | |
labels: | |
template: inline-jenkinsfile | |
metadata: | |
name: inline-jenkinsfile | |
parameters: | |
- name: NAME | |
description: The name of the build to create | |
displayName: Build Name | |
required: true | |
- description: A secret string used to configure the GitHub webhook. | |
displayName: GitHub Webhook Secret | |
from: '[a-zA-Z0-9]{40}' | |
generate: expression | |
name: GITHUB_WEBHOOK_SECRET | |
required: true | |
- description: A secret string used to configure the Generic webhook. | |
displayName: Generic Webhook Secret | |
from: '[a-zA-Z0-9]{40}' | |
generate: expression | |
name: GENERIC_WEBHOOK_SECRET | |
objects: | |
- apiVersion: v1 | |
kind: BuildConfig | |
metadata: | |
labels: | |
name: "${NAME}" | |
name: "${NAME}" | |
spec: | |
strategy: | |
jenkinsPipelineStrategy: | |
jenkinsfile: |- | |
node { | |
stage("First") { | |
echo "Hello World" | |
} | |
} | |
type: JenkinsPipeline | |
triggers: | |
- github: | |
secret: "${GITHUB_WEBHOOK_SECRET}" | |
type: GitHub | |
- generic: | |
secret: "${GENERIC_WEBHOOK_SECRET}" | |
type: Generic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment