-
Notifications
You must be signed in to change notification settings - Fork 248
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
feat(ci): Build container images without python deps #2572
Open
celebdor
wants to merge
1
commit into
openshift:master
Choose a base branch
from
celebdor:pyless
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
pyyaml
was 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 theensurepip
andpyyaml
business inside that rule? (At least then it will only run when that rule is invoked.)