-
Notifications
You must be signed in to change notification settings - Fork 16
Jenkins Configuration
Frantisek Sumsal edited this page Mar 3, 2019
·
10 revisions
As the background part of the CI is as important as the one in this repository, I'll try to describe it as well as I can for future reference.
This job is the main CI for the https://github.com/systemd/systemd repository. Configuration is as follows:
- Discard old builds
- (Advanced) Days to keep artifacts:
180
- (Advanced) Days to keep artifacts:
- GitHub project
- Project url:
https://github.com/systemd/systemd
- Project url:
- Execute concurrent builds if necessary
- Restrict where this project can be run
- Label Expression:
systemd-ci-slave01
- Label Expression:
- (Advanced) Use custom workspace
- Directory:
workspace/systemd-pr-build-$BUILD-NUMBER
- Directory:
- Git
- Repositories
- Repository URL:
https://github.com/systemd/systemd.git
- Repository URL:
- Branches to build
- Branch Specifier:
*/master
- Branch Specifier:
- Repositories
- GitHub Pull Request Builder
- GitHub API credentials:
https://api.github.com : Systemd Connection to Github
(token) - Use github hooks for build triggering
- (Advanced) Build every pull request automatically without asking
- (Advanced) Trigger Setup
- (Add):
Cancel build on update
- (Add):
- GitHub API credentials:
- Delete workspace before build starts
- Execute shell
- Command
#!/bin/sh
export PATH="/home/systemd/bin:$PATH"
ARGS=
if [ "$ghprbPullId" ]; then
ARGS="$ARGS --pr $ghprbPullId "
fi
git clone https://github.com/systemd/systemd-centos-ci
cd systemd-centos-ci
./agent-control.py $ARGS
- Archive the artifacts
- Files to archive:
systemd-centos-ci/artifacts_*/,systemd-centos-ci/index.html*
- Files to archive:
- Delete workspace when build is done
This jobs works as a CI for the CI repository - in other words, it's the most convenient way to check if changes to the CI machinery didn't break something when run in the production environment.
- Discard old builds
- (Advanced) Days to keep artifacts:
90
- (Advanced) Days to keep artifacts:
- GitHub project
- Project url:
https://github.com/systemd/systemd-centos-ci/
- Project url:
- Execute concurrent builds if necessary
- Restrict where this project can be run
- Label Expression:
systemd-ci-slave01
- Label Expression:
- (Advanced) Use custom workspace
- Directory:
workspace/systemd-ci-build-$BUILD-NUMBER
- Directory:
- Git
- Repositories
- Repository URL:
https://github.com/systemd/systemd-centos-ci.git
- Repository URL:
- Branches to build
- Branch Specifier:
${ghprbActualCommit}
- Branch Specifier:
- Repositories
- GitHub Pull Request Builder
- GitHub API credentials:
https://api.github.com : Systemd Connection to Github
(token) - Use github hooks for build triggering
- (Advanced) Build every pull request automatically without asking
- (Advanced) Trigger Setup
- (Add):
Cancel build on update
- (Add):
- GitHub API credentials:
- Delete workspace before build starts
- Execute shell
- Command
#!/bin/sh
export PATH="/home/systemd/bin:$PATH"
ARGS=
if [ "$ghprbPullId" ]; then
ARGS="$ARGS --ci-pr $ghprbPullId "
fi
./agent-control.py $ARGS
./agent-control.py --rhel --branch staging $ARGS
./agent-control.py --rhel --branch staging-next $ARGS
./agent-control.py --rhel --vagrant $ARGS
# Generate a correct index using all collected artifacts
# Unfortunately, it will contain files from the systemd-centos-ci repository
# but it's still better than going through all artifacts manually
utils/generate-index.sh . index.html
- Archive the artifacts
- Files to archive:
artifacts_*/,index.html*
- Files to archive:
- Delete workspace when build is done