Skip to content
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

Make architecture independent #36

Merged
merged 4 commits into from
Jun 5, 2022
Merged

Make architecture independent #36

merged 4 commits into from
Jun 5, 2022

Conversation

timja
Copy link
Member

@timja timja commented Jun 4, 2022

Note 1: this removes java 8 from the packaging image

Note 2: this isn't fully arch independent as the Azure CLI doesn't publish an arm package, but it's not needed for the packaging part so contributors can test just fine, I've made it not fail the build now

I've tested this locally and I can build packages just fine

I expect it to work just fine for releasing, we have a weekly this upcoming week we could test it on before LTS release.

Its important this image works on arm64 as any contributors on recent laptops won't be able to test packaging changes without it

@timja timja requested a review from a team as a code owner June 4, 2022 15:32
Dockerfile Outdated
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/azure-cli.list \
&& apt-get update \
&& apt-get install --yes --no-install-recommends azure-cli="${AZURE_CLI_VERSION}-1~$(lsb_release -cs)" \
&& az --version \
&& az --version || echo 'this will currently fail on non amd64 architectures' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be interested in https://github.com/jenkins-infra/packer-images/blob/main/provisioning/ubuntu-provision.sh#L223-L235 : this is how we install az for the VM templates, which has arm64 ubuntu support (but 20.04)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've tested and it works on 22.04 as well

@timja timja requested a review from dduportal June 5, 2022 07:40
Dockerfile Outdated Show resolved Hide resolved
Co-authored-by: Damien Duportal <damien.duportal@gmail.com>
@timja timja enabled auto-merge (squash) June 5, 2022 12:47
@timja timja merged commit aa5189b into main Jun 5, 2022
@timja timja deleted the arch-independent branch June 5, 2022 12:52
dduportal added a commit to jenkins-infra/release that referenced this pull request Jun 7, 2022
…ava` binary

- jenkins-infra/docker-packaging#36 removed JDK8 and changed the `JAVA_HOME` value
- #237 and #232 changed the Docker image but we forgot to update the pod config
@basil
Copy link
Contributor

basil commented Jun 7, 2022

The switch to Java 11 at the same time as upgrading the base distribution 4 years' worth of releases was more than a bit aggressive, and this causes Javadoc generation errors in the release. These can be reproduced locally against a clean checkout by running mvn javadoc:javadoc with Temurin's build of OpenJDK 11.

The Javadoc failure is caused by missing generated sources, and these sources are generated by maven-hpi-plugin during the generate-resources lifecycle phase. Running mvn generate-resources javadoc:javadoc against a clean checkout seems to work on Java 11, so I would suggest adding generate-resources prior to javadoc:javadoc on https://github.com/jenkinsci/jenkins/blob/ceddca397270e7600a8f38c15bff1116865111cb/pom.xml#L478=

@timja
Copy link
Member Author

timja commented Jun 7, 2022

thanks, see jenkins-infra/release#242

@timja
Copy link
Member Author

timja commented Jun 7, 2022

Failed with:

[ERROR] Failed to execute goal on project jenkins-core: Could not resolve dependencies for project org.jenkins-ci.main:jenkins-core:jar:2.353-SNAPSHOT: Could not transfer artifact org.jenkins-ci.main:cli:jar:2.353-SNAPSHOT from/to releases (https://repo.jenkins-ci.org/releases/): transfer failed for https://repo.jenkins-ci.org/releases/org/jenkins-ci/main/cli/2.353-SNAPSHOT/cli-2.353-SNAPSHOT.jar, status: 409 -> [Help 1]

@timja
Copy link
Member Author

timja commented Jun 7, 2022

Could reproduce locally, changing it to compile works

Dockerfile Show resolved Hide resolved
@timja
Copy link
Member Author

timja commented Jun 8, 2022

Could reproduce locally, changing it to compile works

works locally but not part of stage:release apparently -.-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants