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
build: run 'make generate' in release container #4934
build: run 'make generate' in release container #4934
Conversation
This replaces the docker image so that we get one that has all of these commands available: make, git, go, python2 and perl. We can now run `make generate` in the steps used to generate the release patch, so the release patch contains the builtin_metadata.json changes. Before, we had been running `make generate` in the working directory, and copied the file into the container's workdir; but that left the working directory modified, and hindered patch application before cleaning up. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
ifeq ($(GITHUB_TOKEN),) | ||
@echo "\033[0;31mGITHUB_TOKEN environment variable missing.\033[33m Provide a GitHub Personal Access Token (PAT) with the 'read:org' scope.\033[0m" | ||
endif | ||
@$(DOCKER) run $(DOCKER_FLAGS) \ | ||
-e GITHUB_TOKEN=$(GITHUB_TOKEN) \ | ||
-e LAST_VERSION=$(LAST_VERSION) \ | ||
-v $(PWD):/_src \ | ||
python:2.7 \ | ||
cmd.cat/make/git/go/python2/perl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I'll admit that I'm not proud of this. But I really kind of dislike having to manage building and tagging and pushing images for these maintenance jobs.
Ideally, we'd be using apko here, I think; but it's macos story is a bit annoying (lima); which we wouldn't have to worry about much if kontain.me just worked on it, but it kind of doesn't...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only partially able to test the changes locally (no GH token set for the Makefile), but it looks like the docker changes seem to work as intended.
I can't say I've seen the cmd.cat/<list>
syntax before in a docker file. That's definitely new for me.
|
This replaces the docker image so that we get one that has all of these
commands available: make, git, go, python2 and perl.
We can now run
make generate
in the steps used to generate the release patch,so the release patch contains the builtin_metadata.json changes.
Before, we had been running
make generate
in the working directory, andcopied the file into the container's workdir; but that left the working
directory modified, and hindered patch application before cleaning up.