├── .gitignore ├── README.md ├── examples ├── master │ ├── .sti │ │ └── bin │ │ │ ├── assemble │ │ │ └── run │ ├── configuration │ │ ├── archived_jobs │ │ │ ├── build │ │ │ │ └── config.xml │ │ │ ├── deploy-prod │ │ │ │ └── config.xml │ │ │ ├── deploy-stage │ │ │ │ └── config.xml │ │ │ └── test │ │ │ │ └── config.xml │ │ ├── config.xml.tpl │ │ ├── credentials.xml.tpl │ │ ├── jenkins-common.sh │ │ ├── jjb_conf.ini │ │ ├── jobs │ │ │ ├── build │ │ │ │ └── promotions │ │ │ │ │ └── Deploy │ │ │ │ │ └── config.xml │ │ │ └── test │ │ │ │ └── promotions │ │ │ │ └── Verified │ │ │ │ └── config.xml │ │ └── os-ci-pipeline.yaml │ ├── jenkins-with-k8s-plugin.json │ └── plugins │ │ ├── ColumnPack-plugin.jpi │ │ ├── ColumnsPlugin.jpi │ │ ├── Exclusion.jpi │ │ ├── PrioritySorter.jpi │ │ ├── ace-editor.jpi │ │ ├── analysis-core.jpi │ │ ├── ansicolor.jpi │ │ ├── ant.jpi │ │ ├── antisamy-markup-formatter.jpi │ │ ├── async-http-client.jpi │ │ ├── authentication-tokens.jpi │ │ ├── aws-java-sdk.jpi │ │ ├── build-node-column.jpi │ │ ├── build-pipeline-plugin.jpi │ │ ├── build-timeout.jpi │ │ ├── build-view-column.jpi │ │ ├── buildresult-trigger.jpi │ │ ├── built-on-column.jpi │ │ ├── compact-columns.jpi │ │ ├── conditional-buildstep.jpi │ │ ├── config-file-provider.jpi │ │ ├── configure-job-column-plugin.jpi │ │ ├── console-column-plugin.jpi │ │ ├── console-tail.jpi │ │ ├── copy-to-slave.jpi │ │ ├── copyartifact.jpi │ │ ├── credentials-binding.jpi │ │ ├── credentials.jpi │ │ ├── credentials.jpi.pinned │ │ ├── cron_column.jpi │ │ ├── cvs.jpi │ │ ├── dashboard-view.jpi │ │ ├── delivery-pipeline-plugin.jpi │ │ ├── depgraph-view.jpi │ │ ├── description-column-plugin.jpi │ │ ├── disk-usage.jpi │ │ ├── docker-build-step.jpi │ │ ├── docker-commons.jpi │ │ ├── docker-plugin.jpi │ │ ├── durable-task.jpi │ │ ├── dynamic-axis.jpi │ │ ├── dynamicparameter.jpi │ │ ├── email-ext-recipients-column.jpi │ │ ├── email-ext.jpi │ │ ├── envinject.jpi │ │ ├── extended-choice-parameter.jpi │ │ ├── external-monitor-job.jpi │ │ ├── extra-columns.jpi │ │ ├── flexible-publish.jpi │ │ ├── gerrit-trigger.jpi │ │ ├── ghprb.jpi │ │ ├── git-client.jpi │ │ ├── git-client.jpi.pinned │ │ ├── git-server.jpi │ │ ├── git.jpi │ │ ├── git.jpi.pinned │ │ ├── github-api.jpi │ │ ├── github-oauth.jpi │ │ ├── github.jpi │ │ ├── greenballs.jpi │ │ ├── groovy-postbuild.jpi │ │ ├── groovy.jpi │ │ ├── instant-messaging.jpi │ │ ├── ircbot.jpi │ │ ├── jackson2-api.jpi │ │ ├── javadoc.jpi │ │ ├── jenkins-multijob-plugin.jpi │ │ ├── jobConfigHistory.jpi │ │ ├── jobtype-column.jpi │ │ ├── join.jpi │ │ ├── jquery-detached.jpi │ │ ├── jquery-ui.jpi │ │ ├── jquery.jpi │ │ ├── junit.jpi │ │ ├── kubernetes.jpi │ │ ├── ldap.jpi │ │ ├── mailer.jpi │ │ ├── mapdb-api.jpi │ │ ├── mask-passwords.jpi │ │ ├── matrix-auth.jpi │ │ ├── matrix-project.jpi │ │ ├── maven-plugin.jpi │ │ ├── metrics.jpi │ │ ├── multiple-scms.jpi │ │ ├── naginator.jpi │ │ ├── nested-view.jpi │ │ ├── nodelabelparameter.jpi │ │ ├── nodenamecolumn.jpi │ │ ├── openshift-jenkins-buildutils.hpi │ │ ├── openshift-pipeline.jpi │ │ ├── ownership.jpi │ │ ├── pam-auth.jpi │ │ ├── parameterized-trigger.jpi │ │ ├── plain-credentials.jpi │ │ ├── postbuildscript.jpi │ │ ├── progress-bar-column-plugin.jpi │ │ ├── project-stats-plugin.jpi │ │ ├── promoted-builds.jpi │ │ ├── python.jpi │ │ ├── rebuild.jpi │ │ ├── role-strategy.jpi │ │ ├── run-condition.jpi │ │ ├── s3.jpi │ │ ├── schedule-build-plugin.jpi │ │ ├── scm-api.jpi │ │ ├── script-security.jpi │ │ ├── scriptler.jpi │ │ ├── scripttrigger.jpi │ │ ├── sectioned-view.jpi │ │ ├── shiningpanda.jpi │ │ ├── skip-certificate-check.jpi │ │ ├── sonar.jpi │ │ ├── sonargraph-plugin.jpi │ │ ├── ssh-agent.jpi │ │ ├── ssh-credentials.jpi │ │ ├── ssh-slaves.jpi │ │ ├── subversion.jpi │ │ ├── swarm.jpi │ │ ├── test-stability.jpi │ │ ├── thinBackup.jpi │ │ ├── throttle-concurrents.jpi │ │ ├── timestamper.jpi │ │ ├── tmpcleaner.jpi │ │ ├── token-macro.jpi │ │ ├── toolenv.jpi │ │ ├── translation.jpi │ │ ├── update-sites-manager.jpi │ │ ├── urltrigger.jpi │ │ ├── windows-slaves.jpi │ │ ├── workflow-aggregator.jpi │ │ ├── workflow-api.jpi │ │ ├── workflow-basic-steps.jpi │ │ ├── workflow-cps-global-lib.jpi │ │ ├── workflow-cps.jpi │ │ ├── workflow-durable-task-step.jpi │ │ ├── workflow-job.jpi │ │ ├── workflow-scm-step.jpi │ │ ├── workflow-step-api.jpi │ │ ├── workflow-support.jpi │ │ ├── ws-cleanup.jpi │ │ └── xunit.jpi └── slave │ ├── Dockerfile │ ├── README.md │ ├── contrib │ └── openshift │ │ ├── passwd.template │ │ └── run-jnlp-client │ └── s2i-slave-template.json ├── jenkins-flow.png └── sample-app └── sample-app-template.json /.gitignore: -------------------------------------------------------------------------------- 1 | ## PyCharm project format: 2 | .idea/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jenkins Master example 2 | 3 | This directory contains an example of a Jenkins setup that is configured to 4 | demonstrate the CI/pipeline workflow for the sample-app application using the 5 | Jenkins Master/Slave setup and automation done on OpenShift v3. 6 | 7 |

8 | 9 |

10 | 11 | ## Installation 12 | 13 | To start, you have to manually enter following commands in OpenShift: 14 | 15 | 16 | ```console 17 | ## Create project and allow Jenkins to talk to OpenShift API 18 | 19 | # Create all necessary projects 'ci', 'stage', 'prod' 20 | $ oc new-project ci 21 | $ oc new-project stage 22 | $ oc new-project prod 23 | 24 | # Allow the CI user where the Jenkins runs access all projects 25 | $ oc policy add-role-to-user edit system:serviceaccount:ci:default -n ci 26 | $ oc policy add-role-to-user edit system:serviceaccount:ci:default -n stage 27 | $ oc policy add-role-to-user edit system:serviceaccount:ci:default -n prod 28 | 29 | # Add roles for 'stage' and 'prod' projects 30 | $ oc project prod 31 | $ oc policy add-role-to-user edit system:serviceaccount:prod:default -n stage 32 | 33 | # Create the sample application in the 'stage' and 'prod' namespaces: 34 | $ oc create -n stage -f https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/master/sample-app/sample-app-template.json 35 | $ oc create -n prod -f https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/master/sample-app/sample-app-template.json 36 | 37 | # Now create the Jenkins Master and Slave templates in the 'ci' namespace: 38 | $ oc create -n ci -f https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/master/examples/master/jenkins-with-k8s-plugin.json 39 | $ oc create -n ci -f https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/master/examples/slave/s2i-slave-template.json 40 | ``` 41 | 42 | ## Instantiating templates from OpenShift web console 43 | 44 | Navigate to the OpenShift UI and choose the `ci` project we created in the previous 45 | step. Now click *Add to Project* button and then click *Show All 46 | Template*. You should see *jenkins-master* template and *s2i-to-jenkins-slave*. 47 | 48 | Note: To continue, you have to first create your Jenkins Slave image. Please see 49 | the [instructions](examples/slave/README.md) here. 50 | 51 | ### Jenkins Master 52 | 53 | This template defines a 54 | [BuildConfig](https://docs.openshift.org/latest/dev_guide/builds.html#defining-a-buildconfig) 55 | that use the [Docker 56 | Strategy](https://docs.openshift.org/latest/dev_guide/builds.html#docker-strategy-options) 57 | to rebuild the official [OpenShift Jenkins Image](https://github.com/openshift/jenkins). 58 | This template also defines a [Deployment Configuration](https://docs.openshift.org/latest/dev_guide/deployments.html#creating-a-deployment-configuration) that will start just one instance 59 | of the Jenkins server. 60 | 61 | When you choose the `jenkins-master` template, you have to specify these parameters: 62 | 63 | * **JENKINS_SERVICE_NAME** - The name of the Jenkins service (default: *jenkins*) 64 | * **JENKINS_IMAGE** - The name of the original Jenkins image to use 65 | * **JENKINS_PASSWORD** - The Jenkins 'admin' user password 66 | 67 | Once you instantiate this template, you should see a new service *jenkins* in 68 | the overview page and a route *https://jenkins-ci.router.default.svc.cluster.local/*. 69 | 70 | Optionally, you can configure your own repository with Jenkins plugins, 71 | configuration, etc by changing these parameters: 72 | 73 | * **JENKINS_S2I_REPO_URL** - The Git repository with your Jenkins configuration 74 | * **JENKINS_S2I_REPO_CONTEXTDIR** - The directory inside the repository 75 | * **JENKINS_S2I_REPO_REF** - Specify branch or Git ref 76 | 77 | You have to wait until OpenShift rebuilds the original image to include all 78 | plugins and configuration needed. 79 | 80 | ### Sample Application 81 | 82 | The last step is to instantiate the `sample-app` template. The [sample 83 | app](sample-app) is a simple Ruby application 84 | that runs Sinatra and has one unit test defined to exercise the CI flow. 85 | 86 | You have to instantiate the template in both `ci` and `stage` projects. 87 | 88 | ## Workflow 89 | 90 | You can [watch the youtube](https://youtu.be/IreIK-jICgY) 91 | video that shows the full workflow. What happens in the video is: 92 | 93 | 1. When the `sample-app-test` job is started it fetches the [sample-app](sample-app) sources, 94 | installs all required rubygems using bundler and then executes the sample unit tests. 95 | In the job definition, we restricted this job to run only on slaves that have 96 | the *ruby-22-centos7* label. This will match the Kubernetes Pod Template you see 97 | in the Kubernetes plugin configuration. Once this job is started and queued, 98 | the plugin connects to OpenShift and starts the slave Pod using the converted 99 | S2I image. The job then runs entirely on that slave. 100 | When this job finishes, the Pod is automatically destroyed by the Kubernetes 101 | plugin. 102 | 103 | 2. If the unit tests passed, the `sample-app-build` is started automatically via 104 | the Jenkins [promoted builds](https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin) 105 | plugin. This job will leverage the OpenShift Jenkins plugin and start 106 | build of the Docker image which will contain 'sample-app'. 107 | 108 | 3. Once the new Docker image for the `sample-app` is built, the 109 | `sample-app-stage` project will automatically deploy it into `stage` project 110 | and notify the QA team about availability for testing. 111 | 112 | 3. If the `sample-app` image passes the `stage` testing, you have to **manually 113 | promote** the `sample-app-build` build to be deployed to OpenShift. Since 114 | re-deploying the application replaces the existing running application, human 115 | intervention is needed to confirm this step. 116 | 117 | 4. Once the build is promoted, the `sample-app-deploy` job is started. This job 118 | will scale down the existing application deployment and redeploy it using the 119 | new Docker image. 120 | -------------------------------------------------------------------------------- /examples/master/.sti/bin/assemble: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | exec /usr/libexec/s2i/assemble 4 | -------------------------------------------------------------------------------- /examples/master/.sti/bin/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | # 3 | # This script runs the Jenkins server inside the Docker container. 4 | # It copies the configuration and plugins from /opt/openshift/configuration to 5 | # ${JENKINS_HOME}. 6 | # 7 | # It also sets the admin password to ${JENKINS_PASSWORD}. 8 | # 9 | source /opt/openshift/configuration/jenkins-common.sh 10 | 11 | # Since OpenShift runs this Docker image under random user ID, we have to assign 12 | # the 'jenkins' user name to this UID. For that we use nss_wrapper and 13 | # passwd.template. 14 | # If you adding more layers to this Docker image and the layer you adding add 15 | # more system users, make sure you update the passwd.template. 16 | generate_passwd_file `id -u` `id -g` 17 | 18 | mkdir /tmp/war 19 | unzip -q /usr/lib/jenkins/jenkins.war -d /tmp/war 20 | new_password_hash=`obfuscate_password ${JENKINS_PASSWORD:-password}` 21 | 22 | if [ ! -e ${JENKINS_HOME}/configured ]; then 23 | echo "Copying Jenkins configuration to ${JENKINS_HOME} ..." 24 | cp -r /opt/openshift/configuration/* ${JENKINS_HOME} 25 | rm -rf /opt/openshift/configuration/* 26 | 27 | if [ "$(ls -A /opt/openshift/plugins 2>/dev/null)" ]; then 28 | mkdir -p ${JENKINS_HOME}/plugins 29 | echo "Copying $(ls /opt/openshift/plugins | wc -l) Jenkins plugins to ${JENKINS_HOME} ..." 30 | cp -r /opt/openshift/plugins/* ${JENKINS_HOME}/plugins/ 31 | rm -rf /opt/openshift/plugins 32 | fi 33 | 34 | echo "Creating initial Jenkins 'admin' user ..." 35 | sed -i "s,.*,$new_password_hash,g" "${JENKINS_HOME}/users/admin/config.xml" 36 | echo $new_password_hash > ${JENKINS_HOME}/password 37 | touch ${JENKINS_HOME}/configured 38 | fi 39 | 40 | if [ -e ${JENKINS_HOME}/password ]; then 41 | echo "Detected password change, updating Jenkins configuration ..." 42 | # if the password environment variable has changed, update the jenkins config. 43 | # we don't want to just blindly do this on startup because the user might change their password via 44 | # the jenkins ui, so we only want to do this if the env variable has been explicitly modified from 45 | # the original value. 46 | old_password=`cat ${JENKINS_HOME}/password` 47 | if [ $old_password!=$new_password_hash ]; then 48 | sed -i "s,.*,$new_password_hash,g" "${JENKINS_HOME}/users/admin/config.xml" 49 | echo $new_password_hash > ${JENKINS_HOME}/password 50 | fi 51 | fi 52 | 53 | if [ -f "${CONFIG_PATH}.tpl" ]; then 54 | echo "Processing Jenkins Kubernetes configuration (${CONFIG_PATH}.tpl) ..." 55 | export KUBERNETES_CONFIG=$(generate_kubernetes_config) 56 | envsubst < "${CONFIG_PATH}.tpl" > "${CONFIG_PATH}" 57 | fi 58 | 59 | if [ -f "${JENKINS_HOME}/credentials.xml.tpl" ]; then 60 | if [ ! -z "${KUBERNETES_CONFIG}" ]; then 61 | echo "Processing Jenkins Kubernetes credentials (${JENKINS_HOME}/credentials.xml.tpl) ..." 62 | export KUBERNETES_CREDENTIALS=$(generate_kubernetes_credentials) 63 | fi 64 | # Fix the envsubst trying to substitute the $Hash inside credentials.xml 65 | export Hash="\$Hash" 66 | envsubst < "${JENKINS_HOME}/credentials.xml.tpl" > "${JENKINS_HOME}/credentials.xml" 67 | fi 68 | 69 | # Install jenkins-job-builder 70 | pushd ${JENKINS_HOME} 71 | curl -O https://bootstrap.pypa.io/ez_setup.py 72 | python ez_setup.py --user 73 | curl -O https://bootstrap.pypa.io/get-pip.py 74 | python get-pip.py --user 75 | export PATH=$PATH:./.local/bin 76 | curl -LOk https://github.com/openstack-infra/jenkins-job-builder/archive/master.zip 77 | unzip master.zip 78 | pip install --user jenkins-job-builder --find-links /var/lib/jenkins/jenkins-job-builder-master/ 79 | popd 80 | 81 | rm -rf /tmp/war 82 | 83 | # Don't show these in the Jenkins UI 84 | unset oc_auth oc_cmd KUBERNETES_CONFIG KUBERNETES_CREDENTIALS 85 | 86 | # if `docker run` first argument start with `--` the user is passing jenkins launcher arguments 87 | if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then 88 | # Start Jenkins in background and wait 89 | java $JAVA_OPTS -Dfile.encoding=UTF8 -jar /usr/lib/jenkins/jenkins.war $JENKINS_OPTS "$@" & 90 | sleep 60 91 | 92 | # Load Jenkins Jobs 93 | pushd ${JENKINS_HOME} 94 | .local/bin/jenkins-jobs --conf ${JENKINS_HOME}/jjb_conf.ini update ${JENKINS_HOME}/os-ci-pipeline.yaml 95 | popd 96 | 97 | # Kill jenkins and restart with exec so Jenkins takes over the shell pid 98 | pkill -f jenkins 99 | 100 | # Start Jenkins again 101 | exec java $JAVA_OPTS -Dfile.encoding=UTF8 -jar /usr/lib/jenkins/jenkins.war $JENKINS_OPTS "$@" 102 | fi 103 | 104 | 105 | # As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image 106 | exec "$@" 107 | -------------------------------------------------------------------------------- /examples/master/configuration/archived_jobs/build/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Starts a build in OpenShift 5 | false 6 | 7 | 8 | 9 | false 10 | 11 | 12 | Build Docker Image 13 | Build 14 | 15 | 16 | false 17 | false 18 | 19 | 20 | 0 21 | 0 22 | false 23 | project 24 | 25 | 26 | 27 | master 28 | false 29 | false 30 | false 31 | false 32 | 33 | false 34 | 35 | 36 | https://openshift.default.svc.cluster.local 37 | stage 38 | 39 | false 40 | sample-app 41 | 42 | 43 | true 44 | false 45 | 46 | 47 | 48 | 49 | 50 | css 51 | 52 | 53 | -------------------------------------------------------------------------------- /examples/master/configuration/archived_jobs/deploy-prod/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Deploys the sample application into prod project 5 | false 6 | 7 | 8 | 9 | -1 10 | 5 11 | -1 12 | -1 13 | 14 | 15 | 16 | 17 | false 18 | 19 | 20 | Production 21 | Deploy 22 | 23 | 24 | false 25 | false 26 | 27 | 28 | 0 29 | 0 30 | false 31 | project 32 | 33 | 34 | 35 | master 36 | false 37 | false 38 | false 39 | false 40 | 41 | false 42 | 43 | 44 | set +x 45 | source /var/lib/jenkins/jenkins-common.sh 46 | 47 | echo "Tagging stage/sample-app to production ..." 48 | $oc_cmd tag stage/sample-app:stable prod/sample-app:stable 49 | 50 | 51 | 52 | 53 | 54 | ari@redhat.com 55 | false 56 | false 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /examples/master/configuration/archived_jobs/deploy-stage/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Deploy the application on OpenShift 5 | false 6 | 7 | 8 | 9 | true 10 | 11 | 12 | Application Deploy 13 | Deploy 14 | 15 | 16 | false 17 | false 18 | 19 | 20 | 0 21 | 0 22 | false 23 | project 24 | 25 | 26 | 27 | master 28 | false 29 | false 30 | false 31 | false 32 | 33 | false 34 | 35 | 36 | https://openshift.default.svc.cluster.local 37 | stage 38 | 39 | false 40 | sample-app 41 | 0 42 | 43 | 44 | https://openshift.default.svc.cluster.local 45 | stage 46 | 47 | true 48 | sample-app:latest 49 | sample-app:stable 50 | 51 | 52 | https://openshift.default.svc.cluster.local 53 | sample-app 54 | stage 55 | 1 56 | 57 | false 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /examples/master/configuration/archived_jobs/test/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Build and verify the sample Ruby application 5 | 6 | -1 7 | 5 8 | -1 9 | -1 10 | 11 | false 12 | 13 | 14 | 15 | false 16 | 17 | 18 | Change Verification 19 | Build 20 | 21 | 22 | 23 | Verified 24 | 25 | 26 | 27 | false 28 | false 29 | 30 | 31 | 0 32 | 0 33 | false 34 | project 35 | 36 | 37 | 38 | 2 39 | 40 | 41 | master 42 | +refs/heads/master:refs/remotes/origin/master 43 | https://github.com/mfojtik/sample-app.git 44 | 45 | 46 | 47 | 48 | */master 49 | 50 | 51 | false 52 | 53 | 54 | 55 | ruby-22-centos7 56 | false 57 | false 58 | false 59 | false 60 | 61 | false 62 | 63 | 64 | # Install the rubygems 65 | bundle install --path=./vendor 66 | 67 | # Execute simple unit test 68 | bundle exec rake test 69 | 70 | 71 | 72 | 73 | 74 | false 75 | 76 | 77 | 78 | 79 | css 80 | 81 | 82 | -------------------------------------------------------------------------------- /examples/master/configuration/config.xml.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.619 5 | 10 6 | NORMAL 7 | true 8 | 9 | hudson.model.Computer.Configure:admin 10 | hudson.model.Computer.Configure:system_builder 11 | hudson.model.Computer.Delete:admin 12 | hudson.model.Hudson.Administer:admin 13 | hudson.model.Hudson.Administer:system_builder 14 | hudson.model.Hudson.Read:admin 15 | hudson.model.Hudson.Read:system_builder 16 | hudson.model.Item.Build:admin 17 | hudson.model.Item.Configure:admin 18 | hudson.model.Item.Create:admin 19 | hudson.model.Item.Delete:admin 20 | hudson.model.Item.Read:admin 21 | hudson.model.Item.Workspace:admin 22 | hudson.model.Run.Delete:admin 23 | hudson.model.Run.Update:admin 24 | hudson.model.View.Configure:admin 25 | hudson.model.View.Create:admin 26 | hudson.model.View.Delete:admin 27 | hudson.scm.SCM.Tag:admin 28 | 29 | 30 | true 31 | 32 | false 33 | ${ITEM_ROOTDIR}/workspace 34 | ${ITEM_ROOTDIR}/builds 35 | 36 | 37 | 38 | 39 | 40 | ${KUBERNETES_CONFIG} 41 | 42 | 1 43 | 0 44 | 45 | 46 | 47 | All 48 | false 49 | false 50 | 51 | 52 | 53 | All 54 | 49187 55 | 56 | 57 | 58 | true 59 | 60 | -------------------------------------------------------------------------------- /examples/master/configuration/credentials.xml.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ${KUBERNETES_CREDENTIALS} 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/master/configuration/jenkins-common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export DEFAULT_SLAVE_DIRECTORY=/opt/app-root/jenkins 4 | export JENKINS_HOME=/var/lib/jenkins 5 | export CONFIG_PATH=${JENKINS_HOME}/config.xml 6 | export PROJECT_NAME=${PROJECT_NAME:-ci} 7 | export OPENSHIFT_API_URL=https://openshift.default.svc.cluster.local 8 | export KUBE_CA=/run/secrets/kubernetes.io/serviceaccount/ca.crt 9 | export AUTH_TOKEN=/run/secrets/kubernetes.io/serviceaccount/token 10 | export JENKINS_PASSWORD KUBERNETES_SERVICE_HOST KUBERNETES_SERVICE_PORT 11 | export ITEM_ROOTDIR="\${ITEM_ROOTDIR}" # Preserve this variable Jenkins has in config.xml 12 | export K8S_PLUGIN_POD_TEMPLATES="" 13 | export PATH=$PATH:${JENKINS_HOME}/.local/bin 14 | 15 | export oc_auth="--token=$(cat $AUTH_TOKEN) --certificate-authority=${KUBE_CA}" 16 | export oc_cmd="oc -n ${PROJECT_NAME} --server=$OPENSHIFT_API_URL ${oc_auth}" 17 | 18 | function has_service_account() { 19 | [ -f "${AUTH_TOKEN}" ] 20 | } 21 | 22 | # get_imagestream_names returns a list of imagestreams names that contains 23 | # label 'role=jenkins-slave' 24 | function get_is_names() { 25 | $oc_cmd get is -l role=jenkins-slave -o template --template "{{range .items}}{{.metadata.name}} {{end}}" 26 | } 27 | 28 | # convert_is_to_slave converts the OpenShift imagestream to a Jenkins Kubernetes 29 | # Plugin slave configuration. 30 | function convert_is_to_slave() { 31 | local name=$1 32 | local template_file=$(mktemp) 33 | local template=" 34 | 35 | {{.metadata.name}} 36 | {{.status.dockerImageRepository}} 37 | false 38 | 39 | 40 | 5 41 | 42 | {{if index .metadata.annotations \"slave-directory\"}}{{index .metadata.annotations \"slave-directory\"}}{{else}}${DEFAULT_SLAVE_DIRECTORY}{{end}} 43 | 44 | 45 | " 46 | echo "${template}" > ${template_file} 47 | $oc_cmd get is/${name} -o templatefile --template ${template_file} 48 | rm -f ${template_file} &>/dev/null 49 | } 50 | 51 | # Generate passwd file based on current uid 52 | function generate_passwd_file() { 53 | export USER_ID=$1 54 | export GROUP_ID=$2 55 | envsubst < /opt/openshift/passwd.template > /opt/openshift/passwd 56 | export LD_PRELOAD=libnss_wrapper.so 57 | export NSS_WRAPPER_PASSWD=/opt/openshift/passwd 58 | export NSS_WRAPPER_GROUP=/etc/group 59 | } 60 | 61 | function obfuscate_password { 62 | local password="$1" 63 | local acegi_security_path=`find /tmp/war/WEB-INF/lib/ -name acegi-security-*.jar` 64 | local commons_codec_path=`find /tmp/war/WEB-INF/lib/ -name commons-codec-*.jar` 65 | 66 | java -classpath "${acegi_security_path}:${commons_codec_path}:/opt/openshift/password-encoder.jar" com.redhat.openshift.PasswordEncoder $password 67 | } 68 | 69 | function generate_kubernetes_config() { 70 | local slave_templates="" 71 | if has_service_account; then 72 | for name in $(get_is_names); do 73 | echo "Adding ${name} imagestream as Jenkins Slave ..." 74 | slave_templates+=$(convert_is_to_slave ${name}) 75 | done 76 | else 77 | return 78 | fi 79 | [ -z "${slave_templates}" ] && return 80 | echo " 81 | 82 | openshift 83 | 84 | ${slave_templates} 85 | 86 | https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT} 87 | true 88 | ci 89 | http://jenkins:8080 90 | 1a12dfa4-7fc5-47a7-aa17-cc56572a41c7 91 | 10 92 | 5 93 | 94 | " 95 | } 96 | 97 | function generate_kubernetes_credentials() { 98 | echo " 99 | 100 | 101 | 102 | 103 | 104 | GLOBAL 105 | 1a12dfa4-7fc5-47a7-aa17-cc56572a41c7 106 | 107 | 108 | 109 | 110 | " 111 | } 112 | -------------------------------------------------------------------------------- /examples/master/configuration/jjb_conf.ini: -------------------------------------------------------------------------------- 1 | [jenkins] 2 | url=http://jenkins:8080 3 | user=admin 4 | password=password -------------------------------------------------------------------------------- /examples/master/configuration/jobs/build/promotions/Deploy/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 5 | 6 | true 7 | true 8 | false 9 | false 10 | 11 | false 12 | 13 | 14 | 15 | 16 | 17 | 18 | star-green 19 | 20 | 21 | deploy-stage 22 | 23 | SUCCESS 24 | 0 25 | BLUE 26 | true 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/master/configuration/jobs/test/promotions/Verified/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | 5 | 6 | 7 | 8 | true 9 | false 10 | false 11 | false 12 | 13 | false 14 | 15 | 16 | false 17 | 18 | 19 | star-green 20 | master 21 | 22 | 23 | build 24 | 25 | SUCCESS 26 | 0 27 | BLUE 28 | true 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /examples/master/configuration/os-ci-pipeline.yaml: -------------------------------------------------------------------------------- 1 | - defaults: 2 | name: os-ci-pipeline-defaults 3 | logrotate: 4 | numToKeep: 5 5 | artifactNumToKeep: 5 6 | wrappers: 7 | - ansicolor: 8 | colormap: css 9 | - workspace-cleanup 10 | - timestamps 11 | 12 | - job-template: 13 | name: 'test' 14 | defaults: os-ci-pipeline-defaults 15 | description: | 16 | Build and verify the sample Ruby application 17 | concurrent: false 18 | node: ruby-22-centos7 19 | properties: 20 | - delivery-pipeline: 21 | stage: Build 22 | task: Change Verification 23 | - promoted-build: 24 | names: 25 | - "Verified" 26 | scm: 27 | - git: 28 | url: https://github.com/mfojtik/sample-app.git 29 | branches: 30 | - '*/master' 31 | skip-tag: true 32 | builders: 33 | - shell: | 34 | # Install the rubygems 35 | bundle install --path=./vendor 36 | 37 | # Execute simple unit test 38 | bundle exec rake test 39 | 40 | - job-template: 41 | name: 'build' 42 | defaults: os-ci-pipeline-defaults 43 | description: | 44 | Starts a build in OpenShift 45 | concurrent: false 46 | node: master 47 | properties: 48 | - delivery-pipeline: 49 | stage: Build 50 | task: Build Docker Image 51 | builders: 52 | - openshift-builder: 53 | api-url: https://openshift.default.svc.cluster.local 54 | bld-cfg: sample-app 55 | namespace: stage 56 | show-build-logs: true 57 | 58 | - job-template: 59 | name: 'deploy-stage' 60 | defaults: os-ci-pipeline-defaults 61 | description: | 62 | Deploy the application on OpenShift 63 | concurrent: false 64 | node: master 65 | properties: 66 | - delivery-pipeline: 67 | stage: Deploy 68 | task: Application Deploy 69 | builders: 70 | - openshift-scaler: 71 | api-url: https://openshift.default.svc.cluster.local 72 | dep-cfg: sample-app 73 | namespace: stage 74 | replica-count: 0 75 | - openshift-img-tagger: 76 | api-url: https://openshift.default.svc.cluster.local 77 | test-tag: sample-app:latest 78 | prod-tag: sample-app:stable 79 | namespace: stage 80 | - openshift-dep-verify: 81 | api-url: https://openshift.default.svc.cluster.local 82 | dep-cfg: sample-app 83 | namespace: stage 84 | replica-count: 1 85 | 86 | - job-template: 87 | name: 'deploy-prod' 88 | defaults: os-ci-pipeline-defaults 89 | description: | 90 | Deploys the sample application into the prod project 91 | concurrent: false 92 | node: master 93 | properties: 94 | - delivery-pipeline: 95 | stage: Deploy 96 | task: Production 97 | builders: 98 | - shell: | 99 | set +x 100 | source /var/lib/jenkins/jenkins-common.sh 101 | 102 | echo "Tagging stage/sample-app to production ..." 103 | $oc_cmd tag stage/sample-app:latest prod/sample-app:latest 104 | 105 | publishers: 106 | - email: 107 | recipients: ari@redhat.com 108 | 109 | - project: 110 | name: os-ci-pipeline 111 | jobs: 112 | - 'test' 113 | - 'build' 114 | - 'deploy-stage' 115 | - 'deploy-prod' -------------------------------------------------------------------------------- /examples/master/jenkins-with-k8s-plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "jenkins-master", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "Provides Jenkins master with Kubernetes slave support", 9 | "iconClass": "icon-jenkins" 10 | } 11 | }, 12 | "labels": { 13 | "template": "jenkins-master-template" 14 | }, 15 | "parameters": [ 16 | { 17 | "name": "JENKINS_SERVICE_NAME", 18 | "description": "Jenkins service name", 19 | "value": "jenkins" 20 | }, 21 | { 22 | "name": "JENKINS_PASSWORD", 23 | "description": "Password for the Jenkins user", 24 | "generate": "expression", 25 | "value": "password" 26 | }, 27 | { 28 | "name": "JENKINS_IMAGE", 29 | "description": "Jenkins Docker image to use", 30 | "value": "openshift/jenkins-1-centos7" 31 | }, 32 | { 33 | "name": "JENKINS_S2I_REPO_URL", 34 | "description": "The repository to use to build the Jenkins master", 35 | "value": "git://github.com/arilivigni/openshift-ci-pipeline" 36 | }, 37 | { 38 | "name": "JENKINS_S2I_REPO_CONTEXTDIR", 39 | "description": "The directory inside the repository", 40 | "value": "examples/master" 41 | }, 42 | { 43 | "name": "JENKINS_S2I_REPO_REF", 44 | "description": "The GIT ref to use to build the sources", 45 | "value": "master" 46 | } 47 | ], 48 | "objects": [ 49 | { 50 | "kind": "Service", 51 | "apiVersion": "v1", 52 | "metadata": { 53 | "name": "${JENKINS_SERVICE_NAME}", 54 | "creationTimestamp": null 55 | }, 56 | "spec": { 57 | "ports": [ 58 | { 59 | "name": "web", 60 | "protocol": "TCP", 61 | "port": 8080, 62 | "targetPort": 8080, 63 | "nodePort": 0 64 | }, 65 | { 66 | "name": "jnlp", 67 | "protocol": "TCP", 68 | "port": 49187, 69 | "targetPort": 49187, 70 | "nodePort": 0 71 | } 72 | ], 73 | "selector": { 74 | "name": "${JENKINS_SERVICE_NAME}" 75 | }, 76 | "portalIP": "", 77 | "type": "ClusterIP", 78 | "sessionAffinity": "None" 79 | } 80 | }, 81 | { 82 | "kind": "Route", 83 | "apiVersion": "v1", 84 | "metadata": { 85 | "name": "jenkins", 86 | "creationTimestamp": null 87 | }, 88 | "spec": { 89 | "to": { 90 | "kind": "Service", 91 | "name": "${JENKINS_SERVICE_NAME}" 92 | }, 93 | "port": { 94 | "targetPort": 8080 95 | }, 96 | "tls": { 97 | "termination": "edge", 98 | "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm\n47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M\nmNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC\nMAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd\nTMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m\nV7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc\nyfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j\njhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q\n+Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w=\n-----END CERTIFICATE-----", 99 | "key": "-----BEGIN PRIVATE KEY-----\nMIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMrvgu6ZTTefNN7j\njiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm47VRx5Qrf/YL\nXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1MmNrQUgZyQC6X\nIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAECgYEAnxOjEj/vrLNLMZE1Q9H7PZVF\nWdP/JQVNvQ7tCpZ3ZdjxHwkvf//aQnuxS5yX2Rnf37BS/TZu+TIkK4373CfHomSx\nUTAn2FsLmOJljupgGcoeLx5K5nu7B7rY5L1NHvdpxZ4YjeISrRtEPvRakllENU5y\ngJE8c2eQOx08ZSRE4TkCQQD7dws2/FldqwdjJucYijsJVuUdoTqxP8gWL6bB251q\nelP2/a6W2elqOcWId28560jG9ZS3cuKvnmu/4LG88vZFAkEAzphrH3673oTsHN+d\nuBd5uyrlnGjWjuiMKv2TPITZcWBjB8nJDSvLneHF59MYwejNNEof2tRjgFSdImFH\nmi995wJBAMtPjW6wiqRz0i41VuT9ZgwACJBzOdvzQJfHgSD9qgFb1CU/J/hpSRIM\nkYvrXK9MbvQFvG6x4VuyT1W8mpe1LK0CQAo8VPpffhFdRpF7psXLK/XQ/0VLkG3O\nKburipLyBg/u9ZkaL0Ley5zL5dFBjTV2Qkx367Ic2b0u9AYTCcgi2DsCQQD3zZ7B\nv7BOm7MkylKokY2MduFFXU0Bxg6pfZ7q3rvg8gqhUFbaMStPRYg6myiDiW/JfLhF\nTcFT4touIo7oriFJ\n-----END PRIVATE KEY-----", 100 | "caCertificate": "-----BEGIN CERTIFICATE-----\nMIIEFzCCAv+gAwIBAgIJALK1iUpF2VQLMA0GCSqGSIb3DQEBBQUAMIGhMQswCQYD\nVQQGEwJVUzELMAkGA1UECAwCU0MxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoG\nA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDEQMA4GA1UECwwHVGVzdCBDQTEaMBgG\nA1UEAwwRd3d3LmV4YW1wbGVjYS5jb20xIjAgBgkqhkiG9w0BCQEWE2V4YW1wbGVA\nZXhhbXBsZS5jb20wHhcNMTUwMTEyMTQxNTAxWhcNMjUwMTA5MTQxNTAxWjCBoTEL\nMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkx\nHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0Ex\nGjAYBgNVBAMMEXd3dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFt\ncGxlQGV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nw2rK1J2NMtQj0KDug7g7HRKl5jbf0QMkMKyTU1fBtZ0cCzvsF4CqV11LK4BSVWaK\nrzkaXe99IVJnH8KdOlDl5Dh/+cJ3xdkClSyeUT4zgb6CCBqg78ePp+nN11JKuJlV\nIG1qdJpB1J5O/kCLsGcTf7RS74MtqMFo96446Zvt7YaBhWPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----" 101 | } 102 | } 103 | }, 104 | { 105 | "kind": "ImageStream", 106 | "apiVersion": "v1", 107 | "metadata": { 108 | "name": "jenkins-master" 109 | }, 110 | "spec": {} 111 | }, 112 | { 113 | "kind": "BuildConfig", 114 | "apiVersion": "v1", 115 | "metadata": { 116 | "name": "jenkins-master", 117 | "annotations": { 118 | "description": "Customize OpenShift Jenkins image to install additional plugins" 119 | }, 120 | "labels": { 121 | "name": "jenkins-master" 122 | } 123 | }, 124 | "spec": { 125 | "triggers": [ 126 | { 127 | "type": "imageChange", 128 | "imageChange": {} 129 | }, 130 | { 131 | "type": "ConfigChange" 132 | } 133 | ], 134 | "source": { 135 | "type": "Git", 136 | "contextDir": "${JENKINS_S2I_REPO_CONTEXTDIR}", 137 | "git": { 138 | "uri": "${JENKINS_S2I_REPO_URL}", 139 | "ref": "${JENKINS_S2I_REPO_REF}" 140 | } 141 | }, 142 | "strategy": { 143 | "type": "Source", 144 | "sourceStrategy": { 145 | "from": { 146 | "kind": "DockerImage", 147 | "name": "${JENKINS_IMAGE}" 148 | } 149 | } 150 | }, 151 | "output": { 152 | "to": { 153 | "kind": "ImageStreamTag", 154 | "name": "jenkins-master:latest" 155 | } 156 | }, 157 | "resources": {} 158 | } 159 | }, 160 | { 161 | "kind": "DeploymentConfig", 162 | "apiVersion": "v1", 163 | "metadata": { 164 | "name": "${JENKINS_SERVICE_NAME}", 165 | "creationTimestamp": null 166 | }, 167 | "spec": { 168 | "strategy": { 169 | "type": "Recreate", 170 | "resources": {} 171 | }, 172 | "triggers": [ 173 | { 174 | "type": "ImageChange", 175 | "imageChangeParams": { 176 | "automatic": true, 177 | "containerNames": [ 178 | "jenkins" 179 | ], 180 | "from": { 181 | "kind": "ImageStreamTag", 182 | "name": "jenkins-master:latest" 183 | }, 184 | "lastTriggeredImage": "" 185 | } 186 | }, 187 | { 188 | "type": "ConfigChange" 189 | } 190 | ], 191 | "replicas": 1, 192 | "selector": { 193 | "name": "${JENKINS_SERVICE_NAME}" 194 | }, 195 | "template": { 196 | "metadata": { 197 | "creationTimestamp": null, 198 | "labels": { 199 | "name": "${JENKINS_SERVICE_NAME}" 200 | } 201 | }, 202 | "spec": { 203 | "containers": [ 204 | { 205 | "name": "jenkins", 206 | "image": "jenkins-master", 207 | "env": [ 208 | { 209 | "name": "JENKINS_PASSWORD", 210 | "value": "${JENKINS_PASSWORD}" 211 | } 212 | ], 213 | "resources": {}, 214 | "volumeMounts": [ 215 | { 216 | "name": "${JENKINS_SERVICE_NAME}-data", 217 | "mountPath": "/var/lib/jenkins" 218 | } 219 | ], 220 | "terminationMessagePath": "/dev/termination-log", 221 | "imagePullPolicy": "IfNotPresent", 222 | "capabilities": {}, 223 | "securityContext": { 224 | "capabilities": {}, 225 | "privileged": false 226 | } 227 | } 228 | ], 229 | "volumes": [ 230 | { 231 | "name": "${JENKINS_SERVICE_NAME}-data", 232 | "emptyDir": { 233 | "medium": "" 234 | } 235 | } 236 | ], 237 | "restartPolicy": "Always", 238 | "dnsPolicy": "ClusterFirst" 239 | } 240 | } 241 | } 242 | } 243 | ] 244 | } 245 | -------------------------------------------------------------------------------- /examples/master/plugins/ColumnPack-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ColumnPack-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ColumnsPlugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ColumnsPlugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/Exclusion.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/Exclusion.jpi -------------------------------------------------------------------------------- /examples/master/plugins/PrioritySorter.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/PrioritySorter.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ace-editor.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ace-editor.jpi -------------------------------------------------------------------------------- /examples/master/plugins/analysis-core.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/analysis-core.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ansicolor.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ansicolor.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ant.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ant.jpi -------------------------------------------------------------------------------- /examples/master/plugins/antisamy-markup-formatter.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/antisamy-markup-formatter.jpi -------------------------------------------------------------------------------- /examples/master/plugins/async-http-client.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/async-http-client.jpi -------------------------------------------------------------------------------- /examples/master/plugins/authentication-tokens.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/authentication-tokens.jpi -------------------------------------------------------------------------------- /examples/master/plugins/aws-java-sdk.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/aws-java-sdk.jpi -------------------------------------------------------------------------------- /examples/master/plugins/build-node-column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/build-node-column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/build-pipeline-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/build-pipeline-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/build-timeout.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/build-timeout.jpi -------------------------------------------------------------------------------- /examples/master/plugins/build-view-column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/build-view-column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/buildresult-trigger.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/buildresult-trigger.jpi -------------------------------------------------------------------------------- /examples/master/plugins/built-on-column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/built-on-column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/compact-columns.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/compact-columns.jpi -------------------------------------------------------------------------------- /examples/master/plugins/conditional-buildstep.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/conditional-buildstep.jpi -------------------------------------------------------------------------------- /examples/master/plugins/config-file-provider.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/config-file-provider.jpi -------------------------------------------------------------------------------- /examples/master/plugins/configure-job-column-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/configure-job-column-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/console-column-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/console-column-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/console-tail.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/console-tail.jpi -------------------------------------------------------------------------------- /examples/master/plugins/copy-to-slave.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/copy-to-slave.jpi -------------------------------------------------------------------------------- /examples/master/plugins/copyartifact.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/copyartifact.jpi -------------------------------------------------------------------------------- /examples/master/plugins/credentials-binding.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/credentials-binding.jpi -------------------------------------------------------------------------------- /examples/master/plugins/credentials.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/credentials.jpi -------------------------------------------------------------------------------- /examples/master/plugins/credentials.jpi.pinned: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/credentials.jpi.pinned -------------------------------------------------------------------------------- /examples/master/plugins/cron_column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/cron_column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/cvs.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/cvs.jpi -------------------------------------------------------------------------------- /examples/master/plugins/dashboard-view.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/dashboard-view.jpi -------------------------------------------------------------------------------- /examples/master/plugins/delivery-pipeline-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/delivery-pipeline-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/depgraph-view.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/depgraph-view.jpi -------------------------------------------------------------------------------- /examples/master/plugins/description-column-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/description-column-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/disk-usage.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/disk-usage.jpi -------------------------------------------------------------------------------- /examples/master/plugins/docker-build-step.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/docker-build-step.jpi -------------------------------------------------------------------------------- /examples/master/plugins/docker-commons.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/docker-commons.jpi -------------------------------------------------------------------------------- /examples/master/plugins/docker-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/docker-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/durable-task.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/durable-task.jpi -------------------------------------------------------------------------------- /examples/master/plugins/dynamic-axis.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/dynamic-axis.jpi -------------------------------------------------------------------------------- /examples/master/plugins/dynamicparameter.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/dynamicparameter.jpi -------------------------------------------------------------------------------- /examples/master/plugins/email-ext-recipients-column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/email-ext-recipients-column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/email-ext.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/email-ext.jpi -------------------------------------------------------------------------------- /examples/master/plugins/envinject.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/envinject.jpi -------------------------------------------------------------------------------- /examples/master/plugins/extended-choice-parameter.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/extended-choice-parameter.jpi -------------------------------------------------------------------------------- /examples/master/plugins/external-monitor-job.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/external-monitor-job.jpi -------------------------------------------------------------------------------- /examples/master/plugins/extra-columns.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/extra-columns.jpi -------------------------------------------------------------------------------- /examples/master/plugins/flexible-publish.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/flexible-publish.jpi -------------------------------------------------------------------------------- /examples/master/plugins/gerrit-trigger.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/gerrit-trigger.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ghprb.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ghprb.jpi -------------------------------------------------------------------------------- /examples/master/plugins/git-client.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/git-client.jpi -------------------------------------------------------------------------------- /examples/master/plugins/git-client.jpi.pinned: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/git-client.jpi.pinned -------------------------------------------------------------------------------- /examples/master/plugins/git-server.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/git-server.jpi -------------------------------------------------------------------------------- /examples/master/plugins/git.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/git.jpi -------------------------------------------------------------------------------- /examples/master/plugins/git.jpi.pinned: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/git.jpi.pinned -------------------------------------------------------------------------------- /examples/master/plugins/github-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/github-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/github-oauth.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/github-oauth.jpi -------------------------------------------------------------------------------- /examples/master/plugins/github.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/github.jpi -------------------------------------------------------------------------------- /examples/master/plugins/greenballs.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/greenballs.jpi -------------------------------------------------------------------------------- /examples/master/plugins/groovy-postbuild.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/groovy-postbuild.jpi -------------------------------------------------------------------------------- /examples/master/plugins/groovy.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/groovy.jpi -------------------------------------------------------------------------------- /examples/master/plugins/instant-messaging.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/instant-messaging.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ircbot.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ircbot.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jackson2-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jackson2-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/javadoc.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/javadoc.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jenkins-multijob-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jenkins-multijob-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jobConfigHistory.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jobConfigHistory.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jobtype-column.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jobtype-column.jpi -------------------------------------------------------------------------------- /examples/master/plugins/join.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/join.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jquery-detached.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jquery-detached.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jquery-ui.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jquery-ui.jpi -------------------------------------------------------------------------------- /examples/master/plugins/jquery.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/jquery.jpi -------------------------------------------------------------------------------- /examples/master/plugins/junit.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/junit.jpi -------------------------------------------------------------------------------- /examples/master/plugins/kubernetes.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/kubernetes.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ldap.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ldap.jpi -------------------------------------------------------------------------------- /examples/master/plugins/mailer.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/mailer.jpi -------------------------------------------------------------------------------- /examples/master/plugins/mapdb-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/mapdb-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/mask-passwords.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/mask-passwords.jpi -------------------------------------------------------------------------------- /examples/master/plugins/matrix-auth.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/matrix-auth.jpi -------------------------------------------------------------------------------- /examples/master/plugins/matrix-project.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/matrix-project.jpi -------------------------------------------------------------------------------- /examples/master/plugins/maven-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/maven-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/metrics.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/metrics.jpi -------------------------------------------------------------------------------- /examples/master/plugins/multiple-scms.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/multiple-scms.jpi -------------------------------------------------------------------------------- /examples/master/plugins/naginator.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/naginator.jpi -------------------------------------------------------------------------------- /examples/master/plugins/nested-view.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/nested-view.jpi -------------------------------------------------------------------------------- /examples/master/plugins/nodelabelparameter.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/nodelabelparameter.jpi -------------------------------------------------------------------------------- /examples/master/plugins/nodenamecolumn.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/nodenamecolumn.jpi -------------------------------------------------------------------------------- /examples/master/plugins/openshift-jenkins-buildutils.hpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/openshift-jenkins-buildutils.hpi -------------------------------------------------------------------------------- /examples/master/plugins/openshift-pipeline.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/openshift-pipeline.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ownership.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ownership.jpi -------------------------------------------------------------------------------- /examples/master/plugins/pam-auth.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/pam-auth.jpi -------------------------------------------------------------------------------- /examples/master/plugins/parameterized-trigger.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/parameterized-trigger.jpi -------------------------------------------------------------------------------- /examples/master/plugins/plain-credentials.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/plain-credentials.jpi -------------------------------------------------------------------------------- /examples/master/plugins/postbuildscript.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/postbuildscript.jpi -------------------------------------------------------------------------------- /examples/master/plugins/progress-bar-column-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/progress-bar-column-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/project-stats-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/project-stats-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/promoted-builds.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/promoted-builds.jpi -------------------------------------------------------------------------------- /examples/master/plugins/python.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/python.jpi -------------------------------------------------------------------------------- /examples/master/plugins/rebuild.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/rebuild.jpi -------------------------------------------------------------------------------- /examples/master/plugins/role-strategy.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/role-strategy.jpi -------------------------------------------------------------------------------- /examples/master/plugins/run-condition.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/run-condition.jpi -------------------------------------------------------------------------------- /examples/master/plugins/s3.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/s3.jpi -------------------------------------------------------------------------------- /examples/master/plugins/schedule-build-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/schedule-build-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/scm-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/scm-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/script-security.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/script-security.jpi -------------------------------------------------------------------------------- /examples/master/plugins/scriptler.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/scriptler.jpi -------------------------------------------------------------------------------- /examples/master/plugins/scripttrigger.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/scripttrigger.jpi -------------------------------------------------------------------------------- /examples/master/plugins/sectioned-view.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/sectioned-view.jpi -------------------------------------------------------------------------------- /examples/master/plugins/shiningpanda.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/shiningpanda.jpi -------------------------------------------------------------------------------- /examples/master/plugins/skip-certificate-check.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/skip-certificate-check.jpi -------------------------------------------------------------------------------- /examples/master/plugins/sonar.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/sonar.jpi -------------------------------------------------------------------------------- /examples/master/plugins/sonargraph-plugin.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/sonargraph-plugin.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ssh-agent.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ssh-agent.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ssh-credentials.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ssh-credentials.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ssh-slaves.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ssh-slaves.jpi -------------------------------------------------------------------------------- /examples/master/plugins/subversion.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/subversion.jpi -------------------------------------------------------------------------------- /examples/master/plugins/swarm.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/swarm.jpi -------------------------------------------------------------------------------- /examples/master/plugins/test-stability.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/test-stability.jpi -------------------------------------------------------------------------------- /examples/master/plugins/thinBackup.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/thinBackup.jpi -------------------------------------------------------------------------------- /examples/master/plugins/throttle-concurrents.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/throttle-concurrents.jpi -------------------------------------------------------------------------------- /examples/master/plugins/timestamper.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/timestamper.jpi -------------------------------------------------------------------------------- /examples/master/plugins/tmpcleaner.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/tmpcleaner.jpi -------------------------------------------------------------------------------- /examples/master/plugins/token-macro.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/token-macro.jpi -------------------------------------------------------------------------------- /examples/master/plugins/toolenv.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/toolenv.jpi -------------------------------------------------------------------------------- /examples/master/plugins/translation.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/translation.jpi -------------------------------------------------------------------------------- /examples/master/plugins/update-sites-manager.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/update-sites-manager.jpi -------------------------------------------------------------------------------- /examples/master/plugins/urltrigger.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/urltrigger.jpi -------------------------------------------------------------------------------- /examples/master/plugins/windows-slaves.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/windows-slaves.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-aggregator.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-aggregator.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-basic-steps.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-basic-steps.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-cps-global-lib.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-cps-global-lib.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-cps.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-cps.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-durable-task-step.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-durable-task-step.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-job.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-job.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-scm-step.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-scm-step.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-step-api.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-step-api.jpi -------------------------------------------------------------------------------- /examples/master/plugins/workflow-support.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/workflow-support.jpi -------------------------------------------------------------------------------- /examples/master/plugins/ws-cleanup.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/ws-cleanup.jpi -------------------------------------------------------------------------------- /examples/master/plugins/xunit.jpi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/examples/master/plugins/xunit.jpi -------------------------------------------------------------------------------- /examples/slave/Dockerfile: -------------------------------------------------------------------------------- 1 | # The FROM will be replaced when building in OpenShift 2 | FROM openshift/base-centos7 3 | 4 | # Install headless Java 5 | USER root 6 | RUN yum install -y --setopt=tsflags=nodocs --enablerepo=centosplus epel-release && \ 7 | rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 && \ 8 | yum install -y --setopt=tsflags=nodocs install java-1.8.0-openjdk-headless nss_wrapper && \ 9 | yum clean all && \ 10 | mkdir -p /opt/app-root/jenkins && \ 11 | chown -R 1001:0 /opt/app-root/jenkins && \ 12 | chmod -R g+w /opt/app-root/jenkins 13 | 14 | # Copy the entrypoint 15 | COPY contrib/openshift/* /opt/app-root/jenkins/ 16 | USER 1001 17 | 18 | # Run the JNLP client by default 19 | # To use swarm client, specify "/opt/app-root/jenkins/run-swarm-client" as Command 20 | ENTRYPOINT ["/opt/app-root/jenkins/run-jnlp-client"] 21 | -------------------------------------------------------------------------------- /examples/slave/README.md: -------------------------------------------------------------------------------- 1 | # S2I image to Jenkins slave convertor 2 | 3 | This directory contains the convertor which transforms the S2I builder image 4 | into a Jenkins slave image. 5 | 6 | ### Jenkins Slaves 7 | 8 | #### Manual Setup 9 | 10 | You can use any Docker image as a Jenkins Slave as long as it runs either JNLP 11 | client or the swarm plugin client. For example, look at these two scripts: 12 | 13 | * [run-jnlp-client](https://github.com/mfojtik/jenkins-ci/blob/master/jenkins-slave/contrib/openshift/run-jnlp-client) 14 | * [run-swarm-client](https://github.com/mfojtik/jenkins-ci/blob/master/jenkins-slave/contrib/openshift/run-swarm-client) 15 | 16 | Once you have this Docker Image, you have to manually configure Jenkins Master 17 | to use these images as a slaves. Follow the steps in the 18 | [jenkins-kubernetes-plugin](https://github.com/jenkinsci/kubernetes-plugin#running-in-kubernetes-google-container-engine) 19 | documentation. 20 | 21 | #### Tagging existing ImageStream as Jenkins Slave 22 | 23 | If you have your Jenkins Slave image imported in OpenShift and available as an 24 | ImageStream, you can tell Jenkins Master to automatically add it as a Kubernetes 25 | Plugin slave. To do that, you have to set following labels: 26 | 27 | ```json 28 | { 29 | "kind": "ImageStream", 30 | "apiVersion": "v1", 31 | "metadata": { 32 | "name": "jenkins-slave-image", 33 | "labels": { 34 | "role": "jenkins-slave" 35 | }, 36 | "annotations": { 37 | "slave-label": "my-slave", 38 | "slave-directory": "/opt/app-root/jenkins" 39 | } 40 | }, 41 | "spec": {} 42 | } 43 | ``` 44 | 45 | The `role=jenkins-slave` label is mandatory, but the annotations are optional. 46 | If the `slave-label` annotations is not set, Jenkins will use the ImageStream name as 47 | label. If the `slave-directory` is not set, Jenkins will use default 48 | */opt/app-root/jenkins* directory. 49 | 50 | Make sure that the Jenkins slave directory is world writeable. 51 | 52 | #### Using this template 53 | 54 | ```console 55 | $ oc create -f https://raw.githubusercontent.com/openshift/jenkins/master/examples/slave/s2i-slave-template.json 56 | ``` 57 | 58 | The `s2i-to-jenkins-slave` template defines a 59 | [BuildConfig](https://docs.openshift.org/latest/dev_guide/builds.html#defining-a-buildconfig) 60 | that uses the [Docker 61 | Strategy](https://docs.openshift.org/latest/dev_guide/builds.html#docker-strategy-options) 62 | to rebuild the S2I image (or any compatible image) to serve as a Jenkins Slave. 63 | For that, we have to install JRE to run the `slave.jar`, setup nss_wrapper to 64 | provide the username for the random UID the container will run as and a shell 65 | script that we launch as an entrypoint from Jenkins. 66 | 67 | When you choose `s2i-to-jenkins-slave` template, you have to specify the image 68 | name you want to convert. The default value is `ruby-22-centos7`, but you can 69 | change it to any available ImageStream you have in OpenShift. 70 | 71 | Once you instantiate the template, go to *Browse/Builds* where you can see that 72 | the build was started. You have to wait till the build finishes and the 73 | ImageStream contains the Docker image for slaves. 74 | 75 | The labels are annotations are automatically set for this ImageStream, so you 76 | can ignore the section above. 77 | -------------------------------------------------------------------------------- /examples/slave/contrib/openshift/passwd.template: -------------------------------------------------------------------------------- 1 | root:x:0:0:root:/root:/bin/bash 2 | bin:x:1:1:bin:/bin:/sbin/nologin 3 | daemon:x:2:2:daemon:/sbin:/sbin/nologin 4 | adm:x:3:4:adm:/var/adm:/sbin/nologin 5 | lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin 6 | sync:x:5:0:sync:/sbin:/bin/sync 7 | shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown 8 | halt:x:7:0:halt:/sbin:/sbin/halt 9 | mail:x:8:12:mail:/var/spool/mail:/sbin/nologin 10 | operator:x:11:0:operator:/root:/sbin/nologin 11 | games:x:12:100:games:/usr/games:/sbin/nologin 12 | ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin 13 | nobody:x:99:99:Nobody:/:/sbin/nologin 14 | dbus:x:81:81:System message bus:/:/sbin/nologin 15 | polkitd:x:999:999:User for polkitd:/:/sbin/nologin 16 | jenkins:x:${USER_ID}:${GROUP_ID}:Jenkins Continuous Integration Server:${JENKINS_HOME}:/bin/false 17 | -------------------------------------------------------------------------------- /examples/slave/contrib/openshift/run-jnlp-client: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script will launch the JNLP remoting client that Jenkins master server 4 | # will use for the auto-discovery of this slave. 5 | # 6 | 7 | # The directory that Jenkins will execute the builds and store cache files. 8 | # The directory has to be writeable for the user that the container is running 9 | # under. 10 | export JENKINS_HOME=/opt/app-root/jenkins 11 | 12 | # Setup nss_wrapper so the random user OpenShift will run this container 13 | # has an entry in /etc/passwd. 14 | # This is needed for 'git' and other tools to work properly. 15 | # 16 | export USER_ID=$(id -u) 17 | export GROUP_ID=$(id -g) 18 | envsubst < ${JENKINS_HOME}/passwd.template > ${JENKINS_HOME}/passwd 19 | export LD_PRELOAD=libnss_wrapper.so 20 | export NSS_WRAPPER_PASSWD=${JENKINS_HOME}/passwd 21 | export NSS_WRAPPER_GROUP=/etc/group 22 | 23 | # Make sure the Java clients have valid $HOME directory set 24 | export HOME=${JENKINS_HOME} 25 | 26 | set -e 27 | 28 | # if `docker run` has 2 or more arguments the user is passing jenkins launcher arguments 29 | if [[ $# -gt 1 ]]; then 30 | # TODO: We can attempt to download this file from the Jenkins server 31 | JAR="${JENKINS_HOME}/remoting.jar" 32 | PARAMS="" 33 | 34 | 35 | # if -url is not provided try env vars 36 | if [[ "$@" != *"-url "* ]]; then 37 | if [ ! -z "$JENKINS_URL" ]; then 38 | PARAMS="$PARAMS -url $JENKINS_URL" 39 | elif [ ! -z "$JENKINS_SERVICE_HOST" ] && [ ! -z "$JENKINS_SERVICE_PORT" ]; then 40 | PARAMS="$PARAMS -url http://$JENKINS_SERVICE_HOST:$JENKINS_SERVICE_PORT" 41 | fi 42 | fi 43 | 44 | echo "Downloading ${JENKINS_URL}/jnlpJars/remoting.jar ..." 45 | curl -s ${JENKINS_URL}/jnlpJars/remoting.jar -o ${JAR} 46 | 47 | # if -tunnel is not provided try env vars 48 | if [[ "$@" != *"-tunnel "* ]]; then 49 | if [ ! -z "$JENKINS_TUNNEL" ]; then 50 | PARAMS="$PARAMS -tunnel $JENKINS_TUNNEL" 51 | elif [ ! -z "$JENKINS_SLAVE_SERVICE_HOST" ] && [ ! -z "$JENKINS_SLAVE_SERVICE_PORT" ]; then 52 | PARAMS="$PARAMS -tunnel $JENKINS_SLAVE_SERVICE_HOST:$JENKINS_SLAVE_SERVICE_PORT" 53 | fi 54 | fi 55 | 56 | echo Running java $JAVA_OPTS -cp $JAR hudson.remoting.jnlp.Main -headless $PARAMS "$@" 57 | cd ${JENKINS_DIR} && exec java $JAVA_OPTS \ 58 | -cp $JAR hudson.remoting.jnlp.Main -headless $PARAMS "$@" 59 | fi 60 | 61 | exec "$@" 62 | -------------------------------------------------------------------------------- /examples/slave/s2i-slave-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "Template", 3 | "apiVersion": "v1", 4 | "metadata": { 5 | "name": "s2i-to-jenkins-slave", 6 | "creationTimestamp": null, 7 | "annotations": { 8 | "description": "Provides the conversion of S2I image to a Jenkins slave", 9 | "iconClass": "icon-jenkins" 10 | } 11 | }, 12 | "labels": { 13 | "template": "s2i-jenkins-slave" 14 | }, 15 | "parameters": [ 16 | { 17 | "name": "IMAGE_STREAM_NAME", 18 | "description": "The name of the to build the slave from", 19 | "value": "ruby-22-centos7", 20 | "required": true 21 | }, 22 | { 23 | "name": "IMAGE_DOCKER_NAME", 24 | "description": "Optionally, you can specify the Docker pull spec for the image stream", 25 | "value": "" 26 | }, 27 | { 28 | "name": "SLAVE_S2I_REPO_URL", 29 | "description": "Repository to use for the build", 30 | "value": "git://github.com/arilivigni/openshift-ci-pipeline" 31 | }, 32 | { 33 | "name": "SLAVE_S2I_REPO_CONTEXTDIR", 34 | "description": "Specify sub-directory in the repository", 35 | "value": "examples/slave" 36 | }, 37 | { 38 | "name": "SLAVE_S2I_REPO_REF", 39 | "description": "Specify the GIT ref of the repository", 40 | "value": "master" 41 | } 42 | ], 43 | "objects": [ 44 | { 45 | "kind": "ImageStream", 46 | "apiVersion": "v1", 47 | "metadata": { 48 | "name": "${IMAGE_STREAM_NAME}" 49 | }, 50 | "spec": { 51 | "dockerImageRepository": "openshift/${IMAGE_STREAM_NAME}" 52 | } 53 | }, 54 | { 55 | "kind": "ImageStream", 56 | "apiVersion": "v1", 57 | "metadata": { 58 | "name": "${IMAGE_STREAM_NAME}-jenkins-slave", 59 | "annotations": { 60 | "slave-label": "${IMAGE_STREAM_NAME}", 61 | "slave-directory": "/opt/app-root/jenkins" 62 | }, 63 | "labels": { 64 | "role": "jenkins-slave" 65 | } 66 | }, 67 | "spec": {} 68 | }, 69 | { 70 | "kind": "BuildConfig", 71 | "apiVersion": "v1", 72 | "metadata": { 73 | "name": "${IMAGE_STREAM_NAME}-slave", 74 | "annotations": { 75 | "description": "Modifies the ${IMAGE_STREAM_NAME} to run as Jenkins slave" 76 | }, 77 | "labels": { 78 | "name": "${IMAGE_STREAM_NAME}-slave" 79 | } 80 | }, 81 | "spec": { 82 | "triggers": [ 83 | { 84 | "type": "imageChange", 85 | "imageChange": {} 86 | }, 87 | { 88 | "type": "ConfigChange" 89 | } 90 | ], 91 | "source": { 92 | "type": "Git", 93 | "contextDir": "${SLAVE_S2I_REPO_CONTEXTDIR}", 94 | "git": { 95 | "uri": "${SLAVE_S2I_REPO_URL}", 96 | "ref": "${SLAVE_S2I_REPO_REF}" 97 | } 98 | }, 99 | "strategy": { 100 | "type": "Docker", 101 | "dockerStrategy": { 102 | "from": { 103 | "kind": "ImageStreamTag", 104 | "name": "${IMAGE_STREAM_NAME}:latest" 105 | } 106 | } 107 | }, 108 | "output": { 109 | "to": { 110 | "kind": "ImageStreamTag", 111 | "name": "${IMAGE_STREAM_NAME}-jenkins-slave:latest" 112 | } 113 | }, 114 | "resources": {} 115 | } 116 | } 117 | ] 118 | } 119 | -------------------------------------------------------------------------------- /jenkins-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arilivigni/openshift-ci-pipeline/37d9bddc3e1f8b3fb9b8411317fba8a5a18cb826/jenkins-flow.png -------------------------------------------------------------------------------- /sample-app/sample-app-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "List", 3 | "apiVersion": "v1", 4 | "metadata": {}, 5 | "items": [ 6 | { 7 | "kind": "ImageStream", 8 | "apiVersion": "v1", 9 | "metadata": { 10 | "name": "sample-app", 11 | "creationTimestamp": null, 12 | "labels": { 13 | "app": "sample-app" 14 | }, 15 | "annotations": { 16 | "openshift.io/generated-by": "OpenShiftNewApp" 17 | } 18 | }, 19 | "spec": {}, 20 | "status": { 21 | "dockerImageRepository": "" 22 | } 23 | }, 24 | { 25 | "kind": "BuildConfig", 26 | "apiVersion": "v1", 27 | "metadata": { 28 | "name": "sample-app", 29 | "creationTimestamp": null, 30 | "labels": { 31 | "app": "sample-app" 32 | }, 33 | "annotations": { 34 | "openshift.io/generated-by": "OpenShiftNewApp" 35 | } 36 | }, 37 | "spec": { 38 | "source": { 39 | "type": "Git", 40 | "git": { 41 | "uri": "https://github.com/mfojtik/sample-app.git" 42 | }, 43 | "secrets": [] 44 | }, 45 | "strategy": { 46 | "type": "Source", 47 | "sourceStrategy": { 48 | "from": { 49 | "kind": "ImageStreamTag", 50 | "namespace": "openshift", 51 | "name": "ruby:latest" 52 | } 53 | } 54 | }, 55 | "output": { 56 | "to": { 57 | "kind": "ImageStreamTag", 58 | "name": "sample-app:latest" 59 | } 60 | }, 61 | "resources": {} 62 | }, 63 | "status": { 64 | "lastVersion": 0 65 | } 66 | }, 67 | { 68 | "kind": "DeploymentConfig", 69 | "apiVersion": "v1", 70 | "metadata": { 71 | "name": "sample-app", 72 | "creationTimestamp": null, 73 | "labels": { 74 | "app": "sample-app" 75 | }, 76 | "annotations": { 77 | "openshift.io/generated-by": "OpenShiftNewApp" 78 | } 79 | }, 80 | "spec": { 81 | "strategy": { 82 | "resources": {} 83 | }, 84 | "triggers": [ 85 | { 86 | "type": "ConfigChange" 87 | }, 88 | { 89 | "type": "ImageChange", 90 | "imageChangeParams": { 91 | "automatic": true, 92 | "containerNames": [ 93 | "sample-app" 94 | ], 95 | "from": { 96 | "kind": "ImageStreamTag", 97 | "name": "sample-app:stable" 98 | } 99 | } 100 | } 101 | ], 102 | "replicas": 1, 103 | "selector": { 104 | "app": "sample-app", 105 | "deploymentconfig": "sample-app" 106 | }, 107 | "template": { 108 | "metadata": { 109 | "creationTimestamp": null, 110 | "labels": { 111 | "app": "sample-app", 112 | "deploymentconfig": "sample-app" 113 | }, 114 | "annotations": { 115 | "openshift.io/generated-by": "OpenShiftNewApp" 116 | } 117 | }, 118 | "spec": { 119 | "containers": [ 120 | { 121 | "name": "sample-app", 122 | "image": "sample-app:latest", 123 | "ports": [ 124 | { 125 | "containerPort": 8080, 126 | "protocol": "TCP" 127 | } 128 | ], 129 | "resources": {} 130 | } 131 | ] 132 | } 133 | } 134 | }, 135 | "status": {} 136 | }, 137 | { 138 | "kind": "Service", 139 | "apiVersion": "v1", 140 | "metadata": { 141 | "name": "sample-app", 142 | "creationTimestamp": null, 143 | "labels": { 144 | "app": "sample-app" 145 | }, 146 | "annotations": { 147 | "openshift.io/generated-by": "OpenShiftNewApp" 148 | } 149 | }, 150 | "spec": { 151 | "ports": [ 152 | { 153 | "name": "8080-tcp", 154 | "protocol": "TCP", 155 | "port": 8080, 156 | "targetPort": 8080 157 | } 158 | ], 159 | "selector": { 160 | "app": "sample-app", 161 | "deploymentconfig": "sample-app" 162 | } 163 | }, 164 | "status": { 165 | "loadBalancer": {} 166 | } 167 | } 168 | ] 169 | } 170 | --------------------------------------------------------------------------------