-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winPB: Switch to VS2022 build tools and add Windows build dockerfile #3702
Conversation
…d fixes Notes: - Adds Dockerfile.win2022 which can be used to create a build image comparable to the Linux ones. This will only install VS2022, not the earlier other compilers - Various modifications to support the above including: - Adding more 'win_reboot' tags to tasks to avoid attempting to reboot while running ansible inside the container - Use of gpg2 instead of gpg since that is what the new cygwin seems to have - Since the dockerfile does a base cygwin install, the ansible cygwin role now checks for jq.exe (the most recent addition) instead before deciding whether to skip the cygwin packages - Uses a windows command instead of cygwin (which may not be in the path at that point) as the "Dummy" command in the logs role - Changes the command used for default shortname creation to one that works in containers - Uses Visual Studio Build Tools instead of the community edition (Currently will not take effect if "adoptopenjdk" is skipped but that is skipped in the new dockerfile so it takes effect there) Signed-off-by: Stewart X Addison <sxa@redhat.com>
how do you plan to build/push this? A GitHub action might be quite smart? |
Co-authored-by: George Adams <george.adams@microsoft.com>
That's another step beyond this PR so we should discuss elsewhere (perhaps in the related issue). All ideas welcome of course, but I was planning to prototype it on one of our machines under control of jenkins like we do for the others since my preference would not be to rely on GitHub actions and have this done on our own infrastructure. For initial prototyping with the pipelines we can just have the images locally on the relevant machine(s) as we need to identify a suitable registry to store them in as discussed in the PMC yesterday before we can push them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Signed-off-by: Stewart X Addison <sxa@redhat.com>
Added Noting also that the container will need access to a git config which allows the workspace directory to be treated as "safe" due to the initial jenkins git checkout of the repository being done on the host system which has a different SID from the user in the container. I have been doing this by setting
This is not an ideal solution as it would potential allow git configurations to be modified and persisted across the build runs, but that can be investigated later, possibly using a |
VPC run looks ok - I'm going to run one more with a build test at https://ci.adoptium.net/view/Tooling/job/VagrantPlaybookCheck/1950/ |
That ran ok but there seems to be some failures in the test section that are unrelated to this PR which I've raised at #3707 |
Notes:
Not done:
git_sha
detection working in the logs role, so it is currently hard coded in the Docker file to 00000000. Suggestions on how to make this work are welcome&
doesn't propagate the failureThe Dockerfile file can be build with an invocation such as the following (there is a password in the dockerfile, but perhaps that should be removed? The account is deleted afterwards so the password cannot be used once the image is complete):
docker build -t win2022_build_image --no-cache -e PW=S0meVal=dPW -f Dockerfile.win2022 .
This requires docker to be installed on the host system and 8dot3names to be enabled on the host system.
For discussion from reviewers:
C:\Program Files\Microsoft Visual Studio\2022
instead of the\Community
subdirectory so that community or build tools will be detected (Although I've just realised that since build tools goes intoC:\Program Files (x64) - as can be seen in the
Register Visual Studio Community 2022 DIA SDK shared libraries` operation - so that probably isn't going to work anyway for the build tools caseFixes #3286 adoptium/temurin-build#3787 (Note that for validation purposes I have also run through the process to verify that this dockerfile and compiler can produce a binary identical build of 21.0.4+7 on Windows)
Checklist
https://ci.adoptium.net/view/Tooling/job/VagrantPlaybookCheck/1948/(Failed due to a Dragonwell SHA failure - seems ok now so re-running at https://ci.adoptium.net/view/Tooling/job/VagrantPlaybookCheck/1949/