Skip to content

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Feb 12, 2022

Backport #18708
Backport #18475
Backport #18443

The CI currently downloads all go modules in each pipeline step because go modules reside outside the project directory. Fix this by introducing a volume for the /go directory [1] so modules are only downloaded once per pipeline using a new deps-backend make target.

For completeness, I also included new deps and deps-frontend targets and the frontend one is also triggered explicitly on CI where needed.

[1] https://docs.drone.io/pipeline/kubernetes/examples/language/golang/#dependencies

6543 and others added 3 commits February 12, 2022 10:32
The CI currently downloads all go modules in each pipeline step because
go modules reside outside the project directory. Fix this by introducing
a volume for the `/go` directory [1] so modules are only downloaded once per
pipeline using a new `deps-backend` make target.

For completeness, I also included new `deps` and `deps-frontend` targets
and the frontend one is also triggered explicitly on CI where needed.

[1] https://docs.drone.io/pipeline/kubernetes/examples/language/golang/#dependencies
@delvh delvh added this to the 1.16.2 milestone Feb 12, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 12, 2022
@zeripath zeripath changed the title Backport #18708 Reduce CI go module downloads, add make targets (#18708, #18475, #18443) Feb 12, 2022
@zeripath zeripath added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Feb 12, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 12, 2022
@zeripath zeripath merged commit c04a4af into go-gitea:release/v1.16 Feb 12, 2022
@silverwind silverwind deleted the backport-18708 branch February 12, 2022 10:59
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants