ROX-15327: Remove Circle CI references and simplify tagging#5080
ROX-15327: Remove Circle CI references and simplify tagging#5080gavin-stackrox merged 12 commits intomasterfrom
Conversation
|
Images are ready for the commit at 4a7a964. To use with deploy scripts, first |
|
Note that |
| ifeq ($(BUILD_TAG),) | ||
| BUILD_TAG=$(shell git describe --tags --abbrev=10 --dirty --long --exclude '*-nightly-*') | ||
| endif |
There was a problem hiding this comment.
After looking at scripts/check-debugger.sh, I remember why there was a difference between BUILD_TAG (former CIRCLE_TAG) and just TAG (that was present in this Makefile before edits) in the context of Makefile.
BUILD_TAG/CIRCLE_TAGmeant a tag provided externally, i.e. from CI when we need to build something like3.74.1-rc.1.TAGheld the current value of the tag.- If
BUILD_TAG/CIRCLE_TAGwas provided,TAGsimply got its value. - Otherwise,
TAGheld a result ofgit describe, i.e. some3.74.x-266-gb6315d348bthingy.
- If
To me this explains the existence of that TAG= trick in make/env.mk (intent, but not a reasoning).
Without such separation, we'll not be able to differentiate tagged (i.e. release, RC, nightly) and untagged builds. It seems to me that scripts/check-debugger.sh is the only place that does that.
Do you know other places?
How broken is the debugger support that we can leave check-debugger.sh in incorrect state?
There was a problem hiding this comment.
It seems to me that scripts/check-debugger.sh is the only place that does that.
Do you know other places?
Here's a deeper example. Our Makefile calls into itself, e.g. in case of main-build-dockerized target
Lines 404 to 408 in d8f6253
The fact that BUILD_TAG environment variable is provided highlights a nice distinction that:
- Every environment variable will be visible as makefile variable with the same name.
BUILD_TAG=blah make ...will do$(BUILD_TAG)equal toblahduring theMakefileexecution. - However, it does not work the other way. Makefile variable does not become an environment variable with the same name. I.e. when
${BUILD_TAG}is not defined in the environment,main-build-dockerizedpropagates noBUILD_TAGvalue intodocker run ... -e BUILD_TAG ...context.
This means, main-build-dockerized should still work correctly w.r.t. actual GOTAGS=release (or not) in the resulting binaries, but the part why it works correctly is a bit too subtle.
WDYT, should we keep things the way they are now or should we restore BUILD_TAG-TAG duality in the Makefile for better explicitness?
Looking at it from another angle, the "BUILD_TAG-TAG duality" was to differentiate when we should and shouldn't apply GOTAGS=release during Go binaries build. Maybe that's the place that should be changed to make rules more explicit and straightforward?
There was a problem hiding this comment.
WDYT, should we keep things the way they are now or should we restore
BUILD_TAG-TAGduality in theMakefilefor better explicitness?
I think I will put it back the way it was i.e. TAG in the make environment.
36a9eed to
e9136e6
Compare
|
@gavin-stackrox: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Reflect changes made in release scripts in - stackrox/stackrox#5080
Reflect changes made in release scripts in - stackrox/stackrox#5080
Description
Less is more! And tag determination was overly complicated.
Checklist
Testing Performed