-
Couldn't load subscription status.
- Fork 255
feat(ci): Build container images without python deps #2572
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #!/bin/bash | ||
| declare -r UNKNOWN_BRANCH_PREFIX="0.0" | ||
| declare -r MASTER_BRANCH_PREFIX="1.2" | ||
|
|
||
| function prefix_from_branch() { | ||
| declare -r branch_name="$1" | ||
|
|
||
| if [[ "$branch_name" =~ ^([^/]+/)?mce-([[:digit:]]+.[[:digit:]]+) ]]; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've asked and ACM/MCE don't seem to be using bundle-gen anymore. Given that, and the fact that we don't build OperatorHub bundles for MCE branches anymore, we should be able to eliminate this condition. |
||
| echo "${BASH_REMATCH[2]}" | ||
| elif [[ "$branch_name" =~ ^([^/]+/)?master$ ]]; then | ||
| echo "$MASTER_BRANCH_PREFIX" | ||
| else | ||
| echo "$UNKNOWN_BRANCH_PREFIX" | ||
| fi | ||
| } | ||
|
|
||
| function commit_count() { | ||
| git rev-list --count "$(git rev-list --max-parents=0 HEAD)..HEAD" | ||
| } | ||
|
|
||
| function short_sha() { | ||
| git rev-parse --short HEAD | ||
| } | ||
|
|
||
| echo "$(prefix_from_branch "$(git rev-parse --abbrev-ref HEAD)").$(commit_count)-$(short_sha)" | ||
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.
Love this. It was super annoying waiting for pip every time the Makefile loaded up.
However, this may have been the only thing ensuring that
pyyamlwas installed when running generate-saas-template.py. I'm going to look into porting that to bash/yq as well, but in the meantime, can we add theensurepipandpyyamlbusiness inside that rule? (At least then it will only run when that rule is invoked.)