-
Notifications
You must be signed in to change notification settings - Fork 33
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
ci: update bats and zot versions #581
Conversation
4ed4b3e
to
6ce0d6e
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.
suggested changes in rchincha#10
Makefile
Outdated
@@ -138,6 +140,12 @@ $(SKOPEO): | |||
cd $(TOP_LEVEL); \ | |||
rm -rf $$tmpdir; | |||
|
|||
$(BATS): | |||
rm -rf bats-core; \ |
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.
see #579 you need to 'set -e' here, or you end up exiting with the value of 'rm -rf bats-core', which is probably going to be 0.
Makefile
Outdated
@@ -41,9 +41,11 @@ REGCLIENT := $(TOOLS_D)/bin/regctl | |||
REGCLIENT_VERSION := v0.5.1 | |||
export SKOPEO = $(TOOLS_D)/bin/skopeo | |||
export SKOPEO_VERSION = 1.9.3 | |||
export BATS = $(TOOLS_D)/bin/bats |
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.
there is no reason to export this if you never use it.
just drop the 'export'
Makefile
Outdated
@@ -37,13 +37,16 @@ LXC_BRANCH?=stable-5.0 | |||
HACK_D := $(TOP_LEVEL)/hack | |||
# helper tools | |||
TOOLS_D := $(HACK_D)/tools | |||
export PATH := $(TOOLS_D)/bin:$(PATH) |
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.
Does this even work with sudo -E?
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.
$ export PATH=/tmp/foo:$PATH ; sudo -E sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
sudo(8) says:
PATH May be overridden by the security policy.
So i guess this doesn't work at least in the default ubuntu path here.
So I guess we have to leave PATH=PATH.
@@ -164,10 +171,8 @@ check-cov: lint test-cov | |||
|
|||
.PHONY: test-cov | |||
test-cov: stacker-cov $(REGCLIENT) $(SKOPEO) $(ZOT) | |||
sudo -E PATH="$$PATH" \ |
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 we do need this.
Makefile
Outdated
@@ -37,13 +37,16 @@ LXC_BRANCH?=stable-5.0 | |||
HACK_D := $(TOP_LEVEL)/hack | |||
# helper tools | |||
TOOLS_D := $(HACK_D)/tools | |||
export PATH := $(TOOLS_D)/bin:$(PATH) |
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.
$ export PATH=/tmp/foo:$PATH ; sudo -E sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
sudo(8) says:
PATH May be overridden by the security policy.
So i guess this doesn't work at least in the default ubuntu path here.
So I guess we have to leave PATH=PATH.
5679dae
to
8b3bcf2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #581 +/- ##
==========================================
- Coverage 57.11% 56.50% -0.62%
==========================================
Files 64 64
Lines 7520 7520
==========================================
- Hits 4295 4249 -46
- Misses 2483 2549 +66
+ Partials 742 722 -20 ☔ View full report in Codecov by Sentry. |
Update Makefile to bump up zot version Update Makefile to include a recipe to install latest bats Signed-off-by: Ramkumar Chinchani <[email protected]>
Clean up makefile for: * modify PATH with export to point at TOOLS_D/bin this way when test or any target is executed, the tools are in the path. * drop export of SKOPEO , just use it by name in test/. * Do not export BATS, it was never used anywhere * test targets do not need LXC_BRANCH or LXC_CLONE_URL * docker-clone depends on skopeo (tools/oci-copy uses it) Signed-off-by: Scott Moser <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
Makefile
Outdated
sudo -E PATH="$$PATH" \ | ||
LXC_BRANCH=$(LXC_BRANCH) \ | ||
LXC_CLONE_URL=$(LXC_CLONE_URL) \ | ||
test: stacker $(REGCLIENT) $(SKOPEO) $(ZOT) $(BATS) |
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.
because test is a .PHONY dependencies don't matter and aren't resolved.
nothing ends up building bats and so test fails.
https://stackoverflow.com/questions/13852535/makefile-dependencies-dont-work-for-phony-target
Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Ramkumar Chinchani <[email protected]>
#584 has a fix that makes this pass. |
Update Makefile to bump up zot version
Update Makefile to include a recipe to install latest bats
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.