-
Notifications
You must be signed in to change notification settings - Fork 0
AtoZdevelopment/ESR-C
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Docker container is derived from:
https://github.com/jenkinsci/docker
Run project:
a. build Jenkins Docker
$ docker build -t jenkins-docker .
b. run docker with correct options:
$ docker run -p 8080:8080 -p 50000:50000 -u root -v /var/run/docker.sock:/var/run/docker.sock -v ~/ESR-C/jenkins-home:/var/jenkins_home jenkins
c. open Jenkins page in browser and click on "Scan Repository Now" in the ESR-C-build job (security is deactivated for this example project)
-> The branch should be discovered and built. After this the build is run every 30 minutes and you can use parameters. The checkout of the ESR-C repo takes some time, since there are no GitHu Credentials in the container (Quota for anonymous users)
! A massive workaround is used to be able to run docker inside of docker:
- running Jenkin as root to be able to access /var/run/docker.sock -> not secure
(adding to user group and setting group ID of host ID did not work -> Need to investigate)
- mounting /var/run/docker.sock to run container on host system and not nested
Requirements:
a. Setup a Jenkins running inside a Docker container that
can spawn docker slaves to run the jobs.
b. Setup a job on Jenkins using declarative or scripted
pipelines with following requirements:
RQ01: Keep job history only for the last 10 jobs.
RQ02 Add two parameters:
- boolean printName
- string name
RQ03: Configure the "Throttle builds" option to only run 2 times each hour.
RQ04: Schedule it to run every 30 minutes
RQ05: on the in a docker container pre-configured on Jenkins.
RQ06: Clone two open source repositories of your choice.
RQ07: Add one or two build steps to list the contents of the two folders and save them to a text file.
RQ08: Add another build step that should check if the variable printName is checked and print the name.
RQ09: Archive the text file.
RQ10: Clean the workspace when the job is done.
Unfulfilled Requirement:
RQ03: I could find no proper solution to achieve this. It seems like there is nothing available at the moment.
for example: https://stackoverflow.com/questions/29605955/jenkins-throttle-build-rate
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published