-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Removing changes to try and pinpoint source of test regression"
This reverts commit 3ca8284.
- Loading branch information
Showing
4 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file is derived of the .dockerignore | ||
# It is required to pass `.git` to the builder containers on RHTAP so we can bake build information into the binary. | ||
# It is required to pass the `.gitignore` files in `image/bin/` and `bin` to avoid a dirty version. | ||
# RHTAP uses Buildah which first looks up for `.containerignore`, then, if absent, `.dockerignore`. | ||
# Having this file enables us to have different exclusion list for RHTAP builds than in GHA/OSCI. | ||
# To regenerate, replace the below contents with the output of the following command (please keep these comments). | ||
# grep -vF -e '/.git/' -e '/bin/' -e '/image/bin/' .dockerignore | ||
|
||
# currently empty! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Job Preamble | ||
description: Common steps for most jobs | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Recover docker image cache space | ||
run: | | ||
df --si / | ||
docker system prune --force --all | ||
df --si / | ||
shell: bash | ||
|
||
- name: Ignore dubious repository ownership | ||
run: | | ||
# Prevent fatal error "detected dubious ownership in repository" from recent git. | ||
git config --global --add safe.directory "$(pwd)" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Style | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
jobs: | ||
check-generated-files: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.3.61 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- uses: ./.github/actions/job-preamble | ||
|
||
- name: Check Generated | ||
run: scripts/ci/jobs/check-generated.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../.. && pwd)" | ||
# shellcheck source=../../../scripts/ci/lib.sh | ||
source "$ROOT/scripts/ci/lib.sh" | ||
|
||
set -euo pipefail | ||
|
||
FAIL_FLAG="/tmp/fail" | ||
|
||
info 'Check .containerignore file is in sync with .dockerignore (If this fails, follow instructions in .containerignore to update it.)' | ||
function check-containerignore-is-in-sync() { | ||
diff \ | ||
--unified \ | ||
--ignore-blank-lines \ | ||
<(grep -v -e '^#' .containerignore) \ | ||
<(grep -vF -e '/.git/' -e '/image/' -e '/bin/' .dockerignore) \ | ||
> diff.txt | ||
} | ||
check-containerignore-is-in-sync || { | ||
info ".containerignore file is not in sync with .dockerignore" | ||
info "$(cat diff.txt)" | ||
git reset --hard HEAD | ||
echo check-containerignore-is-in-sync >> "$FAIL_FLAG" | ||
} | ||
|
||
if [[ -e "$FAIL_FLAG" ]]; then | ||
echo "ERROR: Some generated file checks failed:" | ||
cat "$FAIL_FLAG" | ||
exit 1 | ||
fi |