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

ci: build inside a builder container #84

Merged
merged 6 commits into from
Oct 10, 2023
Merged

Conversation

sverrehu
Copy link
Contributor

@sverrehu sverrehu commented Oct 10, 2023

Something like this, @erikgb? We will, of course, need to ditch anything maven from the actions if we select to go this way.

@sverrehu sverrehu requested a review from a team as a code owner October 10, 2023 19:28
@erikgb
Copy link
Member

erikgb commented Oct 10, 2023

Something like this, @erikgb? We will, of course, need to ditch anything maven from the actions if we select to go this way.

Yes! ❤️

image

Can you remove the maven build from outside the Docker-build?

@sverrehu
Copy link
Contributor Author

Can you remove the maven build from outside the Docker-build?

Done. Although I'm still on thin ice when it comes to GitHub actions, so not sure it is correct.

@erikgb
Copy link
Member

erikgb commented Oct 10, 2023

We should also probably test changing pom.xml. That should invalidate the Docker cache from the copy pom.xml statement. I expect that to be the same as the GH Maven cache. We should not have SNAPSHOT-dependencies. If we did, those would be problematic - since they will not invalidate the cache.

@sverrehu
Copy link
Contributor Author

sverrehu commented Oct 10, 2023

We should also probably test changing pom.xml.

I tested locally, first changing the pom and then a source file. The results were as we hope for. But I'm only using docker build, and nothing fancy.

Dockerfile Show resolved Hide resolved
@erikgb
Copy link
Member

erikgb commented Oct 10, 2023

We should also probably test changing pom.xml.

I tested locally, first changing the pom and then a source file. The results were as we hope for. But I'm only using docker build, and nothing fancy.

The GH Docker cache setup is quite aggressive, but this seems to work as we want.

@sverrehu
Copy link
Contributor Author

sverrehu commented Oct 10, 2023

The GH Docker cache setup is quite aggressive, but this seems to work as we want.

There are commits for "change pom" and "change source file" that probably have some action runs.

Looks fine to me.

Copy link
Member

@erikgb erikgb left a comment

Choose a reason for hiding this comment

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

LGTM! Let's try this for some time!

@sverrehu sverrehu merged commit bf69b60 into statnett:main Oct 10, 2023
4 checks passed
@sverrehu sverrehu deleted the builder branch October 10, 2023 19:52
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.

2 participants