feat: build both agent and inbound agent#570
Conversation
…UpdatingReadme Adding udpate ECS container agent suggestion to README
…nsci#12) * Update remoting to 2.62 * Disable JnlpProtocol3 by default, allow to reenable it
…nvvars Use JENKINS_SECRET and JENKINS_NAME env vars if present
…ev/readme Update the description, use Agents instead of Slaves where possible
…ev/alpine Align the Alpine build with the current master branch approach
…ev/remoting/3.15 Update Remoting to 3.15 + fix documentation
…ev/workdir-env-var Add JENKINS_AGENT_WORKDIR env var (update of jenkinsci#44)
# Conflicts: # Dockerfile
…arlossg-patch-1 Fix jenkinsci#57 Clarify image name deprecation
# Conflicts: # Dockerfile
This will require the PR for https://github.com/jenkinsci/docker-slave to be merged and pushed to docker hub.
Initial Windows agent support
…agent" This reverts commit 0ca658b.
|
(My comments about the merge of the other repository's commits remain unaddressed.) |
|
Currently trying git-filter-repo to see if I can properly reimport inbound-agent files and their git history without too much time and effort. |
Got it working, thanks for the hint @basil. I'm going to push with force on this branch to keep existing comments here, only timja review should be discarded. EDIT: nothing lost, just broke my own review comments not visible anymore in the "Files" tabs. I can repost them if needed. |
4c3ba16 to
0ab91ff
Compare
0ab91ff to
2f13f7f
Compare
|
Check the updated PR body if you want to see the script I used to get a proper import of Force pushed twice as I initially forgot to replace |
|
Release of https://github.com/jenkinsci/docker-agent/releases/tag/3206.vb_15dcf73f6a_9-2 for both agent and inbound-agent successful! The first build on trusted.ci.jenkins.io failed publishing the "linux" images with the following error:
After a few minutes, I replayed a build only on "linux" images, it finished with success. --- old/Jenkinsfile
+++ new/Jenkinsfile
@@ -24,7 +24,7 @@
axes {
axis {
name 'IMAGE_TYPE'
- values 'linux', 'nanoserver-1809', 'nanoserver-ltsc2019', 'nanoserver-ltsc2022', 'windowsservercore-1809', 'windowsservercore-ltsc2019', 'windowsservercore-ltsc2022'
+ values 'linux'
}
}https://hub.docker.com/r/jenkins/agent/tags |
|
Great work, guys! This eliminates 11 lines from my test build environment! |
This PR allows to build both agent and inbound-agent container images in this repository.
Note: each type of image ("agent" or "inbound-agent") has its corresponding tests suite.
I've splitted this pull requests in atomic operations:
docker-inbound-agentfiles before import: lemeurherve@ab173cfdocker-agentfiles before import: 77850e6docker-inbound-agentfiles: cfc94cc (merge commit to keep imported files history)agentandinbound-agentimages: 0ab91ff (this is the main one to review)New/renamed/imported/modified files list:
New file
Modified
Renamed from agent
Renamed and modified from agent
Imported from inbound-agent
Imported and renamed from inbound-agent
Imported and modified from inbound-agent
Imported, renamed and modified from inbound-agent
How I imported files from inbound-agent with their git history:
I created a script (adapted from https://gist.github.com/tsayen/f1c1c4d62d4fda77abf1586bd39f9b74) with the following content to retrieve git history of a file as a set of email patches and to replace `#n` references by `jenkinsci/docker-inbound-agent#n`:As applying this script on multiple files at once resulted in a unordered history, I applied this script on every imported inbound-agent file from the list above, one after the other, manually (and painfully) reordering each generated patch in the correct order.When all files have been proceed, I've got as a result a big patch file that I applied to the agent repository folder with the following command:
git am --committer-date-is-author-date --keep < ../_all_patches_Here is the corresponding patches file (renammed in .txt to be attached here): [_all_patches_.txt](https://github.com/jenkinsci/docker-agent/files/13601317/_all_patches_.txt)State of the agent repository after applying these patches and before renaming/modifying files if you want to check that the content of these files haven't been changed by this process and that no unwanted modifications have been introduced:
https://github.com/lemeurherve/docker-agent/tree/aa4262466bab1782f9c946357205c76a596c862f
The downside of this process is that even if I'm not the author of these inbound-agent commits, I didn't manage not to be the (co-)commiter of them.
EDIT: I wrote a script using https://github.com/newren/git-filter-repo allowing me to rework this PR and this import to get a proper history.
As a bonus, I can reapply this script whenever I want then I just have to
git push origin feat-build-both-agent-and-inbound-agent --forceto update this PR.Ref and details about proposed procedure for the next steps:
Testing done
sudo find /between these images and the existing onesdocker scout comparebetween these images and the existing ones: https://docs.docker.com/engine/reference/commandline/scout_compare/