-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from rht-labs/feature/jenkins-agents
Regarding issue #15 we can pass this check for now. It works on Openshift.
- Loading branch information
Showing
7 changed files
with
137 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{{- if .Values.buildconfigs }} | ||
{{- range $key := .Values.buildconfigs }} | ||
--- | ||
kind: BuildConfig | ||
apiVersion: build.openshift.io/v1 | ||
metadata: | ||
name: {{ .name }} | ||
labels: | ||
build: {{ .name }} | ||
type: image | ||
spec: | ||
triggers: | ||
- type: "ConfigChange" | ||
{{- if .build_trigger_secret }} | ||
- type: GitHub | ||
github: | ||
secret: {{ .build_trigger_secret | quote }} | ||
- type: GitLab | ||
gitlab: | ||
secret: {{ .build_trigger_secret | quote }} | ||
- type: BitBucket | ||
bitbucket: | ||
secret: {{ .build_trigger_secret | quote }} | ||
- type: Generic | ||
generic: | ||
secret: {{ .build_trigger_secret | quote }} | ||
allowEnv: true | ||
{{- end}} | ||
runPolicy: Serial | ||
source: | ||
type: Git | ||
{{- if .source_secret }} | ||
sourceSecret: | ||
name: {{ .source_secret }} | ||
{{- end }} | ||
git: | ||
uri: {{ .source_repo | quote }} | ||
ref: {{ .source_repo_ref | default "master" | quote }} | ||
contextDir: {{ .source_context_dir | quote }} | ||
strategy: | ||
type: {{ .strategy_type }} | ||
{{- if eq .strategy_type "Docker" }} | ||
dockerStrategy: | ||
dockerfilePath: {{ .dockerfilePath | default "Dockerfile" | quote }} | ||
from: | ||
kind: DockerImage | ||
name: "{{ .builder_image_name }}:{{ .builder_image_tag }}" | ||
imagePullPolicy: Always | ||
{{- end }} | ||
{{- if eq .strategy_type "Source" }} | ||
sourceStrategy: | ||
from: | ||
kind: "ImageStreamTag" | ||
name: "{{ .builder_image_name }}:{{ .builder_image_tag }}" | ||
namespace: {{ .builder_image_namespace | default "openshift" | quote }} | ||
{{- end }} | ||
{{- if .pull_secret }} | ||
pullSecret: | ||
name: {{ .pull_secret | quote}} | ||
{{- end }} | ||
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: "{{ .name }}:latest" | ||
{{- end}} | ||
{{- end}} |
19 changes: 0 additions & 19 deletions
19
charts/jenkins/templates/external-jenkins-imagestream.yaml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- range $key := .Values.imagestreams }} | ||
--- | ||
kind: ImageStream | ||
apiVersion: image.openshift.io/v1 | ||
{{- if .name | regexFind ".*slave" }} | ||
labels: | ||
build: {{ .name }} | ||
role: jenkins-slave | ||
{{- end }} | ||
metadata: | ||
name: {{ .name }} | ||
annotations: | ||
description: Keeps track of changes in the application image | ||
{{- if .external }} | ||
spec: | ||
tags: | ||
- name: {{ .external.builder_imagetag | quote }} | ||
annotations: null | ||
from: | ||
kind: DockerImage | ||
name: {{ .external.builder_registry }}/{{ .external.builder_repo }}/{{ .external.builder_image }}:{{ .external.builder_imagetag }} | ||
importPolicy: {} | ||
referencePolicy: | ||
type: Source | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters