120 Commits

Author SHA1 Message Date
dca407d466 GHA: Fix typo setting output parameter
Ref:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-10 12:59:11 -05:00
fcfb7d2927 GHA: Fix typo.
Whoops Ref: #16414

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-10 12:33:18 -05:00
0334d8d611 Cirrus: Add tests for GHA scripts
Also, fix the rerun_cirrus_cron workflow.  Thanks @ygalblum for spotting
the error.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:47:30 -05:00
66d857cdd7 GHA: Update scripts to pass shellcheck
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:47:29 -05:00
462ce32e66 GHA: Fix cirrus-cron scripts
Lack of proper testing possibility for github actions and lack of
script-testing by me, allowed several flaws through into 'main'.  Fix
the problems and manually test the scripts to make sure they're working.

Note: Also revert the stupid SHA-based action-pinning back to normal,
human-readable version numbers.  The value of using SHAs in the name of
improved "security" is real, but the value of human-readability and
ease of maintenance is greater.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-07 11:46:34 -05:00
35523d560a GHA: Auto. re-run failed cirrus-cron builds once
With a seemingly ever growing list of cirrus-cron jobs running on
release branches, there are bound to be some hiccups.  Sometimes a lot
of them.  Normally any failures require a human to eyeball the logs
and/or manually re-run the job to see if it was simply a flake.  This
doesn't take long, but can be distracting and compounds over time.

Attempt to alleviate some maintainer burden by using a new github action
workflow to perform **one** automatic re-run on any failed builds.  This
task is scheduled an hour prior to a second failure check, and generation
of notification e-mail for review.

Note: If there are no failures, due to the auto. re-run or luck, no
e-mail is generated. If this proves useful in this repo, I intend to
re-use this workflow for other repo's cirrus-cron jobs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-03 13:54:39 -04:00
3a85d537b6 GHA: Migrate inline script to file
Inline scripts make github-action workflow YAML harder to read/maintain.
Relocate the e-mail formation script to a dedicated file.  This also
permits better input-validation and re-use of a common `err()` function.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-03 13:54:39 -04:00
980d5b3622 GHA: Simplify script reference
This workflow was originally crafted to be (somehow) reused with
different scripts.  That never happened and the extra indirection is
confusing and hard to maintain.  Remove it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-03 13:54:38 -04:00
bb78ba19eb Upgrade GitHub actions packages from v2 to v3
Upgrade actions/checkout and actions/upload-artifact packages from v2 to
v3.

Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-10-30 20:24:55 -07:00
a2581abbf9 Adds brew info podman to issue template.
Just a quick little addition to provide the command to get the package
info from brew for those who might not know.

Signed-off-by: Kirk Bater <kirk.bater@gmail.com>
2022-09-30 14:30:56 -04:00
885bc4742d Enable github labeler, use for api-change
Belated followup to #11829: use github labeler workflow[1] to
auto-add 'kind/api-change' label to PRs in which files are
touched under pkg/api

 [1] https://github.com/actions/labeler

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-13 07:36:45 -06:00
ecb9f99b88 Add new windows installer and build
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:12:09 -05:00
bcfbee9862 ISSUE TEMPLATE: remove --debug from podman info
`--debug` is a NOP and will be hidden in a later commit.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:14:56 +02:00
d95e79ebe3 GHA: Fix dumb error check
Previously the reply JSON was examined for the literal presence of the
string 'error'.  This was intended to catch server or query errors and
the like.  However it's not a sound design as valid/legitimate contents
could potentially contain the string.  Fix this by using the `-e` option
to `jq`, with a filter that should always result in a non-empty/null
match.  If this fails or returns null for some reason, then it's safe to
throw a real error code & message.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-14 14:42:59 -04:00
1fc5a107a0 [CI:DOCS] PodmanImage Readme touchup
@cevich recently renamed all the files named Dockerfile to Containerfile
in this directory.  Touching up the README.md to reflect that.

Also, as I was doing the submit, I noticed a couple of nits in the PR
request template and cleaned those up.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-06-04 15:19:09 -04:00
c632a2efcd dependabot: add release-note-none label
Followup to https://github.com/openshift/release/pull/28686
in which we ask openshift-ci-bot to enforce a release-note
label on new PRs.

Dependabot PRs do not need release notes. Add a config setting
(copied from cri-o) that tells dependabot to set release-note-none
on new PRs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-05-17 13:55:01 -06:00
f6b397bf1e add dependabot config for test/tools go.mod
dependabot should update out test dependencies as well.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-04 17:11:50 +02:00
461b73f563 Github PR template: add release-note block
Initial step toward automating the collection & generation
of release notes: add a markdown release-note block to our
PR template. This will be reaped by an existing Kubernetes
tool and gathered into a document that can be used as a
starting point for future releases.

Many more followup steps to come.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-27 13:28:34 -06:00
9cacc18c95 Set permissions for GitHub actions
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-03-30 20:36:23 +00:00
f6963cea13 Cirrus: Build multi-arch images + manifests
Github-actions for large/complex tasks is hard to read and maintain.
Reimplement the multi-arch image build workflow into a set of bash
scripts that use all native contrainer-org tooling.  This requires
a special VM image setup with emulation to build foreign architectures.
It also requires renaming the `helloimage` directory, because the build
script uses the directory name in the image FQIN.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-28 16:56:28 -04:00
914e9b3f70 Merge pull request #13564 from naveensrinivasan/naveen/feat/pin-actions
[CI:DOCS] Pin actions to a full length commit SHA
2022-03-28 22:44:12 +02:00
1821eb3837 Pin actions to a full length commit SHA
- Pinned actions by SHA https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

>Pin actions to a full length commit SHA

>Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions

Also dependabot supports upgrades based on SHA.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-03-28 19:00:16 +00:00
4408db3303 Updated dependabot to GitHub actions
- Updated dependabot to get updates for GitHub actions.

GitHub sends Dependabot alerts when we detect vulnerabilities affecting your repository
as well as when there are new updates to the dependency.

https://docs.github.com/en/code-security/dependabot/dependabot-alerts/about-dependabot-alerts

A vulnerability is a problem in a project's code that could be exploited to damage the confidentiality, integrity, or availability of the project or other projects that use its code. Vulnerabilities vary in type, severity, and method of attack.

When your code depends on a package that has a security vulnerability, this vulnerable dependency can cause a range of problems for your project or the people who use it.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-03-19 03:15:16 +00:00
a928d39d0c github: label issues based on os fix regex
Good news the github action works, however I noticed that we cannot use
a multiline regex so we have to use serviceIsRemote to detect if this is
a remote client. Also change the os regex so that it matches both the
output of podman version and podman info.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2022-01-27 21:24:34 +01:00
525bdc3771 github: label issues based on os
We get a lot of issues for podman-remote on macos. Since the fact that
this is a remote client is often overlooked by us lets add windows, macos
and remote label automatically based on a regex which should match the
output of podman version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-27 17:51:35 +01:00
72ddacdbe9 Github workflow: Fix parsing of GraphQL response JSON
While #12998 fixed the query string, it neglected to address
presence of the old `githubRepository` field name in the reply.  This
resulted in the job throwing an error:

`jq: error (at ./artifacts/reply.json:0): Cannot iterate over null`

However, the job did preserve an artifacts archive containing the new
response data.  As a test for the fix in this commit, I ran the
raw response data through the corrected jq command-line.  This
confirmed the change by properly parsing the data as expected by
the workflow.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-25 14:39:32 -05:00
7003d334e8 Merge pull request #12998 from cevich/fix_query
[CI:DOCS] Github workflow: Update Cirrus-cron GraphQL query
2022-01-25 13:51:43 -05:00
6df245c6ec Github-workflow: Fix YAML syntax
The `body` string value must be quoted because it contains a colon.

Also fix an incorrect URL substitution reference in error-notice e-mail
body text.

(In my defense...testing this workflow is basically impractical without
merging it)

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-25 12:39:17 -05:00
29e89da1a2 Github workflow: Send e-mail on job error
This job is designed to be silent when Cirrus-cron executions pass.
Unless specifically instructed, the workflow itself will also remain
silent if there's an error.  Fix this by catching workflow errors and
sending a notification e-mail containing a link to the failed run.  This
also requires listing the recipient addresses directly in the workflow.
Otherwise (as previouslly implemented) the value would not be retrieved
if/when any previous step raised an error.

**Note**: Due to the way this workflow is implemented, there is no way
easy way to test it other than directly on the `main` repo. branch.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-24 15:41:50 -05:00
0d42d9f8d1 Github workflow: Update Cirrus-cron GraphQL query
Sometime on Jan. 14th the GraphQL schema for Cirrus-CI changed, leading
to the following error:

`Validation error of type FieldUndefined: Field 'githubRepository' in
type 'Root' is undefined @ 'githubRepository'`

After some exploration, it was determined the field had been replaced
with a new root-level field `ownerRepository`.  Manual experimentation
revealed the scalar value `LINUX` was appropriate to use for the new
`platform` parameter.  The query reply appears to remain compatible.

Update the script which performs this query to use the new field name
and parameter.  ***NOTE*** This script is shared across multiple
containers-org repos. All of which are/were affected by the schema
change.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-24 15:25:47 -05:00
96be2bb3dc troubleshooting links to main branch
Signed-off-by: fredr <fredrik@enestad.com>
2022-01-14 12:29:13 +01:00
6cde9255f0 .github: revert to the old template
we are not using any of the metadata in the new format, so we have
only the downside that is more annoying to fill.

[CI:DOCS] no need to run the CI

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-16 15:23:39 +01:00
0d4fa7bc97 Implement PR template to assist review & release
This duplicates the template used for buildah.  The intention
is to make it immediately clear to reviewers:

* The intended/basic purpose of the PR (also machine readable)
* Why are changes being proposed
* If there are any specific items need additional checking or scrutiny
* What should go into the release-notes (if anything).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-28 12:20:03 -04:00
32b5892164 Multi-arch image build: Daily version-tag push
This mirrors changes from
https://github.com/containers/buildah/pull/3381

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-27 14:15:25 -04:00
e64545004e [CI:DOCS] Multi-arch image workflow: Make steps generic
This duplicates the change from
https://github.com/containers/skopeo/pull/1379

Since this workflow is duplicated across three repositories, maintaining
changes becomes onerous if the item contents vary between
implementations in any way. Improve this situation by encoding the
repository-specific details into env. vars. then referencing those vars
throughout. This way, a meaningful diff can be worked with to compare
the contents across repositories.

Also included are abstractions for the specific command used to obtain
the project version, and needed details for filtering the output. Both
of these vary across the Buildah, Skopeo, and Podman repos.

NOTE: This change requires the names of two github action secrets
to be updated: PODMAN_QUAY_USERNAME -> REPONAME_QUAY_USERNAME
(and *PASSWORD).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-20 09:43:58 -04:00
fe044d51ea Fix cirrus-cron failure notification GH workflow
The master->main rename broke this.  Also update the runtime along with
a comment w/ link to the actual job definitions.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-07-12 10:39:34 -04:00
6b230bc924 Fix multi-arch image build clone:failure
A suspected recent change in docker (in github-actions Ubuntu
environment) results in a error:

```
cannot clone: Operation not permitted
Error: cannot re-exec process
```

Fix this by using podman to execute the container instead of docker.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-06-16 16:44:42 -04:00
3c82059c3d Sync. workflow across skopeo, buildah, and podman
Besides adding ***BIG FAT WARNING*** this commit updates the
containers-repo. logic to only (and properly) handle the `stable` image
(both version and `latest` tags).  This change was already discussed at
length with @TomSweeneyRedHat.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-05-21 14:39:01 -04:00
60eb4e74d1 Use more recent stale release...
… as currently with `v1`, `remove-stale-when-updated` is set but isn't causing labels to be updated when comments are added.

Signed-off-by: Stuart Shelton <stuart@shelton.me>
2021-05-16 19:02:18 +01:00
9db9fa2a08 Fix variable reference typo. in multi-arch image action
Bug introduced by #10150

Also, in case of failure of one matrix-leg, do not terminate execution
of all others.  There are many reasons why an item could fail (i.e.
temporary networking problem).  Since the job runs periodically,
we can simply allow the subsequent run to cover for any missed images
pushes due to sporadic job failures.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-05-03 10:56:34 -04:00
00f2f7d14e Fix multi-arch image workflow typo
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-30 13:50:41 -04:00
21bef6db6e Update container image docs + fix unstable execution
Update the order of image documentation to be from most to least stable.
Similarly, avoid depending on execution of upstream podman, when
building/pushing.  It's easily possible for this build to function but
execution to fail due to some partially implemented feature.

Also, ensure images tagged `latest` are pushed for every matrix
item.  For 'upstream' and 'testing', this replaces use of the
'master' tag.

Lastly, update workflow comments and split the 'podman' and 'containers'
FQIN steps and outputs to improve readability.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-29 11:23:59 -04:00
633cc473b5 Merge pull request #10139 from rhatdan/troubleshoot
[CI:DOCS] Add troubleshooting advice about the --userns option.
2021-04-28 10:14:31 -04:00
166149b12d Add troubleshooting advice about the --userns option.
Also a link to the troubleshooting guide into the issue template.

Replaces: https://github.com/containers/podman/pull/9770

Signed-off-by: Josh Berkus <josh@agliodbs.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-26 17:31:29 -04:00
17c82caac4 Fix logic for pushing stable multi-arch images
The intention is to only push an image if there is ***NOT*** an existing
tag.  The original logic for this condition was inverted.

Also, improve radability of the `{container,podman}_push=true`
statements.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-26 14:12:42 -04:00
1e98a95a0e Several multi-arch image build/push fixes
* Fix not setting `$VERSION` before reference
* Reduce need for "syntax-hilighting workaround` comment.
  Simplify context-expressions -> simple env. var. referenmces
* Fix pushing quay.io/containers/podman:master twice
  ('upstream' and 'testing' matrix items)
* Throw error on unknown/unsupported matrix items
* Improve readability of setting multi-line `$LABELS` value.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-23 13:35:10 -04:00
3c5bb7bf0f Add github-action workflow to build/push multi-arch
This borrows very heavily from the work done for buildah by @barthy1 -
Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>.  Some changes to code and
comments made for clarity and specificity.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-22 16:20:59 -04:00
1ca74b00d7 add a dependabot config to automate vendoring
While dependabot has turned out great to automate updating dependencies,
a major painpoint was that we had to manually run `make vendor` for each
and every commit.  It was causing noise.

Adding the config file to `.github/dependabot.yml` will take of also
updating the `./vendor` tree.  `containers/common` is using this config
for a while successfully.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-18 15:18:13 +01:00
6c75419a8f Cirrus: Send cirrus-cron report e-mail to list.
This mailing-list was established to allow people to sub/unsub from
automated notifications.  Add it to the list of destinations picked up
by the Github Actions workflow
`.github/workflows/check_cirrus_cron.yml`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-08 12:11:16 -05:00
bf5d184325 Fix spelling mistakes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-09 06:00:04 -05:00