Skip to content

Commit

Permalink
Add imagestream to docker generic override build (#246)
Browse files Browse the repository at this point in the history
* add new template that can overwrite FROM in dockerfile

* forgot to parameterize the tag

* add *.swp to .gitignore 🌸

* fix templating issue

* update with image stream

* delete my duplicate file
  • Loading branch information
pcarney8 authored and etsauer committed Aug 22, 2019
1 parent 50b0f43 commit 6b7a4c4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
.idea
**/galaxy/
*.swp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ objects:
build: "${NAME}"
app: "${NAME}"
name: "${NAME}"
- kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: ${FROM_DOCKER_IMAGE}
spec:
tags:
- annotations: null
from:
kind: DockerImage
name: ${FROM_DOCKER_IMAGE_REGISTRY_URL}:${FROM_DOCKER_TAG}
importPolicy: {}
name: ${FROM_DOCKER_TAG}
- apiVersion: v1
kind: BuildConfig
metadata:
Expand Down Expand Up @@ -58,19 +70,6 @@ objects:
- type: ConfigChange
- type: ImageChange
parameters:
- name: DOCKER_FROM_KIND
description: Type of override for the Docker 'FROM' clause
displayName: FROM Kind (DockerImage or ImageStreamTag)
required: true
value: ImageStreamTag
- name: FROM_DOCKER_IMAGE
description: Overrides the 'FROM' base image for the Dockerfile build
displayName: FROM docker image
required: true
- name: FROM_DOCKER_TAG
description: Overrides the 'FROM' base image TAG for the Dockerfile build
displayName: FROM docker image TAG
required: true
- name: NAME
displayName: Name
description: The name assigned to all objects and the resulting imagestream.
Expand All @@ -93,3 +92,19 @@ parameters:
displayName: Git Context Directory
description: Set this to the directory where the build information is (e.g. Dockerfile)
if not using the root directory
- name: DOCKER_FROM_KIND
description: Type of override for the Docker 'FROM' clause
displayName: FROM Kind (DockerImage or ImageStreamTag)
required: true
value: ImageStreamTag
- name: FROM_DOCKER_IMAGE
description: Overrides the 'FROM' base image for the Dockerfile build
displayName: FROM docker image
required: true
- name: FROM_DOCKER_TAG
description: Overrides the 'FROM' base image TAG for the Dockerfile build
displayName: FROM docker image TAG
required: true
- name: FROM_DOCKER_IMAGE_REGISTRY_URL
displayName: External Registry URL
description: The URL for the registry that the image will be pulled from (e.g. registry.redhat.io)

0 comments on commit 6b7a4c4

Please sign in to comment.