Browse Source

EDIVORCE-50 - Add s21-nginx build to the build configurations.

pull/160/head
Wade Barnes 7 years ago
parent
commit
3dae550e30
4 changed files with 100 additions and 19 deletions
  1. +0
    -18
      openshift/README.md
  2. +10
    -0
      openshift/s2i-nginx-build.param
  3. +1
    -1
      openshift/settings.sh
  4. +89
    -0
      openshift/templates/nginx-proxy/s2i-nginx-build.json

+ 0
- 18
openshift/README.md View File

@ -83,24 +83,6 @@ This allows you to do things like redirect your builds to use a different reposi
To apply local settings while deploying your build and deployment configurations use the `-l` option with `genBuilds.sh` and `genDepls.sh`.
## 0. Build and publish the S2I image:
*TODO: Add this process to the build configurations...*
```docker build -t s2i-nginx git://github.com/BCDevOps/s2i-nginx```
### Tag and push this image to the OpenShift Docker Registry for your OpenShift Project:
```
docker tag s2i-nginx docker-registry.pathfinder.gov.bc.ca/jag-csb-edivorce-tools/s2i-nginx
docker login docker-registry.pathfinder.gov.bc.ca -u <username> -p <token>
docker push docker-registry.pathfinder.gov.bc.ca/jag-csb-edivorce-tools/s2i-nginx
```
(your docker token is the same as your OpenShift login token)
## 1. Change into the top level openshift folder
```
cd /<PathToWorkingCopy>/openshift


+ 10
- 0
openshift/s2i-nginx-build.param View File

@ -0,0 +1,10 @@
#=========================================================
# OpenShift template parameters for:
# Component: .
# Template File: templates/nginx-proxy/s2i-nginx-build.json
#=========================================================
NAME=s2i-nginx
GIT_REPO_URL=https://github.com/BCDevOps/s2i-nginx.git
GIT_REF=master
SOURCE_CONTEXT_DIR=
OUTPUT_IMAGE_TAG=latest

+ 1
- 1
openshift/settings.sh View File

@ -9,7 +9,7 @@ export components="."
# The templates that should not have their GIT referances(uri and ref) over-ridden
# Templates NOT in this list will have they GIT referances over-ridden
# with the values of GIT_URI and GIT_REF
export -a skip_git_overrides="schema-spy-build.json"
export -a skip_git_overrides="schema-spy-build.json s2i-nginx-build.json"
# The templates that should not have their GIT referances(uri and ref) over-ridden
# Templates NOT in this list will have they GIT referances over-ridden with the values of GIT_URI and GIT_REF


+ 89
- 0
openshift/templates/nginx-proxy/s2i-nginx-build.json View File

@ -0,0 +1,89 @@
{
"kind": "Template",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}-build-template",
"creationTimestamp": null
},
"objects": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"name": "${NAME}"
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${NAME}",
"labels": {
"app": "${NAME}"
}
},
"spec": {
"triggers": [
{
"type": "ConfigChange"
}
],
"runPolicy": "Serial",
"source": {
"type": "Git",
"git": {
"uri": "${GIT_REPO_URL}",
"ref": "${GIT_REF}"
},
"contextDir": "${SOURCE_CONTEXT_DIR}"
},
"strategy": {
"type": "Docker"
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${NAME}:${OUTPUT_IMAGE_TAG}"
}
}
}
}
],
"parameters": [
{
"name": "NAME",
"displayName": "Name",
"description": "The name assigned to all of the resources defined in this template.",
"required": true,
"value": "s2i-nginx"
},
{
"name": "GIT_REPO_URL",
"displayName": "Git Repo URL",
"description": "The URL to your GIT repo, don't use the default unless your just experimenting.",
"required": true,
"value": "https://github.com/BCDevOps/s2i-nginx.git"
},
{
"name": "GIT_REF",
"displayName": "Git Reference",
"description": "The git reference or branch.",
"required": true,
"value": "master"
},
{
"name": "SOURCE_CONTEXT_DIR",
"displayName": "Source Context Directory",
"description": "The source context directory.",
"required": false,
"value": ""
},
{
"name": "OUTPUT_IMAGE_TAG",
"displayName": "Output Image Tag",
"description": "The tag given to the built image.",
"required": true,
"value": "latest"
}
]
}

Loading…
Cancel
Save