---
|
|
kind: Template
|
|
apiVersion: v1
|
|
metadata:
|
|
name: ${NAME}-build-template
|
|
annotations:
|
|
description: A Django application with a PostgreSQL database
|
|
tags: edivorce,python,django,postgresql
|
|
iconClass: icon-python
|
|
labels:
|
|
template: ${NAME}-build-template
|
|
objects:
|
|
- kind: ImageStream
|
|
apiVersion: v1
|
|
metadata:
|
|
name: "${NAME}"
|
|
- kind: BuildConfig
|
|
apiVersion: v1
|
|
metadata:
|
|
name: "${NAME}"
|
|
spec:
|
|
source:
|
|
type: Git
|
|
git:
|
|
uri: "${GIT_REPO_URL}"
|
|
ref: "${GIT_REF}"
|
|
contextDir: "${SOURCE_CONTEXT_DIR}"
|
|
strategy:
|
|
type: Source
|
|
sourceStrategy:
|
|
from:
|
|
kind: ${SOURCE_IMAGE_KIND}
|
|
namespace: "${SOURCE_IMAGE_NAMESPACE}"
|
|
name: ${SOURCE_IMAGE_NAME}:${SOURCE_IMAGE_TAG}
|
|
env:
|
|
- name: PIP_INDEX_URL
|
|
value: "${PIP_INDEX_URL}"
|
|
output:
|
|
to:
|
|
kind: ImageStreamTag
|
|
name: "${NAME}:latest"
|
|
triggers:
|
|
- type: ImageChange
|
|
- type: ConfigChange
|
|
postCommit:
|
|
script: "./manage.py test"
|
|
parameters:
|
|
- name: NAME
|
|
displayName: Name
|
|
description: The name assigned to all of the frontend objects defined in this template.
|
|
required: true
|
|
value: edivorce-django
|
|
- name: GIT_REPO_URL
|
|
displayName: Git Repository URL
|
|
description: The URL of the repository with your application source code.
|
|
required: true
|
|
value: https://github.com/bcgov/eDivorce
|
|
- name: GIT_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: SOURCE_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: SOURCE_IMAGE_KIND
|
|
displayName: Source Image Kind
|
|
description: The 'kind' (type) of the source image; typically ImageStreamTag, or DockerImage.
|
|
required: true
|
|
value: ImageStreamTag
|
|
- name: SOURCE_IMAGE_NAMESPACE
|
|
displayName: Source Image Namespace
|
|
description: The namespace where the source image resides.
|
|
required: true
|
|
value: openshift
|
|
- name: SOURCE_IMAGE_NAME
|
|
displayName: Source Image Name
|
|
description: The name of the source image.
|
|
required: true
|
|
value: python
|
|
- name: SOURCE_IMAGE_TAG
|
|
displayName: Source Image Tag
|
|
description: The tag of the source image.
|
|
required: true
|
|
value: "3.5"
|
|
- name: PIP_INDEX_URL
|
|
displayName: Custom PyPi Index URL
|
|
description: The custom PyPi index URL
|
|
value: ''
|