-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update coredns image tags automatically #21
Conversation
22dd765
to
3f8ad8c
Compare
3f8ad8c
to
a2cc206
Compare
See that this PR created #24 |
We won't need #18 anymore |
6fb5e0b
to
d4151a3
Compare
9b5156b
to
fe35ca7
Compare
fe35ca7
to
4b9709e
Compare
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.
Great work, thanks a lot @addyess! Left some minor comments and suggestions. Feel free to ignore them if they seem irrelevant.
# Target to remove the temporary directory | ||
clean: | ||
@rm -rf $(COREDNS_GIT_DIR) | ||
@echo "Temporary directory removed: $(COREDNS_GIT_DIR)" |
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.
newline at eof
function usage() { | ||
if [[ -z ${COREDNS_GIT_DIR+x} ]]; then | ||
echo "COREDNS_GIT_DIR is not set" > /dev/stderr | ||
echo " Clone with 'git clone --bare --filter=blob:none --no-checkout https://github.com/coredns/coredns.git /tmp/coredns.git'" > /dev/stderr |
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.
echo " Clone with 'git clone --bare --filter=blob:none --no-checkout https://github.com/coredns/coredns.git /tmp/coredns.git'" > /dev/stderr | |
echo " Clone with 'git clone --bare --filter=blob:none --no-checkout https://github.com/coredns/coredns.git /tmp/coredns.git'" >&2 |
RO_REPO_DIR=$(dirname ${RO_SCRIPT_DIR}) | ||
RO_VERSIONS=${RO_SCRIPT_DIR}/../versions.txt | ||
|
||
function usage() { |
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.
Not really "usage", more of a environment check
function check_dependencies(){ | ||
for cmd in yq jq git envsubst; do | ||
if ! command -v $cmd &> /dev/null; then | ||
echo "$cmd could not be found" > /dev/stderr |
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.
echo "$cmd could not be found" > /dev/stderr | |
echo "$cmd could not be found" >&2 |
create_rockcrafts | ||
} | ||
|
||
main |
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.
EOF
|
||
rm -rf ${RO_VERSIONS} | ||
for rockcraft in $(find ${RO_REPO_DIR} -name 'rockcraft.yaml'); do | ||
echo $(yq '.version' $rockcraft) >> ${RO_VERSIONS} |
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.
echo not needed
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.
so? it seems this is required. Without it
yq '.version' $rockcraft >> ${RO_VERSIONS}
i get an error:
Error: write /dev/stdout: bad file descriptor
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 think it's due to snap confinement when yq is installed via snap
Overview
The nightly tests looking for coredns tags upstream should create new rockcraft files based on a template in this repo
Details