From e5afdce8335ad1fcc7cb0875fa03a35c9bcb4eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Mon, 19 Aug 2024 08:41:14 +0300 Subject: [PATCH] Add strictfipsruntime tag in go build --- .tekton/cli-manager-pull-request.yaml | 2 +- .tekton/cli-manager-push.yaml | 2 +- Makefile | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.tekton/cli-manager-pull-request.yaml b/.tekton/cli-manager-pull-request.yaml index 966d19e0..cd16b86f 100644 --- a/.tekton/cli-manager-pull-request.yaml +++ b/.tekton/cli-manager-pull-request.yaml @@ -8,7 +8,7 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" pipelinesascode.tekton.dev/on-cel-expression: | - event == "pull_request" && target_branch == "main" && (".tekton/cli-manager-pull-request.yaml".pathChanged() || "api/***".pathChanged() || "cmd/***".pathChanged() || "dependencymagnet/***".pathChanged() || "pkg/***".pathChanged() || "vendor/***".pathChanged() || "Dockerfile".pathChanged()) + event == "pull_request" && target_branch == "main" && (".tekton/cli-manager-pull-request.yaml".pathChanged() || "api/***".pathChanged() || "cmd/***".pathChanged() || "dependencymagnet/***".pathChanged() || "pkg/***".pathChanged() || "vendor/***".pathChanged() || "Dockerfile".pathChanged() || "Makefile".pathChanged()) labels: appstudio.openshift.io/application: cli-manager-operator appstudio.openshift.io/component: cli-manager diff --git a/.tekton/cli-manager-push.yaml b/.tekton/cli-manager-push.yaml index b37d63b0..9a2a1ab7 100644 --- a/.tekton/cli-manager-push.yaml +++ b/.tekton/cli-manager-push.yaml @@ -7,7 +7,7 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/max-keep-runs: "3" pipelinesascode.tekton.dev/on-cel-expression: | - event == "push" && target_branch == "main" && (".tekton/cli-manager-push.yaml".pathChanged() || "api/***".pathChanged() || "cmd/***".pathChanged() || "dependencymagnet/***".pathChanged() || "pkg/***".pathChanged() || "vendor/***".pathChanged() || "Dockerfile".pathChanged()) + event == "push" && target_branch == "main" && (".tekton/cli-manager-push.yaml".pathChanged() || "api/***".pathChanged() || "cmd/***".pathChanged() || "dependencymagnet/***".pathChanged() || "pkg/***".pathChanged() || "vendor/***".pathChanged() || "Dockerfile".pathChanged() || "Makefile".pathChanged()) labels: appstudio.openshift.io/application: cli-manager-operator appstudio.openshift.io/component: cli-manager diff --git a/Makefile b/Makefile index 4bbe39ad..40c164a6 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \ targets/openshift/deps.mk \ ) +GO_BUILD_FLAGS :=-tags strictfipsruntime IMAGE_REGISTRY :=registry.ci.openshift.org # This will call a macro called "build-image" which will generate image specific targets based on the parameters: @@ -16,7 +17,7 @@ IMAGE_REGISTRY :=registry.ci.openshift.org # $2 - image ref # $3 - Dockerfile path # $4 - context directory for image build# It will generate target "image-$(1)" for building the image an binding it as a prerequisite to target "images". -$(call build-image,cli-manager,$(IMAGE_REGISTRY)/ocp/dev:cli-manager, ./Dockerfile,.) +$(call build-image,cli-manager,$(IMAGE_REGISTRY)/ocp/4.17:cli-manager, ./Dockerfile,.) clean: $(RM) ./cli-manager