Skip to content

Commit

Permalink
move ta-generator to task-generator directory
Browse files Browse the repository at this point in the history
- ta-generator and task-generator are currently
on the same directory level
- move ta-generator so it's a subdirectory of the task-generator
leading to a better file organization in the repository
- update .gitignore so it ignores vendor directories and diff
files used in trusted-artifacts task generation testing
  • Loading branch information
tnevrlka committed Sep 19, 2024
1 parent ef11db2 commit fdcb552
Show file tree
Hide file tree
Showing 33 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version-file: './task-generator/go.mod'
go-version-file: './task-generator/remote/go.mod'
- name: Check buildah remote
run: |
./hack/generate-buildah-remote.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checkton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Set to false when re-enabling SARIF uploads
fail-on-findings: true
find-copies-harder: true
exclude-regex: ^ta-generator
exclude-regex: ^task-generator

# Currently, code scanning alerts annoyingly stay open even if you fix them.
# Don't upload SARIF until https://github.com/orgs/community/discussions/132787 is resolved.
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
strategy:
matrix:
path:
- task-generator
- ta-generator
- task-generator/remote
- task-generator/trusted-artifacts
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
- uses: actions/setup-go@b26d40294f8ad76fcc90b915dac85892322fe62d
Expand All @@ -28,8 +28,8 @@ jobs:
strategy:
matrix:
path:
- task-generator
- ta-generator
- task-generator/remote
- task-generator/trusted-artifacts
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
- name: Install Go
Expand Down Expand Up @@ -69,8 +69,8 @@ jobs:
strategy:
matrix:
path:
- task-generator
- ta-generator
- task-generator/remote
- task-generator/trusted-artifacts
steps:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc
- uses: actions/setup-go@b26d40294f8ad76fcc90b915dac85892322fe62d
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ bundle_values.env
*~
*.swp
.checkton.sarif
**/vendor

# expected and got files generated in trusted-artifacts tests when mismatch occurs
task-generator/trusted-artifacts/golden/**/expected
task-generator/trusted-artifacts/golden/**/got
# Generated binaries
task-generator/trusted-artifacts/trusted-artifacts
task-generator/remote/remote

4 changes: 2 additions & 2 deletions hack/generate-buildah-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ set -euo pipefail

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

cd "${SCRIPTDIR}/../task-generator"
go build -o /tmp/remote-generator ./remote/main.go
cd "${SCRIPTDIR}/../task-generator/remote"
go build -o /tmp/remote-generator main.go

for version in 0.1 0.2; do
/tmp/remote-generator --buildah-task="${SCRIPTDIR}/../task/buildah/${version}/buildah.yaml" \
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-ta-tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ROOT_DIR="$(git rev-parse --show-toplevel)"
TASK_DIR="$(realpath "${ROOT_DIR}/task")"

tashbin="$(mktemp --dry-run)"
GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go build -C "${ROOT_DIR}/ta-generator/" -o "${tashbin}"
GOTOOLCHAIN=auto GOSUMDB=sum.golang.org go build -C "${ROOT_DIR}/task-generator/trusted-artifacts" -o "${tashbin}"
trap 'rm "${tashbin}"' EXIT
tash() {
"${tashbin}" "$@"
Expand Down
2 changes: 1 addition & 1 deletion task-generator/go.mod → task-generator/remote/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/konflux-ci/build-definitions/task-generator
module github.com/konflux-ci/build-definitions/task-generator/remote

go 1.22.0

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/konflux-ci/build-definitions/ta-generator
module github.com/konflux-ci/build-definitions/task-generator/trusted-artifacts

go 1.22.3

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit fdcb552

Please sign in to comment.