donal
2018-04-19 cb933d400035237a65f811748109746a3289504f
commit | author | age
4eacb7 1 ---
D 2 kind: Template
3 apiVersion: v1
4 metadata:
5   name: s2i-app-build
6   annotations:
7     openshift.io/display-name: S2I App Build Template
8     description: S2I binary build config to create an image with your app baked in.
9     iconClass: fa-cube
10     tags: s2i
11 objects:
12 - apiVersion: v1
13   kind: ImageStream
14   metadata:
15     labels:
16       build: "${NAME}"
17       app: "${NAME}"
18     name: "${NAME}"
19   spec: {}
20 - apiVersion: v1
21   kind: BuildConfig
22   metadata:
23     labels:
24       build: "${NAME}"
25       name: "${NAME}-pipeline"
26       type: pipeline
27       app: "${NAME}"
28     name: "${NAME}-pipeline"
29   spec:
30     nodeSelector: {}
31     output: {}
32     postCommit: {}
33     resources: {}
34     runPolicy: Serial
35     source:
36       contextDir: "${PIPELINE_CONTEXT_DIR}"
37       git:
38         ref: "${PIPELINE_SOURCE_REPOSITORY_REF}"
39         uri: "${PIPELINE_SOURCE_REPOSITORY_URL}"
40       type: Git
41       sourceSecret:
42         name: "${PIPELINE_SOURCE_SECRET}"
43     strategy:
44       jenkinsPipelineStrategy:
45         jenkinsfilePath: Jenkinsfile
46       type: JenkinsPipeline
47     triggers:
48     - type: ConfigChange
49     - type: Bitbucket
50       bitbucket:
51         secret: "${BITBUCKET_WEBHOOK}"
52     - type: Generic
53       generic:
54         secret: "${GENERIC_WEBHOOK}"
55     - type: GitHub
56       github:
57         secret: "${GITHUB_WEBHOOK}"
58     - type: GitLab
59       gitlab:
60         secret: "${GITLAB_WEBHOOK}"
61 parameters:
62 - name: NAME
63   displayName: Name
64   description: The name assigned to all objects and the resulting imagestream.
65   required: true
66   value: s2i-app
67 - name: PIPELINE_SOURCE_REPOSITORY_URL
68   displayName: Git Repository URL
69   description: The URL of the repository with your Jenkinsfile.
70   required: true
71   value: https://github.com/rht-labs/Jenkinsfiles
72 - name: PIPELINE_SOURCE_REPOSITORY_REF
73   displayName: Git Reference
74   description: Set this to a branch name, tag or other ref of your repository if you
75     are not using the default (master) branch.
76   value: master
77 - name: PIPELINE_CONTEXT_DIR
78   displayName: Git Context Directory for Jenkinsfile
79   description: Set this to the directory where the Jenkinsfile is if not using the
80     default root directory
81 - name: BITBUCKET_WEBHOOK
82   displayName: Bitbucket Webook
83   description: OCP secret string to configure a Bitbucket webhook
84   generate: expression
85   from: "[a-zA-Z0-9]{20}"
86 - name: GENERIC_WEBHOOK
87   displayName: Generic Webook
88   description: OCP secret string to configure a Generic webhook
89   generate: expression
90   from: "[a-zA-Z0-9]{20}"
91 - name: GITHUB_WEBHOOK
92   displayName: Github Webook
93   description: OCP secret string to configure a Github webhook
94   generate: expression
95   from: "[a-zA-Z0-9]{20}"
96 - name: GITLAB_WEBHOOK
97   displayName: Gitlab Webook
98   description: OCP secret string to configure a Gitlab webhook
99   generate: expression
100   from: "[a-zA-Z0-9]{20}"
101 - name: PIPELINE_SOURCE_SECRET
102   displayName: Secret for git repository
103   description: The name of the OCP secret that has credentials for the pipeline git
104     repository
105   value: gitlab-auth
106 labels:
107   template: s2i-app-build-template