acammies
2018-04-18 a7da28dbf84e6321a07a61d415c4baaa8ab9fe02
pods added and jenkins slave
3 files added
94 ■■■■■ changed files
params/arachni-build-pod 6 ●●●●● patch | view | raw | blame | history
params/zap-build-pod 5 ●●●●● patch | view | raw | blame | history
templates/jenkins-slave-generic-template.yml 83 ●●●●● patch | view | raw | blame | history
params/arachni-build-pod
New file
@@ -0,0 +1,6 @@
SOURCE_REPOSITORY_URL=https://github.com/neiln3121/arachni-xunit.git
SOURCE_CONTEXT_DIR=./
BUILDER_IMAGE_NAME=registry.access.redhat.com/openshift3/jenkins-slave-base-rhel7:latest
NAME=arachni-build-pod
SOURCE_REPOSITORY_REF=master
params/zap-build-pod
New file
@@ -0,0 +1,5 @@
SOURCE_REPOSITORY_URL=https://github.com/rht-labs/owasp-zap-openshift.git
SOURCE_CONTEXT_DIR=./
BUILDER_IMAGE_NAME=centos:centos7
NAME=zap-build-pod
SOURCE_REPOSITORY_REF=master
templates/jenkins-slave-generic-template.yml
New file
@@ -0,0 +1,83 @@
---
kind: Template
apiVersion: v1
metadata:
  name: "${NAME}"
  annotations:
    openshift.io/display-name: Generic Build Pod
    description: "${NAME} build pod template pre-configured to use a jenkins slave in the
      same project/namespace"
objects:
- apiVersion: v1
  kind: ImageStream
  metadata:
    labels:
      build: "${NAME}"
      role: jenkins-slave
    name: "${NAME}"
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      build: "${NAME}"
      type: image
    name: "${NAME}"
  spec:
    nodeSelector:
    output:
      to:
        kind: ImageStreamTag
        name: "${NAME}:${SLAVE_IMAGE_TAG}"
    postCommit: {}
    resources: {}
    runPolicy: Serial
    source:
      sourceSecret:
        name: "gitlab-auth"
      contextDir: "${SOURCE_CONTEXT_DIR}"
      git:
        ref: "${SOURCE_REPOSITORY_REF}"
        uri: "${SOURCE_REPOSITORY_URL}"
      type: Git
    strategy:
      dockerStrategy:
        env:
          - name: "GIT_SSL_NO_VERIFY"
            value: "true"
        from:
          kind: DockerImage
          name: "${BUILDER_IMAGE_NAME}"
      type: Docker
    triggers:
    - type: ConfigChange
    - type: ImageChange
parameters:
- name: NAME
  displayName: Name
  description: The name assigned to all objects and the resulting imagestream.
  required: true
- name: SOURCE_REPOSITORY_URL
  displayName: Git Repository URL
  description: The URL of the repository with your application source code.
  required: true
  value: https://github.com/redhat-cop/containers-quickstarts
- name: SOURCE_REPOSITORY_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 (master) branch.
  value: master
- name: SOURCE_CONTEXT_DIR
  displayName: Git Context Directory
  description: Set this to the directory where the build information is (e.g. Dockerfile)
    if not using the default
- name: BUILDER_IMAGE_NAME
  displayName: Image name from which to build this pod
  description: The build image which this build pod will extend to create it's new
    build pod type.
  value: registry.access.redhat.com/openshift3/jenkins-slave-base-rhel7
- name: SLAVE_IMAGE_TAG
  displayName: Image tag for Jenkins slave.
  description: This is the image tag used for the Jenkins slave.
  value: latest
labels:
  template: build-pod-template