ukf / ukf-members

Library to assist with processing the members.xml file.
0 stars 1 forks source link

Move CI job to GitHub Actions #7

Closed iay closed 1 year ago

iay commented 2 years ago

The CI job for this project lives in a private Jenkins instance (which we don't want to maintain) running on a machine (we don't want to maintain) which doesn't have Java 17 (and which can't have one installed in a way which we wouldn't have to maintain manually).

The correct solution to this problem is to move the CI functionality to GitHub Actions.

We should do this before creating the maintenance branch and moving to Java 17, so that the CI job will continue to work on both versions.

iay commented 2 years ago

Some more details about the Jenkins job. We should probably implement the new workflow using these as a baseline. Slight deviations are probably fine, though.

The site isn't being sent anywhere (there's no site:deploy) so no credentials are required.

iay commented 2 years ago

The CI workflow should run on a push to any branch.

philsmart commented 2 years ago

Bizarrely, neither GitHub's runners nor my local build of the members repo can find the site plugin:

Could not transfer artifact net.shibboleth:parent-v3:xml:site_en:9 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [central (http://repo1.maven.org/maven2, default, releases)]
  net.shibboleth:parent-v3:xml:9

Which does exist on the Shib Nexus: https://build.shibboleth.net/nexus/content/repositories/thirdparty/org/apache/maven/plugins/maven-site-plugin/3.4/.

I will investigate.

philsmart commented 2 years ago

Oh, it seems it wants to find the parent projects site.xml when building the members project's site. And I can not see that exists - which makes sense.

philsmart commented 2 years ago

I followed some solutions online and built site using offline mode which worked. This is clearly not a solution, so I will keep looking.

philsmart commented 2 years ago

Which has the unfortunate consequence that I can no longer replicate this locally.

philsmart commented 2 years ago

I am going to remove the site goal from the Maven build for now, and add some tickets to look at it later.

philsmart commented 2 years ago

The maven version the actions/setup-java uses is the latest version i.e. 3.8.6. It does not appear to have a setting to pin this to a specific version (they have an issue about this https://github.com/actions/setup-java/issues/40). In reality, they say it uses whichever version is installed on the runner (not sure how to control that).

There are other 'setup-maven' type actions on the marketplace which may allow this. Although I am a bit cautious about using a random user's GitHub action over a more standard pipeline using the official GitHub actions.