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

Regularly rebuild image of latest release #17

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

andyundso
Copy link
Contributor

@andyundso andyundso commented May 8, 2023

Fixes FCREPO-3849 and FCREPO-3850.

This PR adds a new GitHub Actions workflow. In a nutshell:

  1. It finds the latest Git tag on the main branch for fcrepo/fcrepo, excluding tags that include RC. For the found tag, we can safely assume it's the latest release of fcrepo.
  2. Checks out the tag and rebuilds fcrepo.
  3. Builds the Docker image and pushes three tags, as of now:
    • 6-tomcat9
    • 6.4-tomcat9
    • 6.4.0-tomcat9

The pipeline is triggered:

  • when requested using workflow_dispatch.
  • every Monday.
  • on push to main.

A successful run looks something like this.

Note that this pipeline could be simplified:

  1. Merge this repository with the main fcrepo, so we don't have to checkout two repository to make this pipeline work.
  2. Extend the Dockerfile to also include the maven build, so this pipeline's instructions can be simplified.

Copy link
Contributor

@Surfrdan Surfrdan left a comment

Choose a reason for hiding this comment

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

Looks good to me and targets same JDK versions as fcrepo/fcrepo

Copy link
Collaborator

@tomcbe tomcbe left a comment

Choose a reason for hiding this comment

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

Some small questions/comments, but overall the changes look good.

Thanks @andyundso and sorry for the long delay.

@tomcbe
Copy link
Collaborator

tomcbe commented Sep 21, 2023

Note that this pipeline could be simplified:

1. Merge this repository with the main `fcrepo`, so we don't have to checkout two repository to make this pipeline work.

2. Extend the Dockerfile to also include the `maven build`, so this pipeline's instructions can be simplified.

I agree, that the pipeline could be greatly simpilified. When the Docker image for Fedora 6 was created initially, some in the Fedora community had reservations against integrating the Docker image into the main fcrepo repository.

We can check if that's still the case, once this PR has been merged.

When sticking with the 2-repository solution, I think the way forward is:

  • Only download the fcrepo-war from the maven repository (no need to rebuild it with maven)
  • unpack and add it to the correct location in the Docker image.

@andyundso andyundso requested a review from tomcbe September 22, 2023 07:47

./build-and-push-to-dockerhub.sh ../fcrepo-webapp/target/fcrepo-webapp-$LATEST_RELEASE_VERSION.war "${a[0]}.${a[1]}.${a[2]}-tomcat9" "${a[0]}.${a[1]}-tomcat9" "${a[0]}-tomcat9"
./build-and-push-to-dockerhub.sh ../fcrepo-webapp/target/fcrepo-webapp-$LATEST_RELEASE_VERSION.war "${a[0]}.${a[1]}.${a[2]}-tomcat9" "${VERSION_PARTS[0]}.${VERSION_PARTS[1]}-tomcat9" "${VERSION_PARTS[0]}-tomcat9"
Copy link
Collaborator

Choose a reason for hiding this comment

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

The old variable name a is still to construct the tag with the full version number.

Should be:

"${VERSION_PARTS[0]}.${VERSION_PARTS[1].${VERSION_PARTS[2]}-tomcat9"

@andyundso andyundso force-pushed the FCREPO-3849-regular-rebuilds branch from ed19d18 to cdf9edc Compare September 22, 2023 09:57
@andyundso andyundso requested a review from tomcbe September 22, 2023 09:57
@tomcbe
Copy link
Collaborator

tomcbe commented Sep 26, 2023

PR looks good now. I also tested the commands locally and was able to correctly build the Docker image.

@tomcbe
Copy link
Collaborator

tomcbe commented Sep 26, 2023

@Surfrdan Can you merge this? I'm a bit unsure what procedure there is to merge PRs in this repo.

@tomcbe tomcbe merged commit c5fd515 into fcrepo-exts:main Oct 5, 2023
@andyundso andyundso deleted the FCREPO-3849-regular-rebuilds branch October 6, 2023 07:25
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.

3 participants