This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Jenkins agents in Eclipse Codewind builds
Tim Etchells edited this page Apr 29, 2020
·
2 revisions
An agent is a slave machine that is used to run a pipeline or a stage of a jenkins build. Only one build can be using a given agent at a given time.
Agents can be top-level ('pipeline' level) but can be further broken down by stages. So, one build can use multiple agents for its different stages. For VS Code, the top-level agent is a kube one from a node image (Jenkinsfile#57). This agent is used for any stage which does not override the agent clause.
If you have to run docker commands, use the docker-build agent for that stage. For VS Code and Eclipse, this is only the test stage (Jenkinsfile#134).
- Kube agents
- Described using regular kubernetes yaml (Jenkinsfile#58).
- Pick any public docker image (you could build your own)
- Use whatever user the dockerfile specifies
- High resource limit means you are unlikely to have to wait for a node if you use this agent
- You can spin off as many as you want as part of your build
- But the pods will share a filesystem, for some reason - watch out for this especially when using parallel stages.
- In VS Code the parallel stages execute in two different copies of the code to work around this (Jenkinsfile#156)
- Can't run docker commands (docker in docker too messy)
- Described using regular kubernetes yaml (Jenkinsfile#58).
-
docker-build
agents- These are our 4 VMs, so limited resources (see https://ci.eclipse.org/codewind/computer/)
- Just regular VMs, not run in docker, so they can run docker commands
- Use genie.codewind user who is part of docker group but not part of sudoers
- We have ssh access and root password to all machines except
s8p2d-ubuntu1804
which is managed by eclipse team so we have to ask them to install stuff
- Basic agent
- Used if agent clause is
agent any
- Used by the 'Upload to download.eclipse.org' stages (Jenkinsfile#200)
- Used if agent clause is
- Since the kube agent is unlimited, use the kube agent as much as possible to take load off our VMs.
- When switching between agents, the filesystem is not preserved. Use stashes to persist changes between stages. (Jenkinsfile#115)
If you have a question or any feedback, join us on Mattermost