forked from redhat-cop/container-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jenkins slave-python & sonarqube
- Loading branch information
1 parent
a8082f0
commit 449d2f9
Showing
7 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
basic-python-flask/files/builds/jenkins-slave-template.yml
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,67 @@ | ||
apiVersion: v1 | ||
kind: Template | ||
labels: | ||
template: jenkins-slave | ||
metadata: | ||
annotations: | ||
description: Template for Jenkins slave | ||
iconClass: icon-jenkins | ||
tags: instant-app,jenkins | ||
name: jenkins-slave | ||
objects: | ||
- kind: BuildConfig | ||
apiVersion: v1 | ||
metadata: | ||
labels: | ||
application: ${SLAVE_NAME} | ||
name: ${SLAVE_NAME} | ||
namespace: ${NAMESPACE} | ||
spec: | ||
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: ${SLAVE_NAME}:latest | ||
source: | ||
type: Git | ||
git: | ||
uri: ${SOURCE_REPOSITORY_URL} | ||
ref: ${SOURCE_REPOSITORY_REF} | ||
contextDir: ${CONTEXT_DIR} | ||
strategy: | ||
dockerStrategy: | ||
from: | ||
kind: DockerImage | ||
name: ${JENKINS_IMAGE} | ||
triggers: | ||
- type: ConfigChange | ||
- apiVersion: v1 | ||
kind: ImageStream | ||
metadata: | ||
annotations: | ||
slave-label: python | ||
labels: | ||
application: ${SLAVE_NAME} | ||
role: jenkins-slave | ||
name: ${SLAVE_NAME} | ||
namespace: ${NAMESPACE} | ||
parameters: | ||
- description: The name for the application. | ||
name: SLAVE_NAME | ||
required: true | ||
- description: The namespace to deploy into | ||
name: NAMESPACE | ||
required: true | ||
- description: Git source URL for application | ||
name: SOURCE_REPOSITORY_URL | ||
required: true | ||
value: https://github.com/pabrahamsson/jenkins.git | ||
- description: Git branch/tag reference | ||
name: SOURCE_REPOSITORY_REF | ||
value: master | ||
- description: Path within Git repository to build; empty for root of repository | ||
name: CONTEXT_DIR | ||
value: | ||
- description: The Jenkins source image | ||
name: JENKINS_IMAGE | ||
required: true | ||
value: openshift/jenkins-slave-base-centos7 |
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,4 @@ | ||
SLAVE_NAME=slave-python | ||
NAMESPACE=basic-python-flask-build | ||
CONTEXT_DIR=slave-python | ||
SOURCE_REPOSITORY_REF=slave-python |
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 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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
INSTALL_PLUGINS=cobertura:1.12 | ||
INSTALL_PLUGINS=cobertura:1.12,sonar:2.6.1 | ||
MEMORY_LIMIT=512Mi |
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,4 @@ | ||
POSTGRESQL_DATABASE=sonar | ||
VOLUME_CAPACITY=5 | ||
POSTGRESQL_PASSWORD=sonar | ||
POSTGRESQL_USER=sonar |
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,9 @@ | ||
MEMORY_LIMIT=1Gi | ||
VOLUME_CAPACITY=2Gi | ||
MEMORY_LIMIT=2Gi | ||
CPU_LIMIT=1 | ||
JDBC_URL=jdbc:postgresql://postgresql:5432/sonar | ||
JDBC_USER=sonar | ||
JDBC_PASSWORD=sonar | ||
SOURCE_REPOSITORY_URL=https://github.com/rht-labs/labs-ci-cd | ||
SOURCE_REPOSITORY_CONTEXT_DIR=docker/sonarqube |
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