* Change DEST_BRANCH in .cirrus.yml from main to release-1.23
* Set GITVALIDATE_EPOCH for validation to the release-1.23 branch point
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This is a port from the podman repository, of substantially the same
workflow with a number of bugfixes and readability improvements
compared to the original. Same for the README.md updates.
The significant changes compared to the prior implementation are:
* Run periodically instead of only after every master push.
* Add a build for the "testing" image flavor.
* Fix a blank `org.opencontainers.image.source` value.
* Instead of pushing a `main` (or `master`) tagged image, use `latest`.
* Simplify use of env. vars. and workflow vars.
Note: Aside from a `s/podman/buildah/g` this commit makes the
buildah and podman workflows identical. This is needed to better
support a smooth transition to a future/intended unification effort.
In other words, I intend to develop a single, shared workflow/script
that can be used for all three: skopeo, buildah, and podman.
Signed-off-by: Chris Evich <cevich@redhat.com>
Looks like this script wasn't working in the buildah environment,
apparently because we're in a shallow git checkout without a
master branch? Let's see if we can use $GITVALIDATE_EPOCH
instead.
And, add a sanity check so we catch this if it happens again.
Signed-off-by: Ed Santiago <santiago@redhat.com>
git tries to recognize renamed files. This isn't always
as helpful as intended. Turn it off, so we'll always see
files as 'A'dded.
This is a simple copy of podman PR 9468, but without a
test case because I can find no instances of a .bats
file being renamed in the buildah git history.
Signed-off-by: Ed Santiago <santiago@redhat.com>
This is an almost-clone of podman PR 8911[1], in which Ed
ticks off developers by requiring that PRs include tests.
[1] https://github.com/containers/podman/pull/8911
Motivated by the just-merged #2973, which is exactly the sort
of tiny little change that can have huge consequences down
the line and/or be easy to undo.
Changes from the podman version: allow '[NO NEW TESTS NEEDED]'
in addition to just '[NO TESTS NEEDED]', and make the former
the default suggestion. It's clearer. And, of course, update
the test-suite cases to reflect the buildah git tree.
Unrelated parasitic change: I removed the '@'s from 'validate'
steps; this will make it easier to (1) confirm that all desired
rules were invoked, and (2) on failure, see the exact command
that failed, making it quicker/easier for dev to reproduce.
Signed-off-by: Ed Santiago <santiago@redhat.com>
+ Increase validation output level when executing under automation
+ Increase linting timeout when executing under automation
Signed-off-by: Chris Evich <cevich@redhat.com>
golangci-lint already checks via gofmt so we can safely remove the
additional linting step.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Closes: #1808
Approved by: vrothberg
golangci-lint already checks via vet so we can safely remove the
additional linting step.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Closes: #1807
Approved by: vrothberg
Some operating systems don’t have `bash` in `/bin`, so we should take the
`$PATH` into consideration for searching it.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Closes: #1804
Approved by: TomSweeneyRedHat
This commit vendors golangci-lint and enables all linters which do not
complain right now. CI and scripting has been adapted as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Closes: #1706
Approved by: rhatdan
Create a dedicated go module in tests/tools to avoid mixing build
dependencies with test dependencies. This will help facilitate
downstream packaging a bit more.
Also use golangci-lint instead of the old metalinter.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Closes: #1621
Approved by: rhatdan
We really want users to use the registries.conf file specified by
the administrator. We also don't want them overriding the signature-policy.
Thes options are mainly their for CI/CD Systems, so they should be hidden
from the user.
Signed-off-by: Daniel J Walsh dwalsh@redhat.com
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #1373
Approved by: TomSweeneyRedHat
Set it to 87cb532ab3 in order to ignore an
unsigned commit breaking CI.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Closes: #1230
Approved by: rhatdan
Get rid of dangling whitespace in markdown files, and add a quick
validation check to error out if we try to add any new ones.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
It's a worthwhile goal, but for the moment I don't want to have to
refactor the new error-checking bits in runCopyStdio() to get it back
under 40.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #980
Approved by: rhatdan
buildah rmi now removes cached images associated with an image
when the image is removed only if the cached image is not required
by another image.
If an image is a parent and has a name then untag, otherwise return
an error stating the image can't be remoed as it has dependent
child images.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #871
Approved by: rhatdan
Boost the deadline for running gometalinter as part of 'make validate',
to avoid timeouts in PAPR.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #836
Approved by: rhatdan
Before calling runCollectOutput() to read error information from pipes,
make sure we've closed our handles to the writing ends of the pipes.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #872
Approved by: rhatdan
Also vendor in latest golang.org/x to attempt to fix issue with testing.
The latest tests were blowing up because of errors in the golang.org/x/sys
code. Updating the vendoring and switching the validate Checkout are being
done to make the tests pass.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #723
Approved by: TomSweeneyRedHat
We often use err as a variable inside of subblocks, and
we don't want golint to complain about it.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Closes: #379
Approved by: nalind
Bump the GIT_VALIDATION_EPOCH in tests/validate/git-validation.sh to a
later commit.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #340
Approved by: rhatdan
It looks like the metalinter is running out of memory while running
tests under PAPR, so give this a try.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #221
Approved by: rhatdan
Increase the timeout that we set for running the metalinter from 2
minutes to 4 minutes, for cases where the calling environment is more
heavily loaded than we expected.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #119
Approved by: rhatdan
Add a "validate" target to the top level Makefile that checks formatting
of source files with golint, signed-off-by tags with git-validate, and
for various other warnings with gometalinter.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Closes: #62
Approved by: rhatdan