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

Implement cache workflow #14682

Merged
merged 3 commits into from
Apr 20, 2021
Merged

Implement cache workflow #14682

merged 3 commits into from
Apr 20, 2021

Conversation

mshima
Copy link
Member

@mshima mshima commented Apr 14, 2021

Implement a workflow exclusive to build our cache.

  • npm: use our dependabots package.json for a more complete cache.
  • maven: generate applications with most of our options and build the cache with go-offline goal.
  • Gradle: use same applications from maven and execute some operations to build the cache.

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima mshima changed the title Implement a cache workflow Implement cache workflow Apr 14, 2021
@atomfrede
Copy link
Member

Could we use our gradle enterprise instance for the cache? Maybe even for the maven part?

@mshima
Copy link
Member Author

mshima commented Apr 20, 2021

@atomfrede I think it will be complementary:

  • Outside of GitHub infrastructure, it will be more stable if we use GitHub Actions cache at the main repository.
    But an additional cache for making things faster would be great.
  • It will be great for jhipster-bom and daily-builds, we don't have cache configured there.
  • How the incremental cache works?
  • Cache fetching? It requires pom.xml or build.gradle, or a key is enough to fetch it?
  • Cache invalidation? If caching npm repository, since we don't have package-lock.json at our generated applications, we should invalidate the main cache daily (weekly at most), otherwise it can become really big.

The first step would be to build jhipster-bom cache using gradle enterprise inside the cache workflow.
It could contain npm/maven/gradle caches and be used at jhipster-bom/daily-builds at first.

I could be wrong, since I never tried gradle enterprise, I can help better when some kind of support for it lands.

@mshima mshima merged commit de9df67 into jhipster:main Apr 20, 2021
@mshima mshima deleted the skip_ci-cache branch April 20, 2021 14:03
@pascalgrimaud
Copy link
Member

Sorry @mshima : I don't have time the last days to review it, so don't hesitate to go ahead and merge it, like right now :)

@atomfrede
Copy link
Member

@mshima Sounds like we are on the same track. Will try to add gradle enterprise to the generated applications, such we can have buildscans etc. Afterwards the first project for caching would be indeed the bom, which should be fairly easy as it is a typical jvm project. Let's see how that works out.

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

Successfully merging this pull request may close these issues.

None yet

4 participants