From 5a37509c0493d88aaa2425205f5693cf67e5d038 Mon Sep 17 00:00:00 2001 From: Kamil Kasperski Date: Tue, 3 Oct 2023 12:37:01 +0200 Subject: [PATCH] Reorganize golang code and clean up old code (#8970) * Reorganize golang code and clean up old code /kind cleanup /area ci 1st part of directory reorganization and cleanup - go code * Reorganize golang code and clean up old code /kind cleanup /area ci 1st part of directory reorganization and cleanup - go code --- .ko.yaml | 8 +- .koapps.yaml | 32 ++--- .../cloud-run/cors-proxy/cors-proxy.go | 5 +- .../create-github-issue.go | 16 +-- .../cloud-run/gardener-sa-rotate/README.md | 0 .../gardener-sa-rotate/gardener-sa-rotate.go | 6 +- .../gardener-sa-rotate_test.go | 6 +- .../github-webhook-gateway.go | 10 +- .../github-webhook-gateway_test.go | 3 +- .../cloud-run/kms-rotate/README.md | 0 .../cloud-run/kms-rotate/kms-rotate.go | 0 .../cloud-run/kms-rotate/kms-rotate_test.go | 0 .../cloud-run/move-gcs-bucket/Dockerfile | 0 .../move-gcs-bucket/move-gcs-bucket.go | 12 +- .../rotate-service-account/Dockerfile | 0 .../rotate-service-account/README.md | 4 +- .../rotateserviceaccount.go | 8 +- .../kodata/gitleaks.toml | 0 .../scan-logs-for-secrets.go | 10 +- .../search-github-issues.go | 14 +-- .../service-account-keys-cleaner/Dockerfile | 0 .../service-account-keys-cleaner/README.md | 4 +- .../serviceaccountcleaner.go | 8 +- .../serviceaccountcleaner_test.go | 4 +- .../cloud-run/slack-message-sender/Dockerfile | 0 .../slack-message-sender/requirements.txt | 0 .../slack-message-sender.py | 0 .../gcp/cmd => cmd}/dnsclient/main.go | 3 +- .../automerge-notification/main.go | 14 +-- .../external-plugins/cla-assistant/main.go | 2 +- .../cla-assistant/main_test.go | 2 +- .../external-plugins/needs-tws/main.go | 2 +- .../external-plugins/needs-tws/plugin.go | 2 +- .../external-plugins/needs-tws/plugin_test.go | 2 +- .../gardener-rotate/README.md | 0 .../gardener-kyma-dev-config.yaml | 0 .../gardener-kyma-prow-config.yaml | 0 .../gardener-neighbors-config.yaml | 0 {development => cmd}/gardener-rotate/main.go | 2 +- {development => cmd}/image-builder/README.md | 14 ++- {development => cmd}/image-builder/config.go | 4 +- .../image-builder/config_test.go | 2 +- .../image-builder/images/buildkit/Dockerfile | 0 .../image-builder/images/kaniko/Dockerfile | 0 {development => cmd}/image-builder/main.go | 6 +- .../image-builder/main_test.go | 6 +- {development => cmd}/image-detector/README.md | 0 {development => cmd}/image-detector/main.go | 6 +- {development => cmd}/image-syncer/Makefile | 0 {development => cmd}/image-syncer/README.md | 0 .../image-syncer/external-images.yaml | 0 {development => cmd}/image-syncer/main.go | 4 +- {development => cmd}/image-syncer/util.go | 2 +- .../image-url-helper/README.md | 0 .../image-url-helper/cmd/check.go | 6 +- .../image-url-helper/cmd/image_url_helper.go | 0 .../image-url-helper/cmd/list.go | 4 +- .../image-url-helper/cmd/missing.go | 6 +- .../image-url-helper/cmd/promote.go | 4 +- .../image-url-helper/excludes.yaml | 0 {development => cmd}/image-url-helper/main.go | 3 +- .../jobguard/cmd => cmd}/jobguard/main.go | 8 +- {development => cmd}/markdown-index/main.go | 2 +- {development => cmd}/prowjobparser/Makefile | 0 {development => cmd}/prowjobparser/README.md | 0 {development => cmd}/prowjobparser/main.go | 0 .../checker => cmd}/unique-jobs-name/main.go | 0 development/image-syncer/before-commit.sh | 117 ------------------ development/image-url-helper/Makefile | 12 -- development/image-url-helper/before-commit.sh | 117 ------------------ development/jobguard/README.md | 40 ------ development/jobguard/scripts/run.sh | 34 ----- development/prowjobparser/before-commit.sh | 117 ------------------ .../tools/cmd/certbotauthenticator/main.go | 2 +- development/tools/cmd/rendertemplates/main.go | 2 +- development/tools/cmd/usersmapchecker/main.go | 7 +- development/tools/pkg/pjtester/pjtester.go | 2 +- .../tools/pkg/pjtester/pjtester_test.go | 2 +- docs/index.md | 50 +++++--- .../custom-image/README.md | 11 +- .../custom-image/create-custom-image.sh | 0 .../custom-image/install-deps-debian.sh | 0 .../custom-image/machine-id-clean-up.sh | 0 .../resources/dbus-1_system-local.conf | 0 .../cloudevents/client/client.go | 2 +- .../extractimageurls/kubernetes.go | 0 .../extractimageurls/kubernetes_test.go | 0 .../pkg => pkg}/extractimageurls/prowjob.go | 2 +- .../extractimageurls/prowjob_test.go | 0 .../pkg => pkg}/extractimageurls/terraform.go | 0 .../extractimageurls/terraform_test.go | 0 .../pkg => pkg}/extractimageurls/utils.go | 0 .../extractimageurls/utils_test.go | 0 .../pkg => pkg/gcp}/cloudfunctions/logging.go | 0 .../pkg => pkg/gcp}/dnsclient/api_wrapper.go | 0 .../gcp/pkg => pkg/gcp}/dnsclient/client.go | 0 .../gcp/pkg => pkg/gcp}/firestore/client.go | 2 +- .../gcp/pkg => pkg/gcp}/firestore/types.go | 0 {development/gcp/pkg => pkg/gcp}/http/http.go | 3 +- .../gcp/pkg => pkg/gcp}/iam/serviceaccount.go | 0 .../gcp/pkg => pkg/gcp}/logging/client.go | 0 .../gcp/pkg => pkg/gcp}/logging/types.go | 0 .../gcp/pkg => pkg/gcp}/pubsub/client.go | 2 +- .../gcp/pkg => pkg/gcp}/pubsub/types.go | 2 +- .../pkg => pkg/gcp}/secretmanager/service.go | 0 .../gcp/pkg => pkg/gcp}/types/types.go | 0 .../gcp/workflows/secrets-leak-detector.yaml | 0 {development => pkg}/github/agent.go | 6 +- .../pkg => pkg/github}/bumper/bumper.go | 0 .../github/pkg => pkg/github}/bumper/utils.go | 0 .../pkg => pkg/github}/bumper/utils_test.go | 0 .../pkg => pkg/github}/client/client.go | 4 +- .../github/pkg => pkg/github}/client/types.go | 0 .../pkg => pkg/github}/client/v2/client.go | 0 .../github/pkg => pkg/github}/git/client.go | 0 .../pkg => pkg/github}/repoowners/client.go | 4 +- .../pkg => pkg/github}/repoowners/owners.go | 2 +- .../github}/templates/secretsleak.go | 5 +- .../github/pkg => pkg/github}/types/types.go | 2 +- .../image-url-helper}/check/filecheck.go | 0 .../image-url-helper}/check/filecheck_test.go | 0 .../image-url-helper}/common/common.go | 0 .../image-url-helper}/common/images.go | 0 .../image-url-helper}/common/outputlist.go | 0 .../image-url-helper}/common/valuefile.go | 0 .../image-url-helper}/list/imagelister.go | 2 +- .../image-url-helper}/missing/missing.go | 2 +- .../image-url-helper}/missing/missing_test.go | 2 +- .../promote/externalsyncer.go | 4 +- .../image-url-helper}/promote/promote.go | 2 +- .../pkg => pkg/imagesync}/common.go | 2 +- .../jobguard/pkg => pkg}/jobguard/filter.go | 0 .../pkg => pkg}/jobguard/httpclient.go | 0 .../jobguard/pkg => pkg}/jobguard/status.go | 0 .../pkg => pkg}/jobguard/v2/jobguard.go | 0 .../pkg => pkg}/jobguard/v2/status.go | 0 .../jobguard/pkg => pkg}/jobguard/waiter.go | 0 {development => pkg}/logging/console.go | 0 {development => pkg}/logging/types.go | 0 .../opagatekeeper/constraints.go | 0 .../prow/externalplugin/externalplugin.go | 2 +- .../pjconfigtests/pjconfigtests_suite_test.go | 2 +- .../prow/pjconfigtests/pjconfigtests_test.go | 6 +- .../prow/pjconfigtests/validators.go | 3 +- {development => pkg}/prow/prowjobs.go | 0 .../securityconfig/securityconfig.go | 0 .../securityconfig/securityconfig_test.go | 0 {development/pkg => pkg}/sets/strings.go | 0 {development/pkg => pkg}/sets/tags.go | 2 +- .../image-builder => pkg}/sign/notary.go | 0 .../image-builder => pkg}/sign/notary_test.go | 0 .../image-builder => pkg}/sign/sign.go | 0 .../image-builder => pkg}/sign/sign_test.go | 0 {development/pkg => pkg}/tags/options.go | 0 {development/pkg => pkg}/tags/options_test.go | 0 {development/pkg => pkg}/tags/tag.go | 0 {development/pkg => pkg}/tags/tag_test.go | 0 {development/pkg => pkg}/tags/tags.go | 0 {development/pkg => pkg}/tags/tags_test.go | 0 {development => pkg}/types/types.go | 0 .../needs-tws-external-plugin/Dockerfile | 2 +- prow/jobs/test-infra/pjconfigtests.yaml | 74 +++++------ prow/jobs/test-infra/validation.yaml | 105 ---------------- templates/data/test-infra/pjconfigtests.yaml | 2 +- templates/data/validation-data.yaml | 63 ---------- 165 files changed, 246 insertions(+), 834 deletions(-) rename {development/gcp => cmd}/cloud-run/cors-proxy/cors-proxy.go (96%) rename {development/gcp => cmd}/cloud-run/create-github-issue/create-github-issue.go (93%) rename {development/gcp => cmd}/cloud-run/gardener-sa-rotate/README.md (100%) rename {development/gcp => cmd}/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go (97%) rename {development/gcp => cmd}/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go (98%) rename {development/gcp => cmd}/cloud-run/github-webhook-gateway/github-webhook-gateway.go (95%) rename {development/gcp => cmd}/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go (94%) rename {development/gcp => cmd}/cloud-run/kms-rotate/README.md (100%) rename {development/gcp => cmd}/cloud-run/kms-rotate/kms-rotate.go (100%) rename {development/gcp => cmd}/cloud-run/kms-rotate/kms-rotate_test.go (100%) rename {development/gcp => cmd}/cloud-run/move-gcs-bucket/Dockerfile (100%) rename {development/gcp => cmd}/cloud-run/move-gcs-bucket/move-gcs-bucket.go (93%) rename {development/secrets-rotator => cmd}/cloud-run/rotate-service-account/Dockerfile (100%) rename {development/secrets-rotator => cmd}/cloud-run/rotate-service-account/README.md (87%) rename {development/secrets-rotator => cmd}/cloud-run/rotate-service-account/rotateserviceaccount.go (96%) rename {development/gcp => cmd}/cloud-run/scan-logs-for-secrets/kodata/gitleaks.toml (100%) rename {development/gcp => cmd}/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go (95%) rename {development/gcp => cmd}/cloud-run/search-github-issue/search-github-issues.go (93%) rename {development/secrets-rotator => cmd}/cloud-run/service-account-keys-cleaner/Dockerfile (100%) rename {development/secrets-rotator => cmd}/cloud-run/service-account-keys-cleaner/README.md (91%) rename {development/secrets-rotator => cmd}/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go (95%) rename {development/secrets-rotator => cmd}/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go (99%) rename {development/gcp => cmd}/cloud-run/slack-message-sender/Dockerfile (100%) rename {development/gcp => cmd}/cloud-run/slack-message-sender/requirements.txt (100%) rename {development/gcp => cmd}/cloud-run/slack-message-sender/slack-message-sender.py (100%) rename {development/gcp/cmd => cmd}/dnsclient/main.go (96%) rename {development => cmd}/external-plugins/automerge-notification/main.go (94%) rename {development => cmd}/external-plugins/cla-assistant/main.go (97%) rename {development => cmd}/external-plugins/cla-assistant/main_test.go (97%) rename {development => cmd}/external-plugins/needs-tws/main.go (92%) rename {development => cmd}/external-plugins/needs-tws/plugin.go (99%) rename {development => cmd}/external-plugins/needs-tws/plugin_test.go (99%) rename {development => cmd}/gardener-rotate/README.md (100%) rename {development => cmd}/gardener-rotate/gardener-kyma-dev-config.yaml (100%) rename {development => cmd}/gardener-rotate/gardener-kyma-prow-config.yaml (100%) rename {development => cmd}/gardener-rotate/gardener-neighbors-config.yaml (100%) rename {development => cmd}/gardener-rotate/main.go (98%) rename {development => cmd}/image-builder/README.md (91%) rename {development => cmd}/image-builder/config.go (96%) rename {development => cmd}/image-builder/config_test.go (98%) rename {development => cmd}/image-builder/images/buildkit/Dockerfile (100%) rename {development => cmd}/image-builder/images/kaniko/Dockerfile (100%) rename {development => cmd}/image-builder/main.go (98%) rename {development => cmd}/image-builder/main_test.go (98%) rename {development => cmd}/image-detector/README.md (100%) rename {development => cmd}/image-detector/main.go (97%) rename {development => cmd}/image-syncer/Makefile (100%) rename {development => cmd}/image-syncer/README.md (100%) rename {development => cmd}/image-syncer/external-images.yaml (100%) rename {development => cmd}/image-syncer/main.go (98%) rename {development => cmd}/image-syncer/util.go (92%) rename {development => cmd}/image-url-helper/README.md (100%) rename {development => cmd}/image-url-helper/cmd/check.go (91%) rename {development => cmd}/image-url-helper/cmd/image_url_helper.go (100%) rename {development => cmd}/image-url-helper/cmd/list.go (92%) rename {development => cmd}/image-url-helper/cmd/missing.go (89%) rename {development => cmd}/image-url-helper/cmd/promote.go (94%) rename {development => cmd}/image-url-helper/excludes.yaml (100%) rename {development => cmd}/image-url-helper/main.go (58%) rename {development/jobguard/cmd => cmd}/jobguard/main.go (84%) rename {development => cmd}/markdown-index/main.go (98%) rename {development => cmd}/prowjobparser/Makefile (100%) rename {development => cmd}/prowjobparser/README.md (100%) rename {development => cmd}/prowjobparser/main.go (100%) rename {development/checker => cmd}/unique-jobs-name/main.go (100%) delete mode 100755 development/image-syncer/before-commit.sh delete mode 100644 development/image-url-helper/Makefile delete mode 100755 development/image-url-helper/before-commit.sh delete mode 100644 development/jobguard/README.md delete mode 100755 development/jobguard/scripts/run.sh delete mode 100755 development/prowjobparser/before-commit.sh rename {development => experimental}/custom-image/README.md (76%) rename {development => experimental}/custom-image/create-custom-image.sh (100%) rename {development => experimental}/custom-image/install-deps-debian.sh (100%) rename {development => experimental}/custom-image/machine-id-clean-up.sh (100%) rename {development => experimental}/custom-image/resources/dbus-1_system-local.conf (100%) rename {development => pkg}/cloudevents/client/client.go (98%) rename {development/pkg => pkg}/extractimageurls/kubernetes.go (100%) rename {development/pkg => pkg}/extractimageurls/kubernetes_test.go (100%) rename {development/pkg => pkg}/extractimageurls/prowjob.go (98%) rename {development/pkg => pkg}/extractimageurls/prowjob_test.go (100%) rename {development/pkg => pkg}/extractimageurls/terraform.go (100%) rename {development/pkg => pkg}/extractimageurls/terraform_test.go (100%) rename {development/pkg => pkg}/extractimageurls/utils.go (100%) rename {development/pkg => pkg}/extractimageurls/utils_test.go (100%) rename {development/gcp/pkg => pkg/gcp}/cloudfunctions/logging.go (100%) rename {development/gcp/pkg => pkg/gcp}/dnsclient/api_wrapper.go (100%) rename {development/gcp/pkg => pkg/gcp}/dnsclient/client.go (100%) rename {development/gcp/pkg => pkg/gcp}/firestore/client.go (97%) rename {development/gcp/pkg => pkg/gcp}/firestore/types.go (100%) rename {development/gcp/pkg => pkg/gcp}/http/http.go (87%) rename {development/gcp/pkg => pkg/gcp}/iam/serviceaccount.go (100%) rename {development/gcp/pkg => pkg/gcp}/logging/client.go (100%) rename {development/gcp/pkg => pkg/gcp}/logging/types.go (100%) rename {development/gcp/pkg => pkg/gcp}/pubsub/client.go (98%) rename {development/gcp/pkg => pkg/gcp}/pubsub/types.go (98%) rename {development/gcp/pkg => pkg/gcp}/secretmanager/service.go (100%) rename {development/gcp/pkg => pkg/gcp}/types/types.go (100%) rename {development => pkg}/gcp/workflows/secrets-leak-detector.yaml (100%) rename {development => pkg}/github/agent.go (90%) rename {development/github/pkg => pkg/github}/bumper/bumper.go (100%) rename {development/github/pkg => pkg/github}/bumper/utils.go (100%) rename {development/github/pkg => pkg/github}/bumper/utils_test.go (100%) rename {development/github/pkg => pkg/github}/client/client.go (98%) rename {development/github/pkg => pkg/github}/client/types.go (100%) rename {development/github/pkg => pkg/github}/client/v2/client.go (100%) rename {development/github/pkg => pkg/github}/git/client.go (100%) rename {development/github/pkg => pkg/github}/repoowners/client.go (97%) rename {development/github/pkg => pkg/github}/repoowners/owners.go (98%) rename {development/github/pkg => pkg/github}/templates/secretsleak.go (91%) rename {development/github/pkg => pkg/github}/types/types.go (94%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/check/filecheck.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/check/filecheck_test.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/common/common.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/common/images.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/common/outputlist.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/common/valuefile.go (100%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/list/imagelister.go (92%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/missing/missing.go (92%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/missing/missing_test.go (95%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/promote/externalsyncer.go (90%) rename {development/image-url-helper/pkg => pkg/image-url-helper}/promote/promote.go (99%) rename {development/image-syncer/pkg => pkg/imagesync}/common.go (94%) rename {development/jobguard/pkg => pkg}/jobguard/filter.go (100%) rename {development/jobguard/pkg => pkg}/jobguard/httpclient.go (100%) rename {development/jobguard/pkg => pkg}/jobguard/status.go (100%) rename {development/jobguard/pkg => pkg}/jobguard/v2/jobguard.go (100%) rename {development/jobguard/pkg => pkg}/jobguard/v2/status.go (100%) rename {development/jobguard/pkg => pkg}/jobguard/waiter.go (100%) rename {development => pkg}/logging/console.go (100%) rename {development => pkg}/logging/types.go (100%) rename {development => pkg}/opagatekeeper/constraints.go (100%) rename {development => pkg}/prow/externalplugin/externalplugin.go (99%) rename {development => pkg}/prow/pjconfigtests/pjconfigtests_suite_test.go (95%) rename {development => pkg}/prow/pjconfigtests/pjconfigtests_test.go (96%) rename {development => pkg}/prow/pjconfigtests/validators.go (88%) rename {development => pkg}/prow/prowjobs.go (100%) rename {development/pkg => pkg}/securityconfig/securityconfig.go (100%) rename {development/pkg => pkg}/securityconfig/securityconfig_test.go (100%) rename {development/pkg => pkg}/sets/strings.go (100%) rename {development/pkg => pkg}/sets/tags.go (87%) rename {development/image-builder => pkg}/sign/notary.go (100%) rename {development/image-builder => pkg}/sign/notary_test.go (100%) rename {development/image-builder => pkg}/sign/sign.go (100%) rename {development/image-builder => pkg}/sign/sign_test.go (100%) rename {development/pkg => pkg}/tags/options.go (100%) rename {development/pkg => pkg}/tags/options_test.go (100%) rename {development/pkg => pkg}/tags/tag.go (100%) rename {development/pkg => pkg}/tags/tag_test.go (100%) rename {development/pkg => pkg}/tags/tags.go (100%) rename {development/pkg => pkg}/tags/tags_test.go (100%) rename {development => pkg}/types/types.go (100%) diff --git a/.ko.yaml b/.ko.yaml index 0d0d6b6686cc..ba50fe713350 100644 --- a/.ko.yaml +++ b/.ko.yaml @@ -1,9 +1,9 @@ baseImageOverrides: github.com/kyma-project/test-infra/development/tools/cmd/pjtester: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 - github.com/kyma-project/test-infra/development/markdown-index: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 - github.com/kyma-project/test-infra/development/image-detector: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 - github.com/kyma-project/test-infra/development/external-plugins/needs-tws: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 - github.com/kyma-project/test-infra/development/external-plugins/automerge-notification: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 + github.com/kyma-project/test-infra/cmd/markdown-index: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 + github.com/kyma-project/test-infra/cmd/image-detector: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 + github.com/kyma-project/test-infra/cmd/external-plugins/needs-tws: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 + github.com/kyma-project/test-infra/cmd/external-plugins/automerge-notification: europe-docker.pkg.dev/kyma-project/prod/testimages/alpine-git:v20230913-3d41bb28 defaultPlatforms: - linux/arm64 - linux/amd64 \ No newline at end of file diff --git a/.koapps.yaml b/.koapps.yaml index ca610146b7cb..986b8933f447 100644 --- a/.koapps.yaml +++ b/.koapps.yaml @@ -1,9 +1,9 @@ apps: - ko://github.com/kyma-project/test-infra/development/tools/cmd/pjtester - - ko://github.com/kyma-project/test-infra/development/image-syncer - - ko://github.com/kyma-project/test-infra/development/image-detector - - ko://github.com/kyma-project/test-infra/development/image-url-helper - - ko://github.com/kyma-project/test-infra/development/markdown-index + - ko://github.com/kyma-project/test-infra/cmd/image-syncer + - ko://github.com/kyma-project/test-infra/cmd/image-detector + - ko://github.com/kyma-project/test-infra/cmd/image-url-helper + - ko://github.com/kyma-project/test-infra/cmd/markdown-index - ko://github.com/kyma-project/test-infra/development/tools/cmd/usersmapchecker - ko://github.com/kyma-project/test-infra/development/tools/cmd/gcscleaner - ko://github.com/kyma-project/test-infra/development/tools/cmd/diskscollector @@ -15,15 +15,15 @@ apps: - ko://github.com/kyma-project/test-infra/development/tools/cmd/gcrcleaner - ko://github.com/kyma-project/test-infra/development/tools/cmd/githubissues - ko://github.com/kyma-project/test-infra/development/tools/cmd/externalsecretschecker - - ko://github.com/kyma-project/test-infra/development/gardener-rotate - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/gardener-sa-rotate - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/kms-rotate - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/create-github-issue - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/move-gcs-bucket - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/scan-logs-for-secrets - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/search-github-issue - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/github-webhook-gateway - - ko://github.com/kyma-project/test-infra/development/gcp/cloud-run/cors-proxy - - ko://github.com/kyma-project/test-infra/development/external-plugins/needs-tws - - ko://github.com/kyma-project/test-infra/development/external-plugins/cla-assistant - - ko://github.com/kyma-project/test-infra/development/external-plugins/automerge-notification + - ko://github.com/kyma-project/test-infra/cmd/gardener-rotate + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/gardener-sa-rotate + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/kms-rotate + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/create-github-issue + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/move-gcs-bucket + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/scan-logs-for-secrets + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/search-github-issue + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/github-webhook-gateway + - ko://github.com/kyma-project/test-infra/cmd/cloud-run/cors-proxy + - ko://github.com/kyma-project/test-infra/cmd/external-plugins/needs-tws + - ko://github.com/kyma-project/test-infra/cmd/external-plugins/cla-assistant + - ko://github.com/kyma-project/test-infra/cmd/external-plugins/automerge-notification diff --git a/development/gcp/cloud-run/cors-proxy/cors-proxy.go b/cmd/cloud-run/cors-proxy/cors-proxy.go similarity index 96% rename from development/gcp/cloud-run/cors-proxy/cors-proxy.go rename to cmd/cloud-run/cors-proxy/cors-proxy.go index fec77aa451fd..bbd68a139e5b 100644 --- a/development/gcp/cloud-run/cors-proxy/cors-proxy.go +++ b/cmd/cloud-run/cors-proxy/cors-proxy.go @@ -3,15 +3,14 @@ package main import ( "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" "io" "net" "net/http" "net/url" "os" "strings" - - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" ) var ( diff --git a/development/gcp/cloud-run/create-github-issue/create-github-issue.go b/cmd/cloud-run/create-github-issue/create-github-issue.go similarity index 93% rename from development/gcp/cloud-run/create-github-issue/create-github-issue.go rename to cmd/cloud-run/create-github-issue/create-github-issue.go index 3f139b5ee1a6..787c21770e96 100644 --- a/development/gcp/cloud-run/create-github-issue/create-github-issue.go +++ b/cmd/cloud-run/create-github-issue/create-github-issue.go @@ -5,6 +5,14 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + gcptypes "github.com/kyma-project/test-infra/pkg/gcp/types" + kgithubv1 "github.com/kyma-project/test-infra/pkg/github/client" + "github.com/kyma-project/test-infra/pkg/github/templates" + githubtypes "github.com/kyma-project/test-infra/pkg/github/types" + "github.com/kyma-project/test-infra/pkg/types" "net/http" "net/http/httputil" "os" @@ -12,14 +20,6 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - gcptypes "github.com/kyma-project/test-infra/development/gcp/pkg/types" - kgithubv1 "github.com/kyma-project/test-infra/development/github/pkg/client" - "github.com/kyma-project/test-infra/development/github/pkg/templates" - githubtypes "github.com/kyma-project/test-infra/development/github/pkg/types" - "github.com/kyma-project/test-infra/development/types" "golang.org/x/net/context" ) diff --git a/development/gcp/cloud-run/gardener-sa-rotate/README.md b/cmd/cloud-run/gardener-sa-rotate/README.md similarity index 100% rename from development/gcp/cloud-run/gardener-sa-rotate/README.md rename to cmd/cloud-run/gardener-sa-rotate/README.md diff --git a/development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go b/cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go similarity index 97% rename from development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go rename to cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go index ab61905cc29e..18a7c8854ac6 100644 --- a/development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go +++ b/cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate.go @@ -4,15 +4,15 @@ package main import ( "context" "encoding/json" + "github.com/kyma-project/test-infra/pkg/gcp/iam" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "io" "log" "net/http" "os" "cloud.google.com/go/compute/metadata" - "github.com/kyma-project/test-infra/development/gcp/pkg/iam" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/clientcmd" diff --git a/development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go b/cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go similarity index 98% rename from development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go rename to cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go index 40d51f17e9fd..e5bf04ed2d94 100644 --- a/development/gcp/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go +++ b/cmd/cloud-run/gardener-sa-rotate/gardener-sa-rotate_test.go @@ -6,6 +6,9 @@ import ( "encoding/json" "errors" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/iam" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "io" "net/http" "net/http/httptest" @@ -17,9 +20,6 @@ import ( "testing" gpubsub "cloud.google.com/go/pubsub" - "github.com/kyma-project/test-infra/development/gcp/pkg/iam" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" gcpiam "google.golang.org/api/iam/v1" "google.golang.org/api/option" gcpsecretmanager "google.golang.org/api/secretmanager/v1" diff --git a/development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway.go b/cmd/cloud-run/github-webhook-gateway/github-webhook-gateway.go similarity index 95% rename from development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway.go rename to cmd/cloud-run/github-webhook-gateway/github-webhook-gateway.go index 9e03b93e3374..5c16263bc224 100644 --- a/development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway.go +++ b/cmd/cloud-run/github-webhook-gateway/github-webhook-gateway.go @@ -5,15 +5,15 @@ import ( "context" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + toolsclient "github.com/kyma-project/test-infra/pkg/github/client" + "github.com/kyma-project/test-infra/pkg/types" "net/http" "os" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - toolsclient "github.com/kyma-project/test-infra/development/github/pkg/client" - "github.com/kyma-project/test-infra/development/types" ) var ( diff --git a/development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go b/cmd/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go similarity index 94% rename from development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go rename to cmd/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go index e99eefd0f38d..f7dd94924967 100644 --- a/development/gcp/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go +++ b/cmd/cloud-run/github-webhook-gateway/github-webhook-gateway_test.go @@ -1,9 +1,8 @@ package main import ( + "github.com/kyma-project/test-infra/pkg/types" "testing" - - "github.com/kyma-project/test-infra/development/types" ) const ( diff --git a/development/gcp/cloud-run/kms-rotate/README.md b/cmd/cloud-run/kms-rotate/README.md similarity index 100% rename from development/gcp/cloud-run/kms-rotate/README.md rename to cmd/cloud-run/kms-rotate/README.md diff --git a/development/gcp/cloud-run/kms-rotate/kms-rotate.go b/cmd/cloud-run/kms-rotate/kms-rotate.go similarity index 100% rename from development/gcp/cloud-run/kms-rotate/kms-rotate.go rename to cmd/cloud-run/kms-rotate/kms-rotate.go diff --git a/development/gcp/cloud-run/kms-rotate/kms-rotate_test.go b/cmd/cloud-run/kms-rotate/kms-rotate_test.go similarity index 100% rename from development/gcp/cloud-run/kms-rotate/kms-rotate_test.go rename to cmd/cloud-run/kms-rotate/kms-rotate_test.go diff --git a/development/gcp/cloud-run/move-gcs-bucket/Dockerfile b/cmd/cloud-run/move-gcs-bucket/Dockerfile similarity index 100% rename from development/gcp/cloud-run/move-gcs-bucket/Dockerfile rename to cmd/cloud-run/move-gcs-bucket/Dockerfile diff --git a/development/gcp/cloud-run/move-gcs-bucket/move-gcs-bucket.go b/cmd/cloud-run/move-gcs-bucket/move-gcs-bucket.go similarity index 93% rename from development/gcp/cloud-run/move-gcs-bucket/move-gcs-bucket.go rename to cmd/cloud-run/move-gcs-bucket/move-gcs-bucket.go index d4ff6e212059..49f8cc180878 100644 --- a/development/gcp/cloud-run/move-gcs-bucket/move-gcs-bucket.go +++ b/cmd/cloud-run/move-gcs-bucket/move-gcs-bucket.go @@ -4,6 +4,12 @@ import ( "context" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + gcptypes "github.com/kyma-project/test-infra/pkg/gcp/types" + githubtypes "github.com/kyma-project/test-infra/pkg/github/types" + "github.com/kyma-project/test-infra/pkg/types" "net/http" "net/http/httputil" "os" @@ -12,12 +18,6 @@ import ( "cloud.google.com/go/storage" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - gcptypes "github.com/kyma-project/test-infra/development/gcp/pkg/types" - githubtypes "github.com/kyma-project/test-infra/development/github/pkg/types" - "github.com/kyma-project/test-infra/development/types" "google.golang.org/api/iterator" ) diff --git a/development/secrets-rotator/cloud-run/rotate-service-account/Dockerfile b/cmd/cloud-run/rotate-service-account/Dockerfile similarity index 100% rename from development/secrets-rotator/cloud-run/rotate-service-account/Dockerfile rename to cmd/cloud-run/rotate-service-account/Dockerfile diff --git a/development/secrets-rotator/cloud-run/rotate-service-account/README.md b/cmd/cloud-run/rotate-service-account/README.md similarity index 87% rename from development/secrets-rotator/cloud-run/rotate-service-account/README.md rename to cmd/cloud-run/rotate-service-account/README.md index dc6e4a71ec84..7eb01680f3b0 100644 --- a/development/secrets-rotator/cloud-run/rotate-service-account/README.md +++ b/cmd/cloud-run/rotate-service-account/README.md @@ -13,7 +13,9 @@ RotateServiceAccount creates a new key for a GCP service account and updates the ## Cloud Run deployment -RotateServiceAccount is deployed to Cloud Run applying Terraform config stored in [`./terraform` directory](../../../../configs/terraform). `terraform apply` is executed automatically on every PR changing Terraform `.tf` files belonging to the application. +RotateServiceAccount is deployed to Cloud Run applying Terraform config stored +in [`./terraform` directory](../../../configs/terraform). `terraform apply` is executed automatically on every PR +changing Terraform `.tf` files belonging to the application. ## RotateServiceAccount usage diff --git a/development/secrets-rotator/cloud-run/rotate-service-account/rotateserviceaccount.go b/cmd/cloud-run/rotate-service-account/rotateserviceaccount.go similarity index 96% rename from development/secrets-rotator/cloud-run/rotate-service-account/rotateserviceaccount.go rename to cmd/cloud-run/rotate-service-account/rotateserviceaccount.go index 376525b51854..0e2211200868 100644 --- a/development/secrets-rotator/cloud-run/rotate-service-account/rotateserviceaccount.go +++ b/cmd/cloud-run/rotate-service-account/rotateserviceaccount.go @@ -5,16 +5,16 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "net/http" "net/http/httputil" "os" "strings" "cloud.google.com/go/compute/metadata" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" "google.golang.org/api/iam/v1" ) diff --git a/development/gcp/cloud-run/scan-logs-for-secrets/kodata/gitleaks.toml b/cmd/cloud-run/scan-logs-for-secrets/kodata/gitleaks.toml similarity index 100% rename from development/gcp/cloud-run/scan-logs-for-secrets/kodata/gitleaks.toml rename to cmd/cloud-run/scan-logs-for-secrets/kodata/gitleaks.toml diff --git a/development/gcp/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go b/cmd/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go similarity index 95% rename from development/gcp/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go rename to cmd/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go index 94cd43e760e6..18ff3502a799 100644 --- a/development/gcp/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go +++ b/cmd/cloud-run/scan-logs-for-secrets/scan-logs-for-secrets.go @@ -3,6 +3,11 @@ package main import ( "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + gcptypes "github.com/kyma-project/test-infra/pkg/gcp/types" + "github.com/kyma-project/test-infra/pkg/types" "net/http/httputil" "regexp" @@ -14,11 +19,6 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/go-playground/validator/v10" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - gcptypes "github.com/kyma-project/test-infra/development/gcp/pkg/types" - "github.com/kyma-project/test-infra/development/types" "github.com/spf13/viper" "github.com/zricethezav/gitleaks/v8/config" "github.com/zricethezav/gitleaks/v8/detect" diff --git a/development/gcp/cloud-run/search-github-issue/search-github-issues.go b/cmd/cloud-run/search-github-issue/search-github-issues.go similarity index 93% rename from development/gcp/cloud-run/search-github-issue/search-github-issues.go rename to cmd/cloud-run/search-github-issue/search-github-issues.go index d5d93c335e4e..228e1ed66e89 100644 --- a/development/gcp/cloud-run/search-github-issue/search-github-issues.go +++ b/cmd/cloud-run/search-github-issue/search-github-issues.go @@ -5,6 +5,13 @@ import ( "encoding/base64" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + gcptypes "github.com/kyma-project/test-infra/pkg/gcp/types" + kgithubv1 "github.com/kyma-project/test-infra/pkg/github/client" + githubtypes "github.com/kyma-project/test-infra/pkg/github/types" + "github.com/kyma-project/test-infra/pkg/types" "net/http" "net/http/httputil" "os" @@ -13,13 +20,6 @@ import ( "cloud.google.com/go/storage" cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - gcptypes "github.com/kyma-project/test-infra/development/gcp/pkg/types" - kgithubv1 "github.com/kyma-project/test-infra/development/github/pkg/client" - githubtypes "github.com/kyma-project/test-infra/development/github/pkg/types" - "github.com/kyma-project/test-infra/development/types" "golang.org/x/net/context" ) diff --git a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/Dockerfile b/cmd/cloud-run/service-account-keys-cleaner/Dockerfile similarity index 100% rename from development/secrets-rotator/cloud-run/service-account-keys-cleaner/Dockerfile rename to cmd/cloud-run/service-account-keys-cleaner/Dockerfile diff --git a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/README.md b/cmd/cloud-run/service-account-keys-cleaner/README.md similarity index 91% rename from development/secrets-rotator/cloud-run/service-account-keys-cleaner/README.md rename to cmd/cloud-run/service-account-keys-cleaner/README.md index 8bda2d935ccf..acd774cab118 100644 --- a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/README.md +++ b/cmd/cloud-run/service-account-keys-cleaner/README.md @@ -15,7 +15,9 @@ The Cloud Run service deletes old keys for a GCP service account and updates the ## Cloud Run service deployment -ServiceAccountKeysCleaner is deployed to Cloud Run applying Terraform config stored in [`./terraform` directory](../../../../configs/terraform). `terraform apply` runs automatically on every PR changing Terraform `.tf` files belonging to the application. +ServiceAccountKeysCleaner is deployed to Cloud Run applying Terraform config stored +in [`./terraform` directory](../../../configs/terraform). `terraform apply` runs automatically on every PR changing +Terraform `.tf` files belonging to the application. 1. Create the `service-${PROJECT_NUMBER}@gcp-sa-secretmanager.iam.gserviceaccount.com` service account with the `roles/pubsub.publisher` role if it does not exist. 2. Merge your changes to test-infra main branch to trigger Terraform execution. diff --git a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go b/cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go similarity index 95% rename from development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go rename to cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go index 10423c654dae..db9e28cd9557 100644 --- a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go +++ b/cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner.go @@ -4,6 +4,10 @@ import ( "context" "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + crhttp "github.com/kyma-project/test-infra/pkg/gcp/http" + "github.com/kyma-project/test-infra/pkg/gcp/iam" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "net/http" "os" "strconv" @@ -11,10 +15,6 @@ import ( "time" "cloud.google.com/go/compute/metadata" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - crhttp "github.com/kyma-project/test-infra/development/gcp/pkg/http" - "github.com/kyma-project/test-infra/development/gcp/pkg/iam" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" gcpiam "google.golang.org/api/iam/v1" ) diff --git a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go b/cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go similarity index 99% rename from development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go rename to cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go index 45ebfcdce1f2..8263c9bee55a 100644 --- a/development/secrets-rotator/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go +++ b/cmd/cloud-run/service-account-keys-cleaner/serviceaccountcleaner_test.go @@ -6,6 +6,8 @@ import ( "encoding/json" "errors" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/iam" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "net/http" "net/http/httptest" "reflect" @@ -15,8 +17,6 @@ import ( "testing" "time" - "github.com/kyma-project/test-infra/development/gcp/pkg/iam" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" gcpiam "google.golang.org/api/iam/v1" "google.golang.org/api/option" gcpsecretmanager "google.golang.org/api/secretmanager/v1" diff --git a/development/gcp/cloud-run/slack-message-sender/Dockerfile b/cmd/cloud-run/slack-message-sender/Dockerfile similarity index 100% rename from development/gcp/cloud-run/slack-message-sender/Dockerfile rename to cmd/cloud-run/slack-message-sender/Dockerfile diff --git a/development/gcp/cloud-run/slack-message-sender/requirements.txt b/cmd/cloud-run/slack-message-sender/requirements.txt similarity index 100% rename from development/gcp/cloud-run/slack-message-sender/requirements.txt rename to cmd/cloud-run/slack-message-sender/requirements.txt diff --git a/development/gcp/cloud-run/slack-message-sender/slack-message-sender.py b/cmd/cloud-run/slack-message-sender/slack-message-sender.py similarity index 100% rename from development/gcp/cloud-run/slack-message-sender/slack-message-sender.py rename to cmd/cloud-run/slack-message-sender/slack-message-sender.py diff --git a/development/gcp/cmd/dnsclient/main.go b/cmd/dnsclient/main.go similarity index 96% rename from development/gcp/cmd/dnsclient/main.go rename to cmd/dnsclient/main.go index 7556b99caec0..4a547b621a4c 100644 --- a/development/gcp/cmd/dnsclient/main.go +++ b/cmd/dnsclient/main.go @@ -2,11 +2,10 @@ package main import ( "context" + "github.com/kyma-project/test-infra/pkg/gcp/dnsclient" flag "github.com/spf13/pflag" "log" "os" - - "github.com/kyma-project/test-infra/development/gcp/pkg/dnsclient" ) var ( diff --git a/development/external-plugins/automerge-notification/main.go b/cmd/external-plugins/automerge-notification/main.go similarity index 94% rename from development/external-plugins/automerge-notification/main.go rename to cmd/external-plugins/automerge-notification/main.go index dc8c8d181759..692004588e48 100644 --- a/development/external-plugins/automerge-notification/main.go +++ b/cmd/external-plugins/automerge-notification/main.go @@ -4,16 +4,16 @@ import ( "encoding/json" "flag" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + toolsclient "github.com/kyma-project/test-infra/pkg/github/client" + "github.com/kyma-project/test-infra/pkg/github/client/v2" + "github.com/kyma-project/test-infra/pkg/github/git" + "github.com/kyma-project/test-infra/pkg/github/repoowners" + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "sort" gogithub "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - toolsclient "github.com/kyma-project/test-infra/development/github/pkg/client" - "github.com/kyma-project/test-infra/development/github/pkg/client/v2" - "github.com/kyma-project/test-infra/development/github/pkg/git" - "github.com/kyma-project/test-infra/development/github/pkg/repoowners" - consolelog "github.com/kyma-project/test-infra/development/logging" - "github.com/kyma-project/test-infra/development/prow/externalplugin" + consolelog "github.com/kyma-project/test-infra/pkg/logging" "golang.org/x/net/context" "google.golang.org/api/option" diff --git a/development/external-plugins/cla-assistant/main.go b/cmd/external-plugins/cla-assistant/main.go similarity index 97% rename from development/external-plugins/cla-assistant/main.go rename to cmd/external-plugins/cla-assistant/main.go index 14db95824f43..42494bd29c1d 100644 --- a/development/external-plugins/cla-assistant/main.go +++ b/cmd/external-plugins/cla-assistant/main.go @@ -4,12 +4,12 @@ import ( "encoding/json" "flag" "fmt" + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "net/http" "os" "regexp" "time" - "github.com/kyma-project/test-infra/development/prow/externalplugin" "go.uber.org/zap" "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/github" diff --git a/development/external-plugins/cla-assistant/main_test.go b/cmd/external-plugins/cla-assistant/main_test.go similarity index 97% rename from development/external-plugins/cla-assistant/main_test.go rename to cmd/external-plugins/cla-assistant/main_test.go index c8eab6000bde..b339202e8838 100644 --- a/development/external-plugins/cla-assistant/main_test.go +++ b/cmd/external-plugins/cla-assistant/main_test.go @@ -2,7 +2,7 @@ package main import ( "fmt" - "github.com/kyma-project/test-infra/development/prow/externalplugin" + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/github" "net/http" diff --git a/development/external-plugins/needs-tws/main.go b/cmd/external-plugins/needs-tws/main.go similarity index 92% rename from development/external-plugins/needs-tws/main.go rename to cmd/external-plugins/needs-tws/main.go index ab5740769625..d20946044044 100644 --- a/development/external-plugins/needs-tws/main.go +++ b/cmd/external-plugins/needs-tws/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/kyma-project/test-infra/development/prow/externalplugin" + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "k8s.io/test-infra/prow/git/v2" ) diff --git a/development/external-plugins/needs-tws/plugin.go b/cmd/external-plugins/needs-tws/plugin.go similarity index 99% rename from development/external-plugins/needs-tws/plugin.go rename to cmd/external-plugins/needs-tws/plugin.go index 030d61f7f043..4a5013945a6f 100644 --- a/development/external-plugins/needs-tws/plugin.go +++ b/cmd/external-plugins/needs-tws/plugin.go @@ -3,12 +3,12 @@ package main import ( "encoding/json" "fmt" + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "os" "path/filepath" "regexp" "strings" - "github.com/kyma-project/test-infra/development/prow/externalplugin" "go.uber.org/zap" "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/git/v2" diff --git a/development/external-plugins/needs-tws/plugin_test.go b/cmd/external-plugins/needs-tws/plugin_test.go similarity index 99% rename from development/external-plugins/needs-tws/plugin_test.go rename to cmd/external-plugins/needs-tws/plugin_test.go index be52ef57f270..80d5fc50d196 100644 --- a/development/external-plugins/needs-tws/plugin_test.go +++ b/cmd/external-plugins/needs-tws/plugin_test.go @@ -1,9 +1,9 @@ package main import ( + "github.com/kyma-project/test-infra/pkg/prow/externalplugin" "testing" - "github.com/kyma-project/test-infra/development/prow/externalplugin" "go.uber.org/zap" "k8s.io/test-infra/prow/git/v2" "k8s.io/test-infra/prow/github" diff --git a/development/gardener-rotate/README.md b/cmd/gardener-rotate/README.md similarity index 100% rename from development/gardener-rotate/README.md rename to cmd/gardener-rotate/README.md diff --git a/development/gardener-rotate/gardener-kyma-dev-config.yaml b/cmd/gardener-rotate/gardener-kyma-dev-config.yaml similarity index 100% rename from development/gardener-rotate/gardener-kyma-dev-config.yaml rename to cmd/gardener-rotate/gardener-kyma-dev-config.yaml diff --git a/development/gardener-rotate/gardener-kyma-prow-config.yaml b/cmd/gardener-rotate/gardener-kyma-prow-config.yaml similarity index 100% rename from development/gardener-rotate/gardener-kyma-prow-config.yaml rename to cmd/gardener-rotate/gardener-kyma-prow-config.yaml diff --git a/development/gardener-rotate/gardener-neighbors-config.yaml b/cmd/gardener-rotate/gardener-neighbors-config.yaml similarity index 100% rename from development/gardener-rotate/gardener-neighbors-config.yaml rename to cmd/gardener-rotate/gardener-neighbors-config.yaml diff --git a/development/gardener-rotate/main.go b/cmd/gardener-rotate/main.go similarity index 98% rename from development/gardener-rotate/main.go rename to cmd/gardener-rotate/main.go index 4a178dc90c30..26eba29037e6 100644 --- a/development/gardener-rotate/main.go +++ b/cmd/gardener-rotate/main.go @@ -2,12 +2,12 @@ package main import ( "context" + "github.com/kyma-project/test-infra/pkg/gcp/secretmanager" "os" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "github.com/kyma-project/test-infra/development/gcp/pkg/secretmanager" "google.golang.org/api/option" gcpsecretmanager "google.golang.org/api/secretmanager/v1" authentication "k8s.io/api/authentication/v1" diff --git a/development/image-builder/README.md b/cmd/image-builder/README.md similarity index 91% rename from development/image-builder/README.md rename to cmd/image-builder/README.md index f2a99dcaf580..a4e4c10a099c 100644 --- a/development/image-builder/README.md +++ b/cmd/image-builder/README.md @@ -20,10 +20,11 @@ For any other problems, please raise an [issue](https://github.com/kyma-project/ ## Use config.yaml file -`image-builder` requires a configuration file to be provided with a set of variables, which are used during the execution. +`image-builder` requires a configuration file to be provided with a set of variables, which are used during the +execution. A `--config` flag is required. -For more information, refer to the [config.go](./config.go) file. +For more information, refer to the [config.go](config.go) file. Example file: ```yaml @@ -99,10 +100,13 @@ sign-config: type: token ``` -All enabled signers under `'*'` are used globally. Additionally, if a repository contains another signer configuration in the `org/repo` key, image-builder also uses this service to sign the image. -If the job is running in CI (Prow), it picks up the current `org/repo` value from the default Prow variables. If binary is running outside of CI, `--repo` flag will have to be used. Otherwise, the configuration will not be used. +All enabled signers under `'*'` are used globally. Additionally, if a repository contains another signer configuration +in the `org/repo` key, image-builder also uses this service to sign the image. +If the job is running in CI (Prow), it picks up the current `org/repo` value from the default Prow variables. If binary +is running outside of CI, `--repo` flag will have to be used. Otherwise, the configuration will not be used. -Currently, image-builder contains a basic implementation of a notary signer. If you want to add a new signer, refer to the [`sign`](./sign) package, and its code. +Currently, image-builder contains a basic implementation of a notary signer. If you want to add a new signer, refer to +the [`sign`](../../pkg/sign) package, and its code. ## Named Tags diff --git a/development/image-builder/config.go b/cmd/image-builder/config.go similarity index 96% rename from development/image-builder/config.go rename to cmd/image-builder/config.go index b28d55f7743c..c80d2dea529e 100644 --- a/development/image-builder/config.go +++ b/cmd/image-builder/config.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/kyma-project/test-infra/development/image-builder/sign" - "github.com/kyma-project/test-infra/development/pkg/tags" + "github.com/kyma-project/test-infra/pkg/sign" + "github.com/kyma-project/test-infra/pkg/tags" "gopkg.in/yaml.v3" ) diff --git a/development/image-builder/config_test.go b/cmd/image-builder/config_test.go similarity index 98% rename from development/image-builder/config_test.go rename to cmd/image-builder/config_test.go index 4a8db0b8533a..9f34120c1800 100644 --- a/development/image-builder/config_test.go +++ b/cmd/image-builder/config_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/kyma-project/test-infra/development/pkg/tags" + "github.com/kyma-project/test-infra/pkg/tags" ) func Test_ParseConfig(t *testing.T) { diff --git a/development/image-builder/images/buildkit/Dockerfile b/cmd/image-builder/images/buildkit/Dockerfile similarity index 100% rename from development/image-builder/images/buildkit/Dockerfile rename to cmd/image-builder/images/buildkit/Dockerfile diff --git a/development/image-builder/images/kaniko/Dockerfile b/cmd/image-builder/images/kaniko/Dockerfile similarity index 100% rename from development/image-builder/images/kaniko/Dockerfile rename to cmd/image-builder/images/kaniko/Dockerfile diff --git a/development/image-builder/main.go b/cmd/image-builder/main.go similarity index 98% rename from development/image-builder/main.go rename to cmd/image-builder/main.go index 8ae744e01515..3cdbfae8f23b 100644 --- a/development/image-builder/main.go +++ b/cmd/image-builder/main.go @@ -14,9 +14,9 @@ import ( "strings" "sync" - "github.com/kyma-project/test-infra/development/image-builder/sign" - "github.com/kyma-project/test-infra/development/pkg/sets" - "github.com/kyma-project/test-infra/development/pkg/tags" + "github.com/kyma-project/test-infra/pkg/sets" + "github.com/kyma-project/test-infra/pkg/sign" + "github.com/kyma-project/test-infra/pkg/tags" errutil "k8s.io/apimachinery/pkg/util/errors" ) diff --git a/development/image-builder/main_test.go b/cmd/image-builder/main_test.go similarity index 98% rename from development/image-builder/main_test.go rename to cmd/image-builder/main_test.go index 0c89cb54e4d8..b5e4d7c08642 100644 --- a/development/image-builder/main_test.go +++ b/cmd/image-builder/main_test.go @@ -7,9 +7,9 @@ import ( "testing" "testing/fstest" - "github.com/kyma-project/test-infra/development/image-builder/sign" - "github.com/kyma-project/test-infra/development/pkg/sets" - "github.com/kyma-project/test-infra/development/pkg/tags" + "github.com/kyma-project/test-infra/pkg/sets" + "github.com/kyma-project/test-infra/pkg/sign" + "github.com/kyma-project/test-infra/pkg/tags" ) func Test_gatherDestinations(t *testing.T) { diff --git a/development/image-detector/README.md b/cmd/image-detector/README.md similarity index 100% rename from development/image-detector/README.md rename to cmd/image-detector/README.md diff --git a/development/image-detector/main.go b/cmd/image-detector/main.go similarity index 97% rename from development/image-detector/main.go rename to cmd/image-detector/main.go index dcfb3c692931..53191b19b97e 100644 --- a/development/image-detector/main.go +++ b/cmd/image-detector/main.go @@ -3,14 +3,14 @@ package main import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/bumper" "io" "log" "os" "sort" - "github.com/kyma-project/test-infra/development/github/pkg/bumper" - "github.com/kyma-project/test-infra/development/pkg/extractimageurls" - "github.com/kyma-project/test-infra/development/pkg/securityconfig" + "github.com/kyma-project/test-infra/pkg/extractimageurls" + "github.com/kyma-project/test-infra/pkg/securityconfig" "github.com/spf13/cobra" "gopkg.in/yaml.v3" "k8s.io/test-infra/prow/config" diff --git a/development/image-syncer/Makefile b/cmd/image-syncer/Makefile similarity index 100% rename from development/image-syncer/Makefile rename to cmd/image-syncer/Makefile diff --git a/development/image-syncer/README.md b/cmd/image-syncer/README.md similarity index 100% rename from development/image-syncer/README.md rename to cmd/image-syncer/README.md diff --git a/development/image-syncer/external-images.yaml b/cmd/image-syncer/external-images.yaml similarity index 100% rename from development/image-syncer/external-images.yaml rename to cmd/image-syncer/external-images.yaml diff --git a/development/image-syncer/main.go b/cmd/image-syncer/main.go similarity index 98% rename from development/image-syncer/main.go rename to cmd/image-syncer/main.go index fe8a8b36e888..d4d4c78e424f 100644 --- a/development/image-syncer/main.go +++ b/cmd/image-syncer/main.go @@ -3,6 +3,7 @@ package main import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/imagesync" "os" "os/signal" "syscall" @@ -11,7 +12,6 @@ import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/go-containerregistry/pkg/v1/remote/transport" - imagesyncer "github.com/kyma-project/test-infra/development/image-syncer/pkg" "github.com/pkg/errors" "github.com/jamiealquiza/envy" @@ -178,7 +178,7 @@ func SyncImage(ctx context.Context, src, dest string, dryRun bool, auth authn.Au } // SyncImages is a main syncing function that takes care of copying images. -func SyncImages(ctx context.Context, cfg *Config, images *imagesyncer.SyncDef, authCfg []byte) error { +func SyncImages(ctx context.Context, cfg *Config, images *imagesync.SyncDef, authCfg []byte) error { auth := &authn.Basic{Username: "_json_key", Password: string(authCfg)} for _, img := range images.Images { target, err := getTarget(img.Source, images.TargetRepoPrefix, img.Tag) diff --git a/development/image-syncer/util.go b/cmd/image-syncer/util.go similarity index 92% rename from development/image-syncer/util.go rename to cmd/image-syncer/util.go index 0f7cdfbdcf17..2b6168da12e8 100644 --- a/development/image-syncer/util.go +++ b/cmd/image-syncer/util.go @@ -2,10 +2,10 @@ package main import ( "fmt" + imagesyncer "github.com/kyma-project/test-infra/pkg/imagesync" "os" "strings" - imagesyncer "github.com/kyma-project/test-infra/development/image-syncer/pkg" "gopkg.in/yaml.v3" ) diff --git a/development/image-url-helper/README.md b/cmd/image-url-helper/README.md similarity index 100% rename from development/image-url-helper/README.md rename to cmd/image-url-helper/README.md diff --git a/development/image-url-helper/cmd/check.go b/cmd/image-url-helper/cmd/check.go similarity index 91% rename from development/image-url-helper/cmd/check.go rename to cmd/image-url-helper/cmd/check.go index a11b153cd8d2..05b2b88a9571 100644 --- a/development/image-url-helper/cmd/check.go +++ b/cmd/image-url-helper/cmd/check.go @@ -2,13 +2,13 @@ package cmd import ( "fmt" + "github.com/kyma-project/test-infra/pkg/image-url-helper/check" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" + "github.com/kyma-project/test-infra/pkg/image-url-helper/list" "os" "path/filepath" "github.com/jamiealquiza/envy" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/check" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/list" "github.com/spf13/cobra" ) diff --git a/development/image-url-helper/cmd/image_url_helper.go b/cmd/image-url-helper/cmd/image_url_helper.go similarity index 100% rename from development/image-url-helper/cmd/image_url_helper.go rename to cmd/image-url-helper/cmd/image_url_helper.go diff --git a/development/image-url-helper/cmd/list.go b/cmd/image-url-helper/cmd/list.go similarity index 92% rename from development/image-url-helper/cmd/list.go rename to cmd/image-url-helper/cmd/list.go index b3265b9ab9e9..9dfe093041b7 100644 --- a/development/image-url-helper/cmd/list.go +++ b/cmd/image-url-helper/cmd/list.go @@ -2,12 +2,12 @@ package cmd import ( "fmt" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" + "github.com/kyma-project/test-infra/pkg/image-url-helper/list" "os" "path/filepath" "github.com/jamiealquiza/envy" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/list" "github.com/spf13/cobra" ) diff --git a/development/image-url-helper/cmd/missing.go b/cmd/image-url-helper/cmd/missing.go similarity index 89% rename from development/image-url-helper/cmd/missing.go rename to cmd/image-url-helper/cmd/missing.go index d0eb0644c68c..0c85d568a562 100644 --- a/development/image-url-helper/cmd/missing.go +++ b/cmd/image-url-helper/cmd/missing.go @@ -1,13 +1,13 @@ package cmd import ( + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" + "github.com/kyma-project/test-infra/pkg/image-url-helper/list" + "github.com/kyma-project/test-infra/pkg/image-url-helper/missing" "os" "path/filepath" "github.com/jamiealquiza/envy" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/list" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/missing" "github.com/spf13/cobra" ) diff --git a/development/image-url-helper/cmd/promote.go b/cmd/image-url-helper/cmd/promote.go similarity index 94% rename from development/image-url-helper/cmd/promote.go rename to cmd/image-url-helper/cmd/promote.go index c9daa977dec4..3b03c3f44d3a 100644 --- a/development/image-url-helper/cmd/promote.go +++ b/cmd/image-url-helper/cmd/promote.go @@ -2,12 +2,12 @@ package cmd import ( "fmt" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" + "github.com/kyma-project/test-infra/pkg/image-url-helper/promote" "os" "path/filepath" "github.com/jamiealquiza/envy" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/promote" "github.com/spf13/cobra" ) diff --git a/development/image-url-helper/excludes.yaml b/cmd/image-url-helper/excludes.yaml similarity index 100% rename from development/image-url-helper/excludes.yaml rename to cmd/image-url-helper/excludes.yaml diff --git a/development/image-url-helper/main.go b/cmd/image-url-helper/main.go similarity index 58% rename from development/image-url-helper/main.go rename to cmd/image-url-helper/main.go index 8f59012fd0ab..34415f6906d2 100644 --- a/development/image-url-helper/main.go +++ b/cmd/image-url-helper/main.go @@ -1,9 +1,8 @@ package main import ( + "github.com/kyma-project/test-infra/cmd/image-url-helper/cmd" "os" - - "github.com/kyma-project/test-infra/development/image-url-helper/cmd" ) func main() { diff --git a/development/jobguard/cmd/jobguard/main.go b/cmd/jobguard/main.go similarity index 84% rename from development/jobguard/cmd/jobguard/main.go rename to cmd/jobguard/main.go index 90b342287ce2..665a17ad4323 100644 --- a/development/jobguard/cmd/jobguard/main.go +++ b/cmd/jobguard/main.go @@ -2,9 +2,9 @@ package main import ( "flag" + "github.com/kyma-project/test-infra/pkg/jobguard/v2" "os" - jobguard "github.com/kyma-project/test-infra/development/jobguard/pkg/jobguard/v2" "github.com/sirupsen/logrus" "k8s.io/test-infra/prow/config/secret" "k8s.io/test-infra/prow/flagutil" @@ -14,7 +14,7 @@ type options struct { debug bool dryRun bool github flagutil.GitHubOptions - jobguardOptions jobguard.Options + jobguardOptions v2.Options expContextRegexp string } @@ -53,8 +53,8 @@ func main() { logrus.WithError(err).Fatal("Could not start GitHub client.") } - o.jobguardOptions.PredicateFunc = jobguard.RegexpPredicate(o.expContextRegexp) - jobGuardClient := jobguard.NewClient(githubStatus, o.jobguardOptions) + o.jobguardOptions.PredicateFunc = v2.RegexpPredicate(o.expContextRegexp) + jobGuardClient := v2.NewClient(githubStatus, o.jobguardOptions) if err := jobGuardClient.Run(); err != nil { logrus.WithError(err).Fatal("JobGuard caught error.") } diff --git a/development/markdown-index/main.go b/cmd/markdown-index/main.go similarity index 98% rename from development/markdown-index/main.go rename to cmd/markdown-index/main.go index 500beba7114e..5cb703eaf8c0 100644 --- a/development/markdown-index/main.go +++ b/cmd/markdown-index/main.go @@ -4,12 +4,12 @@ import ( "bufio" "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/bumper" "log" "os" "path/filepath" "strings" - "github.com/kyma-project/test-infra/development/github/pkg/bumper" "github.com/sirupsen/logrus" flag "github.com/spf13/pflag" "sigs.k8s.io/yaml" diff --git a/development/prowjobparser/Makefile b/cmd/prowjobparser/Makefile similarity index 100% rename from development/prowjobparser/Makefile rename to cmd/prowjobparser/Makefile diff --git a/development/prowjobparser/README.md b/cmd/prowjobparser/README.md similarity index 100% rename from development/prowjobparser/README.md rename to cmd/prowjobparser/README.md diff --git a/development/prowjobparser/main.go b/cmd/prowjobparser/main.go similarity index 100% rename from development/prowjobparser/main.go rename to cmd/prowjobparser/main.go diff --git a/development/checker/unique-jobs-name/main.go b/cmd/unique-jobs-name/main.go similarity index 100% rename from development/checker/unique-jobs-name/main.go rename to cmd/unique-jobs-name/main.go diff --git a/development/image-syncer/before-commit.sh b/development/image-syncer/before-commit.sh deleted file mode 100755 index 9dfeab359dc2..000000000000 --- a/development/image-syncer/before-commit.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -readonly CI_FLAG=ci - -RED='\033[0;31m' -GREEN='\033[0;32m' -INVERTED='\033[7m' -NC='\033[0m' # No Color - -echo -e "${INVERTED}" -echo "USER: ${USER}" -echo "PATH: ${PATH}" -echo "GOPATH: ${GOPATH}" -echo -e "${NC}" - -## -# GO MOD VERIFY -## -go mod verify -ensureResult=$? -if [ ${ensureResult} != 0 ]; then - echo -e "${RED}✗ go mod verify${NC}\\n$ensureResult${NC}" - exit 1 -else - echo -e "${GREEN}√ go mod verify${NC}" -fi - -goFilesToCheck=$(find . -type f -name "*.go" | grep -E -v '\/vendor\/|_*/automock/|_*/testdata/|/pkg\/|_*export_test.go') - -## -# GO BUILD -## -binaries=("image-syncer") -buildEnv="" -if [ "$1" == "$CI_FLAG" ]; then - # build binary statically - buildEnv="env CGO_ENABLED=0" -fi - -for binary in "${binaries[@]}"; do - ${buildEnv} go build -o "${binary}" . - goBuildResult=$? - if [ ${goBuildResult} != 0 ]; then - echo -e "${RED}✗ go build ${binary} ${NC}\\n $goBuildResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go build ${binary} ${NC}" - fi -done - -## -# GO LINT -## -go install golang.org/x/lint/golint@latest -buildLintResult=$? -if [ ${buildLintResult} != 0 ]; then - echo -e "${RED}✗ go install golint${NC}\\n$buildLintResult${NC}" - exit 1 -fi - -golintResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/golint) - -if [ "${#golintResult}" != 0 ]; then - echo -e "${RED}✗ golint\\n$golintResult${NC}" - exit 1 -else - echo -e "${GREEN}√ golint${NC}" -fi - -## -# GO IMPORTS & FMT -## -go install golang.org/x/tools/cmd/goimports -buildGoImportResult=$? -if [ ${buildGoImportResult} != 0 ]; then - echo -e "${RED}✗ go install goimports${NC}\\$buildGoImportResult${NC}" - exit 1 -fi - -goImportsResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/goimports -w -l) - -if [ "${#goImportsResult}" != 0 ]; then - echo -e "${RED}✗ goimports and fmt ${NC}\\n$goImportsResult${NC}" - exit 1 -else - echo -e "${GREEN}√ goimports and fmt ${NC}" -fi - -## -# GO VET -## -packagesToVet=("./...") - -for vPackage in "${packagesToVet[@]}"; do - vetResult=$(go vet "${vPackage}") - if [ "${#vetResult}" != 0 ]; then - echo -e "${RED}✗ go vet ${vPackage} ${NC}\\n$vetResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go vet ${vPackage} ${NC}" - fi -done - -## -# GO TEST -## -echo "? go test" -go test ./... -# Check if tests passed -if [ $? != 0 ]; then - echo -e "${RED}✗ go test\\n${NC}" - exit 1 -else - echo -e "${GREEN}√ go test${NC}" -fi - -go mod tidy diff --git a/development/image-url-helper/Makefile b/development/image-url-helper/Makefile deleted file mode 100644 index 3ec0088d5366..000000000000 --- a/development/image-url-helper/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -.PHONY: validate -validate: - ./before-commit.sh ci - -.PHONY: ci-pr -ci-pr: validate - -.PHONY: ci-main -ci-main: validate - -.PHONY: ci-release -ci-release: validate diff --git a/development/image-url-helper/before-commit.sh b/development/image-url-helper/before-commit.sh deleted file mode 100755 index c9bb4de7777b..000000000000 --- a/development/image-url-helper/before-commit.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -readonly CI_FLAG=ci - -RED='\033[0;31m' -GREEN='\033[0;32m' -INVERTED='\033[7m' -NC='\033[0m' # No Color - -echo -e "${INVERTED}" -echo "USER: ${USER}" -echo "PATH: ${PATH}" -echo "GOPATH: ${GOPATH}" -echo -e "${NC}" - -## -# GO MOD VERIFY -## -go mod verify -ensureResult=$? -if [ ${ensureResult} != 0 ]; then - echo -e "${RED}✗ go mod verify${NC}\\n$ensureResult${NC}" - exit 1 -else - echo -e "${GREEN}√ go mod verify${NC}" -fi - -goFilesToCheck=$(find . -type f -name "*.go" | grep -E -v '\/vendor\/|_*/automock/|_*/testdata/|/pkg\/|_*export_test.go') - -## -# GO BUILD -## -binaries=("image-url-helper") -buildEnv="" -if [ "$1" == "$CI_FLAG" ]; then - # build binary statically - buildEnv="env CGO_ENABLED=0" -fi - -for binary in "${binaries[@]}"; do - ${buildEnv} go build -o "${binary}" . - goBuildResult=$? - if [ ${goBuildResult} != 0 ]; then - echo -e "${RED}✗ go build ${binary} ${NC}\\n $goBuildResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go build ${binary} ${NC}" - fi -done - -## -# GO LINT -## -go install golang.org/x/lint/golint@latest -buildLintResult=$? -if [ ${buildLintResult} != 0 ]; then - echo -e "${RED}✗ go install golint${NC}\\n$buildLintResult${NC}" - exit 1 -fi - -golintResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/golint) - -if [ "${#golintResult}" != 0 ]; then - echo -e "${RED}✗ golint\\n$golintResult${NC}" - exit 1 -else - echo -e "${GREEN}√ golint${NC}" -fi - -## -# GO IMPORTS & FMT -## -go install golang.org/x/tools/cmd/goimports -buildGoImportResult=$? -if [ ${buildGoImportResult} != 0 ]; then - echo -e "${RED}✗ go install goimports${NC}\\n$buildGoImportResult${NC}" - exit 1 -fi - -goImportsResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/goimports -w -l) - -if [ "${#goImportsResult}" != 0 ]; then - echo -e "${RED}✗ goimports and fmt ${NC}\\n$goImportsResult${NC}" - exit 1 -else - echo -e "${GREEN}√ goimports and fmt ${NC}" -fi - -## -# GO VET -## -packagesToVet=("./...") - -for vPackage in "${packagesToVet[@]}"; do - vetResult=$(go vet "${vPackage}") - if [ "${#vetResult}" != 0 ]; then - echo -e "${RED}✗ go vet ${vPackage} ${NC}\\n$vetResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go vet ${vPackage} ${NC}" - fi -done - -## -# GO TEST -## -echo "? go test" -go test ./... -# Check if tests passed -if [ $? != 0 ]; then - echo -e "${RED}✗ go test\\n${NC}" - exit 1 -else - echo -e "${GREEN}√ go test${NC}" -fi - -go mod tidy diff --git a/development/jobguard/README.md b/development/jobguard/README.md deleted file mode 100644 index 90d552b51511..000000000000 --- a/development/jobguard/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# JobGuard - -## Overview - -JobGuard is a simple tool that fetches all statuses for GitHub pull requests and waits for some of them to finish. -The main purpose of JobGuard is to delay running integration jobs that depend on component jobs. This tool acts as a guard for integration tests. - -## Usage - -To run the application, use this command: - -```shell -go run cmd/jobguard/main.go \ - -github-endpoint=http://ghproxy \ - -github-endpoint=https://api.github.com \ - -github-token-path=/path/to/oauth \ - -org=example-org \ - -repo=example-repo \ - -base-ref=13abc \ - -expected-contexts-regexp="(some-context-regexp|another-context)" -``` -## CLI parameters - -JobGuard accepts the following command line parameters: - -|Flag|Required|Description| -|---|---|---| -|`-github-host`| No | GitHub's default host.| -|`-github-endpoint`| No | GitHub API endpoint.| -|`-github-graphql-endpoint`| No | GitHub GraphQL API endpoint.| -|`-github-token-path`|Yes|Path to the file containing the GitHub OAuth secret.| -|`-debug`|No|Enable debug logging.| -|`-dry-run`|No|Run in dry mode.| -|`-expected-contexts-regexp`|Yes|Regular expression with expected contexts.| -|`-fail-on-no-contexts`|No|Fail if regexp does not match any of the GitHub contexts.| -|`-timeout`|No|Time after JobGuard fails.| -|`-poll-interval`|No|Interval in which JobGuard checks contexts on GitHub.| -|`-org`|Yes|GitHub organisation to check.| -|`-repo`|Yes|GitHub repository to check.| -|`-base-ref`|Yes|GitHub base ref to pull statuses from.| diff --git a/development/jobguard/scripts/run.sh b/development/jobguard/scripts/run.sh deleted file mode 100755 index f92a9653ed56..000000000000 --- a/development/jobguard/scripts/run.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -export GO111MODULE=on - -ROOT_PATH=$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)") - -KYMA_PROJECT_DIR=${KYMA_PROJECT_DIR:-"/home/prow/go/src/github.com/kyma-project"} -JOB_NAME_PATTERN=${JOB_NAME_PATTERN:-"(pre-main-kyma-components-.*)|(pre-main-kyma-tests-.*)|(pre-kyma-components-.*)|(pre-kyma-tests-.*)|(pull-.*-build)"} -TIMEOUT=${JOBGUARD_TIMEOUT:-"15m"} - -export TEST_INFRA_SOURCES_DIR="${KYMA_PROJECT_DIR}/test-infra" - -if [ -z "$PULL_PULL_SHA" ]; then - echo "WORKAROUND: skip jobguard execution - not on PR commit" - exit 0 -fi - -args=( - "-github-endpoint=http://ghproxy" - "-github-endpoint=https://api.github.com" - "-github-token-path=/etc/github/token" - "-fail-on-no-contexts=false" - "-timeout=$TIMEOUT" - "-org=$REPO_OWNER" - "-repo=$REPO_NAME" - "-base-ref=$PULL_PULL_SHA" - "-expected-contexts-regexp=$JOB_NAME_PATTERN" -) - -if [ -x "/prow-tools/jobguard" ]; then - /prow-tools/jobguard "${args[@]}" -else - cd "${ROOT_PATH}/cmd/jobguard" || exit 1 - go run main.go "${args[@]}" -fi diff --git a/development/prowjobparser/before-commit.sh b/development/prowjobparser/before-commit.sh deleted file mode 100755 index a5534a33482e..000000000000 --- a/development/prowjobparser/before-commit.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -readonly CI_FLAG=ci - -RED='\033[0;31m' -GREEN='\033[0;32m' -INVERTED='\033[7m' -NC='\033[0m' # No Color - -echo -e "${INVERTED}" -echo "USER: ${USER}" -echo "PATH: ${PATH}" -echo "GOPATH: ${GOPATH}" -echo -e "${NC}" - -## -# GO MOD VERIFY -## -go mod verify -ensureResult=$? -if [ ${ensureResult} != 0 ]; then - echo -e "${RED}✗ go mod verify${NC}\\n$ensureResult${NC}" - exit 1 -else - echo -e "${GREEN}√ go mod verify${NC}" -fi - -goFilesToCheck=$(find . -type f -name "*.go" | grep -E -v '\/vendor\/|_*/automock/|_*/testdata/|/pkg\/|_*export_test.go') - -## -# GO BUILD -## -binaries=("prowjobparser") -buildEnv="" -if [ "$1" == "$CI_FLAG" ]; then - # build binary statically - buildEnv="env CGO_ENABLED=0" -fi - -for binary in "${binaries[@]}"; do - ${buildEnv} go build -o "${binary}" . - goBuildResult=$? - if [ ${goBuildResult} != 0 ]; then - echo -e "${RED}✗ go build ${binary} ${NC}\\n $goBuildResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go build ${binary} ${NC}" - fi -done - -## -# GO LINT -## -go install golang.org/x/lint/golint@latest -buildLintResult=$? -if [ ${buildLintResult} != 0 ]; then - echo -e "${RED}✗ go install golint${NC}\\n$buildLintResult${NC}" - exit 1 -fi - -golintResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/golint) - -if [ "${#golintResult}" != 0 ]; then - echo -e "${RED}✗ golint\\n$golintResult${NC}" - exit 1 -else - echo -e "${GREEN}√ golint${NC}" -fi - -## -# GO IMPORTS & FMT -## -go install golang.org/x/tools/cmd/goimports -buildGoImportResult=$? -if [ ${buildGoImportResult} != 0 ]; then - echo -e "${RED}✗ go install goimports${NC}\\n$buildGoImportResult${NC}" - exit 1 -fi - -goImportsResult=$(echo "${goFilesToCheck}" | xargs -L1 "${GOPATH}"/bin/goimports -w -l) - -if [ "${#goImportsResult}" != 0 ]; then - echo -e "${RED}✗ goimports and fmt ${NC}\\n$goImportsResult${NC}" - exit 1 -else - echo -e "${GREEN}√ goimports and fmt ${NC}" -fi - -## -# GO VET -## -packagesToVet=("./...") - -for vPackage in "${packagesToVet[@]}"; do - vetResult=$(go vet "${vPackage}") - if [ "${#vetResult}" != 0 ]; then - echo -e "${RED}✗ go vet ${vPackage} ${NC}\\n$vetResult${NC}" - exit 1 - else - echo -e "${GREEN}√ go vet ${vPackage} ${NC}" - fi -done - -## -# GO TEST -## -echo "? go test" -go test ./... -# Check if tests passed -if [ $? != 0 ]; then - echo -e "${RED}✗ go test\\n${NC}" - exit 1 -else - echo -e "${GREEN}√ go test${NC}" -fi - -go mod tidy diff --git a/development/tools/cmd/certbotauthenticator/main.go b/development/tools/cmd/certbotauthenticator/main.go index a2ebbc5bbabc..a157f3f985af 100644 --- a/development/tools/cmd/certbotauthenticator/main.go +++ b/development/tools/cmd/certbotauthenticator/main.go @@ -3,11 +3,11 @@ package main import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/dnsclient" "os" "strings" "time" - "github.com/kyma-project/test-infra/development/gcp/pkg/dnsclient" "github.com/sirupsen/logrus" flag "github.com/spf13/pflag" ) diff --git a/development/tools/cmd/rendertemplates/main.go b/development/tools/cmd/rendertemplates/main.go index cc993c8d0c60..882a9509d4cb 100644 --- a/development/tools/cmd/rendertemplates/main.go +++ b/development/tools/cmd/rendertemplates/main.go @@ -5,6 +5,7 @@ import ( "encoding/gob" "flag" "fmt" + "github.com/kyma-project/test-infra/pkg/github/client" "io/fs" "log" "os" @@ -17,7 +18,6 @@ import ( "github.com/Masterminds/sprig" "github.com/google/go-github/v48/github" "github.com/imdario/mergo" - "github.com/kyma-project/test-infra/development/github/pkg/client" rt "github.com/kyma-project/test-infra/development/tools/pkg/rendertemplates" "golang.org/x/net/context" "gopkg.in/yaml.v3" diff --git a/development/tools/cmd/usersmapchecker/main.go b/development/tools/cmd/usersmapchecker/main.go index 21cc893471af..ba476abd10ed 100644 --- a/development/tools/cmd/usersmapchecker/main.go +++ b/development/tools/cmd/usersmapchecker/main.go @@ -3,13 +3,12 @@ package main import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/client" + "github.com/kyma-project/test-infra/pkg/prow" + "github.com/kyma-project/test-infra/pkg/types" "os" log "github.com/sirupsen/logrus" - - "github.com/kyma-project/test-infra/development/github/pkg/client" - "github.com/kyma-project/test-infra/development/prow" - "github.com/kyma-project/test-infra/development/types" ) // Example fields in gcp logging. diff --git a/development/tools/pkg/pjtester/pjtester.go b/development/tools/pkg/pjtester/pjtester.go index bf40922606a0..71875fd12823 100644 --- a/development/tools/pkg/pjtester/pjtester.go +++ b/development/tools/pkg/pjtester/pjtester.go @@ -13,6 +13,7 @@ import ( "bytes" "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/git" "os" "path" "strconv" @@ -21,7 +22,6 @@ import ( "k8s.io/test-infra/prow/pod-utils/downwardapi" "github.com/go-playground/validator/v10" - "github.com/kyma-project/test-infra/development/github/pkg/git" "github.com/kyma-project/test-infra/development/tools/pkg/prtagbuilder" "github.com/sirupsen/logrus" "github.com/tidwall/gjson" diff --git a/development/tools/pkg/pjtester/pjtester_test.go b/development/tools/pkg/pjtester/pjtester_test.go index 4fa6c7565ea4..c1ab2e7f556c 100644 --- a/development/tools/pkg/pjtester/pjtester_test.go +++ b/development/tools/pkg/pjtester/pjtester_test.go @@ -3,13 +3,13 @@ package pjtester import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/git" "net/http" "os" "strconv" gogithub "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/github/pkg/git" prtagbuildermock "github.com/kyma-project/test-infra/development/tools/pkg/prtagbuilder/mocks" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/docs/index.md b/docs/index.md index b8f6f3a7950a..c7b858d7e1a9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,30 +1,48 @@ [Changelog Generator](/changelog-generator/README.md) - This project is a Docker image that is used to generate a changelog in the `kyma` repository. It uses GitHub API to get pull requests with specified labels. -[Artifact Registry creator tool (GCP, Terraform)](/configs/terraform/modules/artifact-registry/README.md) - This is the GCP image registry creator tool. Use the registry to publish modules that should be accessible to internal SAP teams. +[Artifact Registry creator tool (GCP, Terraform)](/configs/terraform/modules/artifact-registry/README.md) - This is the +GCP image registry creator tool. Use the registry to publish modules that should be accessible to internal SAP teams. -[Create Custom Image](/development/custom-image/README.md) - The purpose of this document is to define how to create a new Google Compute Engine [custom image](https://cloud.google.com/compute/docs/images) with required dependencies. You can use the new image to provision virtual machine (VM) instances with all dependencies already installed. +[Create Custom Image](/experimental/custom-image/README.md) - The purpose of this document is to define how to create a +new Google Compute Engine [custom image](https://cloud.google.com/compute/docs/images) with required dependencies. You +can use the new image to provision virtual machine (VM) instances with all dependencies already installed. -[gardener-rotate](/development/gardener-rotate/README.md) - The gardener-rotate tool allows you to generate a new access token for the Gardener service accounts and update kubeconfig stored in the Secret Manager. +[gardener-rotate](/cmd/gardener-rotate/README.md) - The gardener-rotate tool allows you to generate a new access token +for the Gardener service accounts and update kubeconfig stored in the Secret Manager. -[Rotate Gardener service account secrets using Cloud Run](/development/gcp/cloud-run/gardener-sa-rotate/README.md) - The Cloud Run application creates a new key for a GCP service account, updates the required secret data, and deletes old versions of a key. The function is triggered by a Pub/Sub message sent by a secret stored in Secret Manager. +[Rotate Gardener service account secrets using Cloud Run](/cmd/cloud-run/gardener-sa-rotate/README.md) - The Cloud Run +application creates a new key for a GCP service account, updates the required secret data, and deletes old versions of a +key. The function is triggered by a Pub/Sub message sent by a secret stored in Secret Manager. -[Rotate KMS secrets using Cloud Run](/development/gcp/cloud-run/kms-rotate/README.md) - The Cloud Run application decrypts and encrypts files in a bucket with the latest version of a KMS key, and deletes old versions of a key. The function is triggered by a HTTP POST request sent by a Cloud Scheduler. +[Rotate KMS secrets using Cloud Run](/cmd/cloud-run/kms-rotate/README.md) - The Cloud Run application decrypts and +encrypts files in a bucket with the latest version of a KMS key, and deletes old versions of a key. The function is +triggered by a HTTP POST request sent by a Cloud Scheduler. -[image-builder](/development/image-builder/README.md) - This tool serves as an intelligent wrapper for `kaniko-project/executor`. It reduces the complexity of building Docker images and removes the need of using Docker in Docker when building images in K8s infrastructure. +[image-builder](/cmd/image-builder/README.md) - This tool serves as an intelligent wrapper +for `kaniko-project/executor`. It reduces the complexity of building Docker images and removes the need of using Docker +in Docker when building images in K8s infrastructure. -[Image Detector](/development/image-detector/README.md) - Image Detector is a tool for updating the security scanner config with the list of images in the Prow cluster. To achieve that, it receives paths to files used to deploy Prow or its components. +[Image Detector](/cmd/image-detector/README.md) - Image Detector is a tool for updating the security scanner config with +the list of images in the Prow cluster. To achieve that, it receives paths to files used to deploy Prow or its +components. -[image-syncer](/development/image-syncer/README.md) - image-syncer is used to copy container images from one registry to another. +[image-syncer](/cmd/image-syncer/README.md) - image-syncer is used to copy container images from one registry to +another. -[Image URL Helper](/development/image-url-helper/README.md) - Image URL Helper is a tool that provides the following subcommands: +[Image URL Helper](/cmd/image-url-helper/README.md) - Image URL Helper is a tool that provides the following +subcommands: -[JobGuard ](/development/jobguard/README.md) - JobGuard is a simple tool that fetches all statuses for GitHub pull requests and waits for some of them to finish. +[prowjobparser](/cmd/prowjobparser/README.md) - The prowjobparser is a helper tool which parses all Prow Jobs under the +provided path, matches them against the provided label filters, and prints matching Prow Job names to the standard +output. -[prowjobparser](/development/prowjobparser/README.md) - The prowjobparser is a helper tool which parses all Prow Jobs under the provided path, matches them against the provided label filters, and prints matching Prow Job names to the standard output. +[Rotate service account secrets](/cmd/cloud-run/rotate-service-account/README.md) - RotateServiceAccount creates a new +key for a GCP service account and updates the required secret data. It's triggered by a Pub/Sub message sent by a secret +stored in Secret Manager. It runs as a cloud run container. -[Rotate service account secrets](/development/secrets-rotator/cloud-run/rotate-service-account/README.md) - RotateServiceAccount creates a new key for a GCP service account and updates the required secret data. It's triggered by a Pub/Sub message sent by a secret stored in Secret Manager. It runs as a cloud run container. - -[Cleanup of service account secrets](/development/secrets-rotator/cloud-run/service-account-keys-cleaner/README.md) - The Cloud Run service deletes old keys for a GCP service account and updates the required secret data for all service account secrets stored in the Secret Manager. The service is triggered by a Cloud Scheduler job. +[Cleanup of service account secrets](/cmd/cloud-run/service-account-keys-cleaner/README.md) - The Cloud Run service +deletes old keys for a GCP service account and updates the required secret data for all service account secrets stored +in the Secret Manager. The service is triggered by a Cloud Scheduler job. [Tools](/development/tools/README.md) - This project contains Go applications for the `test-infra` repository. @@ -50,8 +68,6 @@ [IP cleaner](/development/tools/cmd/ipcleaner/README.md) - This command finds and removes orphaned IP addresses created by jobs in the Google Cloud Platform (GCP) project. -[Job Guard](/development/tools/cmd/jobguard/README.md) - Job Guard was moved [here](/development/jobguard). - [oomfinder](/development/tools/cmd/oomfinder/README.md) - oomfinder is a small tool designed to run in a Pod on each k8s worker node as a privileged container. It will check if Docker or Containerd is used and attach to its socket to listen for oom events. If an oom event occurs, oomfinder will print a message to `os stdout` with the following details: [Prow Job tester](/development/tools/cmd/pjtester/README.md) - Prow Job tester is a tool for testing changes to the Prow Jobs' definitions and code running in Prow Jobs. It uses the production Prow instance to run chosen Prow Jobs with changes from pull requests (PRs) without going through multiple cycles of new PRs, reviews, and merges. The whole development can be done within one cycle. @@ -130,8 +146,6 @@ [Probot Stale](/prow/cluster/resources/probot-stale/README.md) - This chart contains the `probot-stale` configuration. -[Images](/prow/images/README.md) - > DEPRECATED: Use the [`images`](../../images) directory instead. - [Bootstrap Docker Image](/prow/images/bootstrap/README.md) - This folder contains the Bootstrap image for Prow infrastructure. Use it for a root image for other Prow images and for generic builds. [Buildpack Golang Docker Image](/prow/images/buildpack-golang/README.md) - This folder contains the Buildpack Golang image that is based on the Bootstrap image. Use it to build Golang components. diff --git a/development/custom-image/README.md b/experimental/custom-image/README.md similarity index 76% rename from development/custom-image/README.md rename to experimental/custom-image/README.md index c189af468c77..c5893340376a 100644 --- a/development/custom-image/README.md +++ b/experimental/custom-image/README.md @@ -13,12 +13,15 @@ To run the script, use the `create-custom-image.sh` command. To set the image cr The script performs the following steps: 1. Provision a new VM under the VM instance in the Google Compute Engine. - The new VM instance is named according to the **kyma-deps-image-vm-{RANDOM_ID}** pattern and created in a random **zone** in Europe. + The new VM instance is named according to the **kyma-deps-image-vm-{RANDOM_ID}** pattern and created in a random * + *zone** in Europe. -2. Move the [`install-deps-debian.sh`](./install-deps-debian.sh) script to the newly provisioned VM and execute it. +2. Move the [`install-deps-debian.sh`](install-deps-debian.sh) script to the newly provisioned VM and execute it. -3. Shut down the new VM after installing all the required dependencies specified in [`install-deps-debian.sh`](./install-deps-debian.sh). +3. Shut down the new VM after installing all the required dependencies specified + in [`install-deps-debian.sh`](install-deps-debian.sh). -4. Create a new **image** using `--source-disk` as **kyma-deps-image-vm-{RANDOM_ID}** under the **custom-images** image family in the Google Compute Engine. This creates a new **kyma-deps-image-{Current_Date}** image. +4. Create a new **image** using `--source-disk` as **kyma-deps-image-vm-{RANDOM_ID}** under the **custom-images** image + family in the Google Compute Engine. This creates a new **kyma-deps-image-{Current_Date}** image. 5. Delete the provisioned **kyma-deps-image-vm-{RANDOM_ID}** VM. diff --git a/development/custom-image/create-custom-image.sh b/experimental/custom-image/create-custom-image.sh similarity index 100% rename from development/custom-image/create-custom-image.sh rename to experimental/custom-image/create-custom-image.sh diff --git a/development/custom-image/install-deps-debian.sh b/experimental/custom-image/install-deps-debian.sh similarity index 100% rename from development/custom-image/install-deps-debian.sh rename to experimental/custom-image/install-deps-debian.sh diff --git a/development/custom-image/machine-id-clean-up.sh b/experimental/custom-image/machine-id-clean-up.sh similarity index 100% rename from development/custom-image/machine-id-clean-up.sh rename to experimental/custom-image/machine-id-clean-up.sh diff --git a/development/custom-image/resources/dbus-1_system-local.conf b/experimental/custom-image/resources/dbus-1_system-local.conf similarity index 100% rename from development/custom-image/resources/dbus-1_system-local.conf rename to experimental/custom-image/resources/dbus-1_system-local.conf diff --git a/development/cloudevents/client/client.go b/pkg/cloudevents/client/client.go similarity index 98% rename from development/cloudevents/client/client.go rename to pkg/cloudevents/client/client.go index 825817118db6..6c2d43cee4d8 100644 --- a/development/cloudevents/client/client.go +++ b/pkg/cloudevents/client/client.go @@ -5,7 +5,7 @@ import ( cloudevents "github.com/cloudevents/sdk-go/v2" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/logging" + "github.com/kyma-project/test-infra/pkg/logging" "golang.org/x/net/context" ) diff --git a/development/pkg/extractimageurls/kubernetes.go b/pkg/extractimageurls/kubernetes.go similarity index 100% rename from development/pkg/extractimageurls/kubernetes.go rename to pkg/extractimageurls/kubernetes.go diff --git a/development/pkg/extractimageurls/kubernetes_test.go b/pkg/extractimageurls/kubernetes_test.go similarity index 100% rename from development/pkg/extractimageurls/kubernetes_test.go rename to pkg/extractimageurls/kubernetes_test.go diff --git a/development/pkg/extractimageurls/prowjob.go b/pkg/extractimageurls/prowjob.go similarity index 98% rename from development/pkg/extractimageurls/prowjob.go rename to pkg/extractimageurls/prowjob.go index 2b4a8901f72e..fc81db33795c 100644 --- a/development/pkg/extractimageurls/prowjob.go +++ b/pkg/extractimageurls/prowjob.go @@ -3,9 +3,9 @@ package extractimageurls import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/github/client" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/github/pkg/client" "k8s.io/test-infra/prow/config" "sigs.k8s.io/yaml" ) diff --git a/development/pkg/extractimageurls/prowjob_test.go b/pkg/extractimageurls/prowjob_test.go similarity index 100% rename from development/pkg/extractimageurls/prowjob_test.go rename to pkg/extractimageurls/prowjob_test.go diff --git a/development/pkg/extractimageurls/terraform.go b/pkg/extractimageurls/terraform.go similarity index 100% rename from development/pkg/extractimageurls/terraform.go rename to pkg/extractimageurls/terraform.go diff --git a/development/pkg/extractimageurls/terraform_test.go b/pkg/extractimageurls/terraform_test.go similarity index 100% rename from development/pkg/extractimageurls/terraform_test.go rename to pkg/extractimageurls/terraform_test.go diff --git a/development/pkg/extractimageurls/utils.go b/pkg/extractimageurls/utils.go similarity index 100% rename from development/pkg/extractimageurls/utils.go rename to pkg/extractimageurls/utils.go diff --git a/development/pkg/extractimageurls/utils_test.go b/pkg/extractimageurls/utils_test.go similarity index 100% rename from development/pkg/extractimageurls/utils_test.go rename to pkg/extractimageurls/utils_test.go diff --git a/development/gcp/pkg/cloudfunctions/logging.go b/pkg/gcp/cloudfunctions/logging.go similarity index 100% rename from development/gcp/pkg/cloudfunctions/logging.go rename to pkg/gcp/cloudfunctions/logging.go diff --git a/development/gcp/pkg/dnsclient/api_wrapper.go b/pkg/gcp/dnsclient/api_wrapper.go similarity index 100% rename from development/gcp/pkg/dnsclient/api_wrapper.go rename to pkg/gcp/dnsclient/api_wrapper.go diff --git a/development/gcp/pkg/dnsclient/client.go b/pkg/gcp/dnsclient/client.go similarity index 100% rename from development/gcp/pkg/dnsclient/client.go rename to pkg/gcp/dnsclient/client.go diff --git a/development/gcp/pkg/firestore/client.go b/pkg/gcp/firestore/client.go similarity index 97% rename from development/gcp/pkg/firestore/client.go rename to pkg/gcp/firestore/client.go index 6a0dc930695a..29cb46a9c139 100644 --- a/development/gcp/pkg/firestore/client.go +++ b/pkg/gcp/firestore/client.go @@ -3,9 +3,9 @@ package firestore import ( "context" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" "cloud.google.com/go/firestore" - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" ) const ( diff --git a/development/gcp/pkg/firestore/types.go b/pkg/gcp/firestore/types.go similarity index 100% rename from development/gcp/pkg/firestore/types.go rename to pkg/gcp/firestore/types.go diff --git a/development/gcp/pkg/http/http.go b/pkg/gcp/http/http.go similarity index 87% rename from development/gcp/pkg/http/http.go rename to pkg/gcp/http/http.go index 80f75b9efdea..abf0c725d331 100644 --- a/development/gcp/pkg/http/http.go +++ b/pkg/gcp/http/http.go @@ -2,9 +2,8 @@ package http import ( "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" "net/http" - - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" ) // WriteHttpErrorResponse format error message, log it with error severity using passed logger diff --git a/development/gcp/pkg/iam/serviceaccount.go b/pkg/gcp/iam/serviceaccount.go similarity index 100% rename from development/gcp/pkg/iam/serviceaccount.go rename to pkg/gcp/iam/serviceaccount.go diff --git a/development/gcp/pkg/logging/client.go b/pkg/gcp/logging/client.go similarity index 100% rename from development/gcp/pkg/logging/client.go rename to pkg/gcp/logging/client.go diff --git a/development/gcp/pkg/logging/types.go b/pkg/gcp/logging/types.go similarity index 100% rename from development/gcp/pkg/logging/types.go rename to pkg/gcp/logging/types.go diff --git a/development/gcp/pkg/pubsub/client.go b/pkg/gcp/pubsub/client.go similarity index 98% rename from development/gcp/pkg/pubsub/client.go rename to pkg/gcp/pubsub/client.go index cc53b6d8e97a..e3a46dd3ed1d 100644 --- a/development/gcp/pkg/pubsub/client.go +++ b/pkg/gcp/pubsub/client.go @@ -10,7 +10,7 @@ import ( "cloud.google.com/go/pubsub" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/logging" + "github.com/kyma-project/test-infra/pkg/logging" "google.golang.org/api/option" ) diff --git a/development/gcp/pkg/pubsub/types.go b/pkg/gcp/pubsub/types.go similarity index 98% rename from development/gcp/pkg/pubsub/types.go rename to pkg/gcp/pubsub/types.go index 42c5f834b274..0811b69c0876 100644 --- a/development/gcp/pkg/pubsub/types.go +++ b/pkg/gcp/pubsub/types.go @@ -2,7 +2,7 @@ package pubsub import ( "cloud.google.com/go/pubsub" - "github.com/kyma-project/test-infra/development/logging" + "github.com/kyma-project/test-infra/pkg/logging" "google.golang.org/api/option" prowapi "k8s.io/test-infra/prow/apis/prowjobs/v1" ) diff --git a/development/gcp/pkg/secretmanager/service.go b/pkg/gcp/secretmanager/service.go similarity index 100% rename from development/gcp/pkg/secretmanager/service.go rename to pkg/gcp/secretmanager/service.go diff --git a/development/gcp/pkg/types/types.go b/pkg/gcp/types/types.go similarity index 100% rename from development/gcp/pkg/types/types.go rename to pkg/gcp/types/types.go diff --git a/development/gcp/workflows/secrets-leak-detector.yaml b/pkg/gcp/workflows/secrets-leak-detector.yaml similarity index 100% rename from development/gcp/workflows/secrets-leak-detector.yaml rename to pkg/gcp/workflows/secrets-leak-detector.yaml diff --git a/development/github/agent.go b/pkg/github/agent.go similarity index 90% rename from development/github/agent.go rename to pkg/github/agent.go index 759a82455f72..9a8b56b4507d 100644 --- a/development/github/agent.go +++ b/pkg/github/agent.go @@ -2,10 +2,10 @@ package github import ( "fmt" + "github.com/kyma-project/test-infra/pkg/github/client/v2" + "github.com/kyma-project/test-infra/pkg/github/repoowners" - "github.com/kyma-project/test-infra/development/github/pkg/client/v2" - "github.com/kyma-project/test-infra/development/github/pkg/repoowners" - "github.com/kyma-project/test-infra/development/logging" + "github.com/kyma-project/test-infra/pkg/logging" "k8s.io/test-infra/prow/git/v2" ) diff --git a/development/github/pkg/bumper/bumper.go b/pkg/github/bumper/bumper.go similarity index 100% rename from development/github/pkg/bumper/bumper.go rename to pkg/github/bumper/bumper.go diff --git a/development/github/pkg/bumper/utils.go b/pkg/github/bumper/utils.go similarity index 100% rename from development/github/pkg/bumper/utils.go rename to pkg/github/bumper/utils.go diff --git a/development/github/pkg/bumper/utils_test.go b/pkg/github/bumper/utils_test.go similarity index 100% rename from development/github/pkg/bumper/utils_test.go rename to pkg/github/bumper/utils_test.go diff --git a/development/github/pkg/client/client.go b/pkg/github/client/client.go similarity index 98% rename from development/github/pkg/client/client.go rename to pkg/github/client/client.go index 27b2ec069fce..63bab0f9293e 100644 --- a/development/github/pkg/client/client.go +++ b/pkg/github/client/client.go @@ -7,13 +7,13 @@ import ( "crypto/sha256" "flag" "fmt" + "github.com/kyma-project/test-infra/pkg/gcp/cloudfunctions" + "github.com/kyma-project/test-infra/pkg/types" "hash" "net/http" "sync" "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/gcp/pkg/cloudfunctions" - "github.com/kyma-project/test-infra/development/types" "golang.org/x/oauth2" "gopkg.in/yaml.v3" "k8s.io/test-infra/prow/config/secret" diff --git a/development/github/pkg/client/types.go b/pkg/github/client/types.go similarity index 100% rename from development/github/pkg/client/types.go rename to pkg/github/client/types.go diff --git a/development/github/pkg/client/v2/client.go b/pkg/github/client/v2/client.go similarity index 100% rename from development/github/pkg/client/v2/client.go rename to pkg/github/client/v2/client.go diff --git a/development/github/pkg/git/client.go b/pkg/github/git/client.go similarity index 100% rename from development/github/pkg/git/client.go rename to pkg/github/git/client.go diff --git a/development/github/pkg/repoowners/client.go b/pkg/github/repoowners/client.go similarity index 97% rename from development/github/pkg/repoowners/client.go rename to pkg/github/repoowners/client.go index 6d2a555587c9..61ef7050a80d 100644 --- a/development/github/pkg/repoowners/client.go +++ b/pkg/github/repoowners/client.go @@ -3,9 +3,9 @@ package repoowners import ( "flag" "fmt" + "github.com/kyma-project/test-infra/pkg/github/client/v2" - "github.com/kyma-project/test-infra/development/github/pkg/client/v2" - "github.com/kyma-project/test-infra/development/logging" + "github.com/kyma-project/test-infra/pkg/logging" "k8s.io/test-infra/prow/config" configflagutil "k8s.io/test-infra/prow/flagutil/config" pluginsflagutil "k8s.io/test-infra/prow/flagutil/plugins" diff --git a/development/github/pkg/repoowners/owners.go b/pkg/github/repoowners/owners.go similarity index 98% rename from development/github/pkg/repoowners/owners.go rename to pkg/github/repoowners/owners.go index 33dc9eed4ec1..9e9b7b93764c 100644 --- a/development/github/pkg/repoowners/owners.go +++ b/pkg/github/repoowners/owners.go @@ -2,13 +2,13 @@ package repoowners import ( "fmt" + toolstypes "github.com/kyma-project/test-infra/pkg/types" "os" "path/filepath" "k8s.io/apimachinery/pkg/util/sets" - toolstypes "github.com/kyma-project/test-infra/development/types" "k8s.io/test-infra/prow/github" k8sowners "k8s.io/test-infra/prow/repoowners" ) diff --git a/development/github/pkg/templates/secretsleak.go b/pkg/github/templates/secretsleak.go similarity index 91% rename from development/github/pkg/templates/secretsleak.go rename to pkg/github/templates/secretsleak.go index 196fa15ee2ba..5cf43bdadb5b 100644 --- a/development/github/pkg/templates/secretsleak.go +++ b/pkg/github/templates/secretsleak.go @@ -2,10 +2,9 @@ package templates import ( "bytes" + "github.com/kyma-project/test-infra/pkg/gcp/pubsub" + "github.com/kyma-project/test-infra/pkg/types" "text/template" - - "github.com/kyma-project/test-infra/development/gcp/pkg/pubsub" - "github.com/kyma-project/test-infra/development/types" ) type IssueData interface { diff --git a/development/github/pkg/types/types.go b/pkg/github/types/types.go similarity index 94% rename from development/github/pkg/types/types.go rename to pkg/github/types/types.go index 856642e8f89a..9d4cbc118249 100644 --- a/development/github/pkg/types/types.go +++ b/pkg/github/types/types.go @@ -2,7 +2,7 @@ package types import ( "github.com/google/go-github/v48/github" - "github.com/kyma-project/test-infra/development/types" + "github.com/kyma-project/test-infra/pkg/types" ) // SearchIssuesResult holds information if issue was found and list found GitHub Issues. diff --git a/development/image-url-helper/pkg/check/filecheck.go b/pkg/image-url-helper/check/filecheck.go similarity index 100% rename from development/image-url-helper/pkg/check/filecheck.go rename to pkg/image-url-helper/check/filecheck.go diff --git a/development/image-url-helper/pkg/check/filecheck_test.go b/pkg/image-url-helper/check/filecheck_test.go similarity index 100% rename from development/image-url-helper/pkg/check/filecheck_test.go rename to pkg/image-url-helper/check/filecheck_test.go diff --git a/development/image-url-helper/pkg/common/common.go b/pkg/image-url-helper/common/common.go similarity index 100% rename from development/image-url-helper/pkg/common/common.go rename to pkg/image-url-helper/common/common.go diff --git a/development/image-url-helper/pkg/common/images.go b/pkg/image-url-helper/common/images.go similarity index 100% rename from development/image-url-helper/pkg/common/images.go rename to pkg/image-url-helper/common/images.go diff --git a/development/image-url-helper/pkg/common/outputlist.go b/pkg/image-url-helper/common/outputlist.go similarity index 100% rename from development/image-url-helper/pkg/common/outputlist.go rename to pkg/image-url-helper/common/outputlist.go diff --git a/development/image-url-helper/pkg/common/valuefile.go b/pkg/image-url-helper/common/valuefile.go similarity index 100% rename from development/image-url-helper/pkg/common/valuefile.go rename to pkg/image-url-helper/common/valuefile.go diff --git a/development/image-url-helper/pkg/list/imagelister.go b/pkg/image-url-helper/list/imagelister.go similarity index 92% rename from development/image-url-helper/pkg/list/imagelister.go rename to pkg/image-url-helper/list/imagelister.go index d013d8d4f496..5a2e416830c6 100644 --- a/development/image-url-helper/pkg/list/imagelister.go +++ b/pkg/image-url-helper/list/imagelister.go @@ -1,11 +1,11 @@ package list import ( + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" "os" "path/filepath" "strings" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" "gopkg.in/yaml.v3" ) diff --git a/development/image-url-helper/pkg/missing/missing.go b/pkg/image-url-helper/missing/missing.go similarity index 92% rename from development/image-url-helper/pkg/missing/missing.go rename to pkg/image-url-helper/missing/missing.go index 0024edd1fef2..0df2292f69f2 100644 --- a/development/image-url-helper/pkg/missing/missing.go +++ b/pkg/image-url-helper/missing/missing.go @@ -3,7 +3,7 @@ package missing import ( "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" ) // CheckForMissingImages checks if images exist and returns ComponentImageMap of nonexistent images diff --git a/development/image-url-helper/pkg/missing/missing_test.go b/pkg/image-url-helper/missing/missing_test.go similarity index 95% rename from development/image-url-helper/pkg/missing/missing_test.go rename to pkg/image-url-helper/missing/missing_test.go index 63b440ef93e4..82b9b7be578e 100644 --- a/development/image-url-helper/pkg/missing/missing_test.go +++ b/pkg/image-url-helper/missing/missing_test.go @@ -1,9 +1,9 @@ package missing import ( + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" "testing" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" "github.com/stretchr/testify/assert" ) diff --git a/development/image-url-helper/pkg/promote/externalsyncer.go b/pkg/image-url-helper/promote/externalsyncer.go similarity index 90% rename from development/image-url-helper/pkg/promote/externalsyncer.go rename to pkg/image-url-helper/promote/externalsyncer.go index ae15e4a49fe8..14af93ebbed6 100644 --- a/development/image-url-helper/pkg/promote/externalsyncer.go +++ b/pkg/image-url-helper/promote/externalsyncer.go @@ -3,10 +3,10 @@ package promote import ( "bytes" "fmt" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" + imagesyncer "github.com/kyma-project/test-infra/pkg/imagesync" "sort" - imagesyncer "github.com/kyma-project/test-infra/development/image-syncer/pkg" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" "gopkg.in/yaml.v3" ) diff --git a/development/image-url-helper/pkg/promote/promote.go b/pkg/image-url-helper/promote/promote.go similarity index 99% rename from development/image-url-helper/pkg/promote/promote.go rename to pkg/image-url-helper/promote/promote.go index b363aa2c6cea..2b561d389a74 100644 --- a/development/image-url-helper/pkg/promote/promote.go +++ b/pkg/image-url-helper/promote/promote.go @@ -4,11 +4,11 @@ import ( "bufio" "errors" "fmt" + "github.com/kyma-project/test-infra/pkg/image-url-helper/common" "os" "path/filepath" "strings" - "github.com/kyma-project/test-infra/development/image-url-helper/pkg/common" "gopkg.in/yaml.v3" ) diff --git a/development/image-syncer/pkg/common.go b/pkg/imagesync/common.go similarity index 94% rename from development/image-syncer/pkg/common.go rename to pkg/imagesync/common.go index 75966b82d3c3..f7bb6a35b25d 100644 --- a/development/image-syncer/pkg/common.go +++ b/pkg/imagesync/common.go @@ -1,4 +1,4 @@ -package pkg +package imagesync // SyncDef stores synchronisation definition type SyncDef struct { diff --git a/development/jobguard/pkg/jobguard/filter.go b/pkg/jobguard/filter.go similarity index 100% rename from development/jobguard/pkg/jobguard/filter.go rename to pkg/jobguard/filter.go diff --git a/development/jobguard/pkg/jobguard/httpclient.go b/pkg/jobguard/httpclient.go similarity index 100% rename from development/jobguard/pkg/jobguard/httpclient.go rename to pkg/jobguard/httpclient.go diff --git a/development/jobguard/pkg/jobguard/status.go b/pkg/jobguard/status.go similarity index 100% rename from development/jobguard/pkg/jobguard/status.go rename to pkg/jobguard/status.go diff --git a/development/jobguard/pkg/jobguard/v2/jobguard.go b/pkg/jobguard/v2/jobguard.go similarity index 100% rename from development/jobguard/pkg/jobguard/v2/jobguard.go rename to pkg/jobguard/v2/jobguard.go diff --git a/development/jobguard/pkg/jobguard/v2/status.go b/pkg/jobguard/v2/status.go similarity index 100% rename from development/jobguard/pkg/jobguard/v2/status.go rename to pkg/jobguard/v2/status.go diff --git a/development/jobguard/pkg/jobguard/waiter.go b/pkg/jobguard/waiter.go similarity index 100% rename from development/jobguard/pkg/jobguard/waiter.go rename to pkg/jobguard/waiter.go diff --git a/development/logging/console.go b/pkg/logging/console.go similarity index 100% rename from development/logging/console.go rename to pkg/logging/console.go diff --git a/development/logging/types.go b/pkg/logging/types.go similarity index 100% rename from development/logging/types.go rename to pkg/logging/types.go diff --git a/development/opagatekeeper/constraints.go b/pkg/opagatekeeper/constraints.go similarity index 100% rename from development/opagatekeeper/constraints.go rename to pkg/opagatekeeper/constraints.go diff --git a/development/prow/externalplugin/externalplugin.go b/pkg/prow/externalplugin/externalplugin.go similarity index 99% rename from development/prow/externalplugin/externalplugin.go rename to pkg/prow/externalplugin/externalplugin.go index 469224705c7b..8710071b3ba8 100644 --- a/development/prow/externalplugin/externalplugin.go +++ b/pkg/prow/externalplugin/externalplugin.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - "github.com/kyma-project/test-infra/development/github/pkg/client/v2" + "github.com/kyma-project/test-infra/pkg/github/client/v2" "github.com/sirupsen/logrus" "go.uber.org/zap" "go.uber.org/zap/zapcore" diff --git a/development/prow/pjconfigtests/pjconfigtests_suite_test.go b/pkg/prow/pjconfigtests/pjconfigtests_suite_test.go similarity index 95% rename from development/prow/pjconfigtests/pjconfigtests_suite_test.go rename to pkg/prow/pjconfigtests/pjconfigtests_suite_test.go index 25d58a7eb951..b79a7ed497c5 100644 --- a/development/prow/pjconfigtests/pjconfigtests_suite_test.go +++ b/pkg/prow/pjconfigtests/pjconfigtests_suite_test.go @@ -1,11 +1,11 @@ package pjconfigtests_test import ( + kprow "github.com/kyma-project/test-infra/pkg/prow" "os" "path" "testing" - kprow "github.com/kyma-project/test-infra/development/prow" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "k8s.io/test-infra/prow/config" diff --git a/development/prow/pjconfigtests/pjconfigtests_test.go b/pkg/prow/pjconfigtests/pjconfigtests_test.go similarity index 96% rename from development/prow/pjconfigtests/pjconfigtests_test.go rename to pkg/prow/pjconfigtests/pjconfigtests_test.go index 7fc437cc0546..894ea2f1bc45 100644 --- a/development/prow/pjconfigtests/pjconfigtests_test.go +++ b/pkg/prow/pjconfigtests/pjconfigtests_test.go @@ -1,12 +1,12 @@ package pjconfigtests_test import ( + "github.com/kyma-project/test-infra/pkg/opagatekeeper" + kprow "github.com/kyma-project/test-infra/pkg/prow" + "github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" "os" "path" - "github.com/kyma-project/test-infra/development/opagatekeeper" - kprow "github.com/kyma-project/test-infra/development/prow" - "github.com/kyma-project/test-infra/development/prow/pjconfigtests" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" diff --git a/development/prow/pjconfigtests/validators.go b/pkg/prow/pjconfigtests/validators.go similarity index 88% rename from development/prow/pjconfigtests/validators.go rename to pkg/prow/pjconfigtests/validators.go index f2537f016d78..b0aab04dc24d 100644 --- a/development/prow/pjconfigtests/validators.go +++ b/pkg/prow/pjconfigtests/validators.go @@ -1,9 +1,8 @@ package pjconfigtests import ( + "github.com/kyma-project/test-infra/pkg/opagatekeeper" "strings" - - "github.com/kyma-project/test-infra/development/opagatekeeper" ) func IsPrivilegedAllowedImage(image string, privilegedContainersConstraint opagatekeeper.K8sPSPPrivilegedContainer) bool { diff --git a/development/prow/prowjobs.go b/pkg/prow/prowjobs.go similarity index 100% rename from development/prow/prowjobs.go rename to pkg/prow/prowjobs.go diff --git a/development/pkg/securityconfig/securityconfig.go b/pkg/securityconfig/securityconfig.go similarity index 100% rename from development/pkg/securityconfig/securityconfig.go rename to pkg/securityconfig/securityconfig.go diff --git a/development/pkg/securityconfig/securityconfig_test.go b/pkg/securityconfig/securityconfig_test.go similarity index 100% rename from development/pkg/securityconfig/securityconfig_test.go rename to pkg/securityconfig/securityconfig_test.go diff --git a/development/pkg/sets/strings.go b/pkg/sets/strings.go similarity index 100% rename from development/pkg/sets/strings.go rename to pkg/sets/strings.go diff --git a/development/pkg/sets/tags.go b/pkg/sets/tags.go similarity index 87% rename from development/pkg/sets/tags.go rename to pkg/sets/tags.go index 3ceda85dd1ad..9b2c9e12d455 100644 --- a/development/pkg/sets/tags.go +++ b/pkg/sets/tags.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/kyma-project/test-infra/development/pkg/tags" + "github.com/kyma-project/test-infra/pkg/tags" ) type Tags []tags.Tag diff --git a/development/image-builder/sign/notary.go b/pkg/sign/notary.go similarity index 100% rename from development/image-builder/sign/notary.go rename to pkg/sign/notary.go diff --git a/development/image-builder/sign/notary_test.go b/pkg/sign/notary_test.go similarity index 100% rename from development/image-builder/sign/notary_test.go rename to pkg/sign/notary_test.go diff --git a/development/image-builder/sign/sign.go b/pkg/sign/sign.go similarity index 100% rename from development/image-builder/sign/sign.go rename to pkg/sign/sign.go diff --git a/development/image-builder/sign/sign_test.go b/pkg/sign/sign_test.go similarity index 100% rename from development/image-builder/sign/sign_test.go rename to pkg/sign/sign_test.go diff --git a/development/pkg/tags/options.go b/pkg/tags/options.go similarity index 100% rename from development/pkg/tags/options.go rename to pkg/tags/options.go diff --git a/development/pkg/tags/options_test.go b/pkg/tags/options_test.go similarity index 100% rename from development/pkg/tags/options_test.go rename to pkg/tags/options_test.go diff --git a/development/pkg/tags/tag.go b/pkg/tags/tag.go similarity index 100% rename from development/pkg/tags/tag.go rename to pkg/tags/tag.go diff --git a/development/pkg/tags/tag_test.go b/pkg/tags/tag_test.go similarity index 100% rename from development/pkg/tags/tag_test.go rename to pkg/tags/tag_test.go diff --git a/development/pkg/tags/tags.go b/pkg/tags/tags.go similarity index 100% rename from development/pkg/tags/tags.go rename to pkg/tags/tags.go diff --git a/development/pkg/tags/tags_test.go b/pkg/tags/tags_test.go similarity index 100% rename from development/pkg/tags/tags_test.go rename to pkg/tags/tags_test.go diff --git a/development/types/types.go b/pkg/types/types.go similarity index 100% rename from development/types/types.go rename to pkg/types/types.go diff --git a/prow/images/needs-tws-external-plugin/Dockerfile b/prow/images/needs-tws-external-plugin/Dockerfile index 8d2a9d52c62e..6141751b6907 100644 --- a/prow/images/needs-tws-external-plugin/Dockerfile +++ b/prow/images/needs-tws-external-plugin/Dockerfile @@ -8,7 +8,7 @@ FROM alpine:3.18.4 ARG commit ENV IMAGE_COMMIT=$commit LABEL io.kyma-project.test-infra.commit=$commit -COPY ../../../development/external-plugins/needs-tws/needs-tws / +COPY ../../../cmd/external-plugins/needs-tws/needs-tws / RUN apk add --no-cache ca-certificates git && \ chmod a+x /needs-tws ENTRYPOINT ["/needs-tws"] diff --git a/prow/jobs/test-infra/pjconfigtests.yaml b/prow/jobs/test-infra/pjconfigtests.yaml index 62e18063c87b..49495f64481c 100644 --- a/prow/jobs/test-infra/pjconfigtests.yaml +++ b/prow/jobs/test-infra/pjconfigtests.yaml @@ -31,7 +31,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -70,7 +70,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -109,7 +109,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -148,7 +148,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -187,7 +187,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -226,7 +226,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -265,7 +265,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -304,7 +304,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -343,7 +343,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -382,7 +382,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -421,7 +421,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -460,7 +460,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -499,7 +499,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -538,7 +538,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -577,7 +577,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -616,7 +616,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -655,7 +655,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -694,7 +694,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -733,7 +733,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -772,7 +772,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -811,7 +811,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -850,7 +850,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -889,7 +889,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -928,7 +928,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -967,7 +967,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1006,7 +1006,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1045,7 +1045,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1084,7 +1084,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1123,7 +1123,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1162,7 +1162,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1201,7 +1201,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1240,7 +1240,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1279,7 +1279,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1318,7 +1318,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1357,7 +1357,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1396,7 +1396,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M @@ -1435,7 +1435,7 @@ presubmits: # runs on PRs - "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" resources: requests: memory: 100M diff --git a/prow/jobs/test-infra/validation.yaml b/prow/jobs/test-infra/validation.yaml index 5675f6e1708e..a8d31c850b12 100644 --- a/prow/jobs/test-infra/validation.yaml +++ b/prow/jobs/test-infra/validation.yaml @@ -30,111 +30,6 @@ presubmits: # runs on PRs requests: memory: 1.5Gi cpu: 0.8 - - name: pre-main-test-infra-validate-prow-tools - annotations: - description: "Validate prow tools" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-test-infra-validate-prow-tools" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-build-pr: "true" - run_if_changed: '^(go.mod|go.sum)$|^development/tools/(cmd/.*|pkg/.*|Makefile|.*.sh)' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20230913-3d41bb28" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "make" - args: - - "-C" - - "development/tools" - - "validate" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: pre-main-test-infra-validate-image-url-helper - annotations: - description: "Validate image url helper tool" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-test-infra-validate-image-url-helper" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-build-pr: "true" - run_if_changed: '^(go.mod|go.sum)$|^development/image-url-helper/(cmd/.*|pkg/.*|Makefile|.*.sh)' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20230913-3d41bb28" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "make" - args: - - "-C" - - "development/image-url-helper" - - "ci-pr" - resources: - requests: - memory: 3Gi - cpu: 2 - - name: pre-main-test-infra-validate-prowjobparser - annotations: - description: "Validate prowjobparser tool" - owner: "neighbors" - labels: - prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-main-test-infra-validate-prowjobparser" - prow.k8s.io/pubsub.topic: "prowjobs" - preset-build-pr: "true" - run_if_changed: '^(go.mod|go.sum)$|^development/prowjobparser/(.*.go|Makefile|.*.sh)' - skip_report: false - decorate: true - cluster: untrusted-workload - max_concurrency: 10 - branches: - - ^master$ - - ^main$ - spec: - containers: - - image: "europe-docker.pkg.dev/kyma-project/prod/testimages/buildpack-go:v20230913-3d41bb28" - securityContext: - privileged: false - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: false - command: - - "make" - args: - - "-C" - - "development/prowjobparser" - - "validate" - resources: - requests: - memory: 3Gi - cpu: 2 - name: pre-main-test-infra-validate-generated-files annotations: description: "Validate rendertemplate generated files" diff --git a/templates/data/test-infra/pjconfigtests.yaml b/templates/data/test-infra/pjconfigtests.yaml index 8529875a3b79..169a811400dc 100644 --- a/templates/data/test-infra/pjconfigtests.yaml +++ b/templates/data/test-infra/pjconfigtests.yaml @@ -22,7 +22,7 @@ command: "/ginkgo" args: - "-r" - - "/home/prow/go/src/github.com/kyma-project/test-infra/development/prow/pjconfigtests" + - "/home/prow/go/src/github.com/kyma-project/test-infra/pkg/prow/pjconfigtests" jobConfigs: {{/* Iterate over orgs and repos in config.yaml global field. */}} {{- range $org := .Global.orgs }} diff --git a/templates/data/validation-data.yaml b/templates/data/validation-data.yaml index a2bc3969ff51..0ca2252f61fe 100644 --- a/templates/data/validation-data.yaml +++ b/templates/data/validation-data.yaml @@ -27,69 +27,6 @@ templates: - "jobConfig_presubmit" - "pubsub_labels" - "unprivileged" - - jobConfig: - name: "pre-main-test-infra-validate-prow-tools" - annotations: - owner: neighbors - description: "Validate prow tools" - securityContext: - privileged: "false" - run_if_changed: "^(go.mod|go.sum)$|^development/tools/(cmd/.*|pkg/.*|Makefile|.*.sh)" - labels: - preset-build-pr: "true" - command: "make" - args: - - "-C" - - "development/tools" - - "validate" - inheritedConfigs: - global: - - "jobConfig_default" - - "image_buildpack-golang" - - "jobConfig_presubmit" - - "pubsub_labels" - - jobConfig: - name: "pre-main-test-infra-validate-image-url-helper" - annotations: - owner: neighbors - description: "Validate image url helper tool" - securityContext: - privileged: "false" - run_if_changed: "^(go.mod|go.sum)$|^development/image-url-helper/(cmd/.*|pkg/.*|Makefile|.*.sh)" - labels: - preset-build-pr: "true" - command: "make" - args: - - "-C" - - "development/image-url-helper" - - "ci-pr" - inheritedConfigs: - global: - - "jobConfig_default" - - "image_buildpack-golang" - - "jobConfig_presubmit" - - "pubsub_labels" - - jobConfig: - name: "pre-main-test-infra-validate-prowjobparser" - annotations: - owner: neighbors - description: "Validate prowjobparser tool" - securityContext: - privileged: "false" - run_if_changed: "^(go.mod|go.sum)$|^development/prowjobparser/(.*.go|Makefile|.*.sh)" - labels: - preset-build-pr: "true" - command: "make" - args: - - "-C" - - "development/prowjobparser" - - "validate" - inheritedConfigs: - global: - - "jobConfig_default" - - "image_buildpack-golang" - - "jobConfig_presubmit" - - "pubsub_labels" - jobConfig: name: "pre-main-test-infra-validate-generated-files" annotations: