Commit Graph

41 Commits

Author SHA1 Message Date
Nalin Dahyabhai 144df94023 post-1.23 branch fixups
* 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>
2021-09-27 13:17:31 -04:00
Daniel J Walsh 75bbfdf3c0
Fix ownership of /home/build/.local/share/containers
Fixes: https://github.com/containers/buildah/issues/3457

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-26 06:21:37 -04:00
Ed Santiago 5cdbcfc020
Proposed patch for 3399 (shadowutils)
Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-07-27 13:34:48 -04:00
Chris Evich ba5ee0e8e1
Multi-arch github-action workflow unification
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>
2021-05-05 14:00:12 -04:00
Ed Santiago 6587442468 pr-should-include-tests: try to make work in buildah
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>
2021-04-29 06:32:24 -06:00
Ed Santiago b1cd538d77 pr-should-include-tests: recognized "renamed" tests
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>
2021-02-22 12:15:23 -07:00
Ed Santiago 8d8f00e124 'make validate': require PRs to include tests
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>
2021-02-08 09:43:59 -07:00
Chris Evich 4961747e5e
Validate: reference HEAD
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-16 06:51:25 -04:00
Chris Evich 6a01461f79
Cirrus: Fix validate commit epoch
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-15 14:20:17 -04:00
dependabot-preview[bot] 9fb931ca7a
Bump github.com/containers/common from 0.14.0 to 0.15.2
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.14.0 to 0.15.2.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.14.0...v0.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-08 05:23:48 -04:00
Daniel J Walsh ce2fc8b22b
Bump validation
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-08 16:27:58 -04:00
Daniel J Walsh fc6baddc97
Update to containers/common v0.3.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-18 17:45:01 -05:00
Chris Evich 96871dfed8
Cirrus: Improve automated lint + validation
+ Increase validation output level when executing under automation
+ Increase linting timeout when executing under automation

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 16:21:44 -05:00
Chris Evich 92e59d5249
Show validation command-line
Validation problems can be difficult to debug w/o knowing what options
were passed / how it was called.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-06 16:21:43 -05:00
Sascha Grunert 5a1c733c05 Remove gofmt.sh in favor of golangci-lint
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
2019-08-21 11:36:40 +00:00
Sascha Grunert 3ad937bbf8 Remove govet.sh in favor of golangci-lint
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
2019-08-21 11:35:33 +00:00
Sascha Grunert b288b7a3d9 Update shebangs to take env into consideration
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
2019-08-20 11:26:57 +00:00
Sascha Grunert e160a632b7 Switch to golangci-lint
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
2019-07-07 10:34:01 +00:00
Valentin Rothberg 02ae076579 tests/tools: go module for test binaries
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
2019-06-25 09:55:38 +00:00
Daniel J Walsh fcc12bdadf Bump to Replace golang 1.10 with 1.12
Vendor in containers/storage v1.12.2

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1384
Approved by: vrothberg
2019-04-14 09:20:40 +00:00
Daniel J Walsh 11dd2197df Hide from users command options that we don't want them to use.
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
2019-03-04 13:32:24 +00:00
Daniel J Walsh 4cb8e2e67d UPdate gitvalidation epoch
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1372
Approved by: TomSweeneyRedHat
2019-02-27 12:30:52 +00:00
Miloslav Trmač a925ba6e2d Explicitly specify a directory to find(1)
On macOS, (find -name ...) fails; a starting directory
must be specified.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>

Closes: #1365
Approved by: rhatdan
2019-02-25 10:27:46 +00:00
Valentin Rothberg 90ea890260 bump GITVALIDATE_EPOCH
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
2018-12-11 14:18:26 +00:00
Daniel J Walsh 7a7165aa48
Change validation EPOCH
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-11-04 07:01:32 -05:00
Nalin Dahyabhai 7681e8dd5b Get rid of dangling whitespace in markdown files
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>
2018-09-18 17:10:13 -04:00
Nalin Dahyabhai bbbf6b2090 Don't build btrfs if it is not installed
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1016
Approved by: TomSweeneyRedHat
2018-09-14 19:08:50 +00:00
Nalin Dahyabhai 9430ed4fcc Bump maximum cyclomatic complexity to 45
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
2018-09-04 20:08:21 +00:00
umohnani8 d93c6886ac Fix rmi to remove intermediate images associated with an image
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
2018-08-03 19:05:44 +00:00
Nalin Dahyabhai 59d2a89572 Increase the deadline for gometalinter during 'make validate'
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
2018-08-01 14:04:59 +00:00
Nalin Dahyabhai 826733af7f Avoid a stall in runCollectOutput()
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
2018-07-19 19:51:38 +00:00
TomSweeneyRedHat 6f725996d0 Add unused function param lint check
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #837
Approved by: rhatdan
2018-06-30 10:31:23 +00:00
Daniel J Walsh 9fafd493a0 buildah bud should require a context directory or URL
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
2018-05-30 14:17:43 +00:00
Nalin Dahyabhai 8b9c777a2e Test with Go 1.10, too
And teach govet.sh about build tags.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #711
Approved by: rhatdan
2018-05-21 19:31:58 +00:00
Daniel J Walsh 9f5e1b3a77 Make lint was complaining about some vetshowed err
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
2018-01-03 21:10:28 +00:00
Nalin Dahyabhai a99d5f0798 Bump the GIT_VALIDATION_EPOCH to a newer version
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
2017-11-28 19:39:37 +00:00
Daniel J Walsh 966f32b2ac Add proper SELinux labeling to buildah run
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #294
Approved by: nalind
2017-11-07 22:40:29 +00:00
Nalin Dahyabhai 83fe25ca4e Turn on --enable-gc when running gometalinter
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
2017-07-26 17:43:05 +00:00
Nalin Dahyabhai b92279faa4 Increase the timeout for metalinter from 2m to 4m
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
2017-05-23 17:06:37 +00:00
Nalin Dahyabhai 60b9159485 Add a "go vet" validation step
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #91
Approved by: rhatdan
2017-05-08 17:50:38 +00:00
Nalin Dahyabhai c0a6d24ec2 Add a "validate" target
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
2017-04-12 21:25:35 +00:00