Skip to content

Commit

Permalink
Add containerized jenkins setup
Browse files Browse the repository at this point in the history
This commit adds source files for building a jenkins image with all
the plugins needed/used by the pipeline. This setup can be used to
test the changes to the existing workload or for grabbing the JJB
needed to add a new workload to the pipeline.
  • Loading branch information
chaitanyaenr authored and mohit-sheth committed Jan 5, 2021
1 parent 9b128a2 commit 0758486
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,9 @@ $ # step 5: update the Scale-CI jobs section in the readme ( applicable only for
### Test setup/Migrating scale-ci jobs to any Jenkins
The following instructions will help you setup a jenkins test environment super quick so as to play around and test the changes locally before pushing them to production.
```
$ docker run -d --name scale-ci-jenkins -p 8080:8080 jenkins/jenkins:lts
$ podman run -d --name scale-ci-jenkins --net=host quay.io/openshift-scale/scale-ci-jenkins:latest
```
Grab the admin password from the scale-ci-jenkins container logs:
```
$ docker logs scale-ci-jenkins
```
Access the jenkins at http://<host>:8080 and proceed with the initial setup. A new user instead of admin user and installing all the suggested plugins is highly recommended.
Access the jenkins at http://<host>:8080, the plugins needed are pre-installed.
Once we have the jenkins up and running, run the scale-ci-watcher to push your templates to the test jenkins instance:
```
$ git clone https://github.com/openshift-scale/scale-ci-pipeline.git
Expand All @@ -110,6 +106,7 @@ $ ./scale-ci-watcher.sh
$ # Running the scale-ci-watcher when we don't have the SSL certs needed to verify https when hitting Jenkins api ( check if needed )
$ export PYTHONHTTPSVERIFY=0; ./scale-ci-watcher.sh
```
This setup can be used to test a new/existing workload before creating a PR. The xml/yaml can be obtained from the jenkins and can be submitted as a JJB template to add/modify a new workload to the scale-ci-pipleine.

### Scale-CI Jenkins agents/slaves
We use bunch of dedicated slaves part of OpenShift-QE Jenkins to run Scale-CI jobs. The slaves are always online instead of the on demand slaves which take time to get ready before scheduling the jobs. There are multiple slaves and executors, so we should be able to run jobs in parallel.
Expand Down
12 changes: 12 additions & 0 deletions containers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM jenkins/jenkins:alpine

ENV JENKINS_USER admin
ENV JENKINS_PASS admin

# Skip initial setup
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false

COPY plugins.txt /usr/share/jenkins/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/plugins.txt
USER root
RUN apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev make
119 changes: 119 additions & 0 deletions containers/plugins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
workflow-cps:2.87
bouncycastle-api:2.18
cloudbees-folder:6.15
structs:1.20
ssh-agent:1.20
junit:1.47
antisamy-markup-formatter:1.5
github-api:1.117
pam-auth:1.6
pipeline-stage-step:2.5
windows-slaves:1.7
ssh-credentials:1.18.1
display-url-api:2.3.4
mailer:1.32.1
ldap:1.26
git:4.5.0
token-macro:2.12
ansible:1.1
external-monitor-job:1.7
icon-shim:2.0.3
github:1.32.0
matrix-auth:2.6.4
git-client:3.5.1
script-security:1.75
matrix-project:1.18
build-timeout:1.20
credentials:2.3.14
git-server:1.9
workflow-step-api:2.23
workflow-cps-global-lib:2.17
plain-credentials:1.7
credentials-binding:1.24
mapdb-api:1.0.9.0
timestamper:1.11.8
workflow-api:2.40
workflow-basic-steps:2.23
branch-api:2.6.3
resource-disposer:0.14
subversion:2.13.2
ws-cleanup:0.38
ant:1.11
gradle:1.36
pipeline-milestone-step:1.3.1
workflow-support:3.7
workflow-multibranch:2.22
pipeline-build-step:2.13
jquery-detached:1.2.1
durable-task:1.35
pipeline-input-step:2.12
ssh-slaves:1.26
ace-editor:1.1
workflow-scm-step:2.11
scm-api:2.6.4
email-ext:2.80
workflow-job:2.40
pipeline-graph-analysis:1.10
pipeline-rest-api:2.19
handlebars:1.1.1
javadoc:1.6
momentjs:1.1.1
workflow-aggregator:2.6
pipeline-stage-view:2.19
workflow-durable-task-step:2.37
github-branch-source:2.9.2
maven-plugin:3.8
dashboard-view:2.14
htmlpublisher:1.25
run-condition:1.3
conditional-buildstep:1.4.1
command-launcher:1.5
jquery:1.12.4-1
git-parameter:0.9.13
repo:1.14.0
mask-passwords:2.13
gerrit-trigger:2.32.0
docker-commons:1.17
apache-httpcomponents-client-4-api:4.5.10-2.0
jackson2-api:2.12.0
jsch:0.1.55.2
config-file-provider:3.7.0
publish-over:0.22
parameterized-trigger:2.39
authentication-tokens:1.4
docker-workflow:1.25
jdk-tool:1.4
publish-over-ssh:1.22
envinject:2.3.0
build-name-setter:2.1.0
ssh:2.6.1
role-strategy:3.1
nodelabelparameter:1.7.2
pipeline-utility-steps:2.6.1
kubernetes-client-api:4.11.1
build-pipeline-plugin:1.5.8
checks-api:1.1.1
rebuild:1.31
kubernetes-credentials:0.7.0
pipeline-multibranch-defaults:1.1
kubernetes:1.28.4
trilead-api:1.0.13
snakeyaml-api:1.27.0
pipeline-model-api:1.7.2
pipeline-model-extensions:1.7.2
envinject-api:1.7
pipeline-github-lib:1.0
plugin-util-api:1.6.0
variant:1.3
pipeline-stage-tags-metadata:1.7.2
pipeline-model-definition:1.7.2
lockable-resources:2.10
font-awesome-api:5.15.1-1
popper-api:1.16.0-7
jquery3-api:3.5.1-2
bootstrap4-api:4.5.3-1
echarts-api:4.9.0-2
okhttp-api:3.14.9
ansicolor:0.7.3
metrics:4.0.2.6
validating-string-parameter:2.8

0 comments on commit 0758486

Please sign in to comment.