New file |
| | |
| | | --- |
| | | kind: Template |
| | | apiVersion: v1 |
| | | metadata: |
| | | name: s2i-app-build |
| | | annotations: |
| | | openshift.io/display-name: S2I App Build Template |
| | | description: S2I binary build config to create an image with your app baked in. |
| | | iconClass: fa-cube |
| | | tags: s2i |
| | | objects: |
| | | - apiVersion: v1 |
| | | kind: ImageStream |
| | | metadata: |
| | | labels: |
| | | build: "${NAME}" |
| | | app: "${NAME}" |
| | | name: "${NAME}" |
| | | spec: {} |
| | | - apiVersion: v1 |
| | | kind: BuildConfig |
| | | metadata: |
| | | labels: |
| | | build: "${NAME}" |
| | | name: "${NAME}-pipeline" |
| | | type: pipeline |
| | | app: "${NAME}" |
| | | name: "${NAME}-pipeline" |
| | | spec: |
| | | nodeSelector: {} |
| | | output: {} |
| | | postCommit: {} |
| | | resources: {} |
| | | runPolicy: Serial |
| | | source: |
| | | contextDir: "${PIPELINE_CONTEXT_DIR}" |
| | | git: |
| | | ref: "${PIPELINE_SOURCE_REPOSITORY_REF}" |
| | | uri: "${PIPELINE_SOURCE_REPOSITORY_URL}" |
| | | type: Git |
| | | sourceSecret: |
| | | name: "${PIPELINE_SOURCE_SECRET}" |
| | | strategy: |
| | | jenkinsPipelineStrategy: |
| | | jenkinsfilePath: Jenkinsfile |
| | | type: JenkinsPipeline |
| | | triggers: |
| | | - type: ConfigChange |
| | | - type: Bitbucket |
| | | bitbucket: |
| | | secret: "${BITBUCKET_WEBHOOK}" |
| | | - type: Generic |
| | | generic: |
| | | secret: "${GENERIC_WEBHOOK}" |
| | | - type: GitHub |
| | | github: |
| | | secret: "${GITHUB_WEBHOOK}" |
| | | - type: GitLab |
| | | gitlab: |
| | | secret: "${GITLAB_WEBHOOK}" |
| | | parameters: |
| | | - name: NAME |
| | | displayName: Name |
| | | description: The name assigned to all objects and the resulting imagestream. |
| | | required: true |
| | | value: s2i-app |
| | | - name: PIPELINE_SOURCE_REPOSITORY_URL |
| | | displayName: Git Repository URL |
| | | description: The URL of the repository with your Jenkinsfile. |
| | | required: true |
| | | value: https://github.com/rht-labs/Jenkinsfiles |
| | | - name: PIPELINE_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 (master) branch. |
| | | value: master |
| | | - name: PIPELINE_CONTEXT_DIR |
| | | displayName: Git Context Directory for Jenkinsfile |
| | | description: Set this to the directory where the Jenkinsfile is if not using the |
| | | default root directory |
| | | - name: BITBUCKET_WEBHOOK |
| | | displayName: Bitbucket Webook |
| | | description: OCP secret string to configure a Bitbucket webhook |
| | | generate: expression |
| | | from: "[a-zA-Z0-9]{20}" |
| | | - name: GENERIC_WEBHOOK |
| | | displayName: Generic Webook |
| | | description: OCP secret string to configure a Generic webhook |
| | | generate: expression |
| | | from: "[a-zA-Z0-9]{20}" |
| | | - name: GITHUB_WEBHOOK |
| | | displayName: Github Webook |
| | | description: OCP secret string to configure a Github webhook |
| | | generate: expression |
| | | from: "[a-zA-Z0-9]{20}" |
| | | - name: GITLAB_WEBHOOK |
| | | displayName: Gitlab Webook |
| | | description: OCP secret string to configure a Gitlab webhook |
| | | generate: expression |
| | | from: "[a-zA-Z0-9]{20}" |
| | | - name: PIPELINE_SOURCE_SECRET |
| | | displayName: Secret for git repository |
| | | description: The name of the OCP secret that has credentials for the pipeline git |
| | | repository |
| | | value: gitlab-auth |
| | | labels: |
| | | template: s2i-app-build-template |