Skip to content

Commit

Permalink
Merge pull request tektoncd#356 from piyush-garg/fix_interceptor_image
Browse files Browse the repository at this point in the history
Update scripts for new cmd added upstream
  • Loading branch information
openshift-merge-robot authored Jan 8, 2021
2 parents 3179856 + e9134f6 commit 18cf9dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

CGO_ENABLED=0
GOOS=linux
CORE_IMAGES=./cmd/controller ./cmd/eventlistenersink ./cmd/webhook
CORE_IMAGES=./cmd/controller ./cmd/eventlistenersink ./cmd/webhook ./cmd/interceptors

##
# You need to provide a RELEASE_VERSION when using targets like `push-image`, you can do it directly
Expand Down
5 changes: 5 additions & 0 deletions openshift/ci-operator/tekton-images/interceptors/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Do not edit! This file was generated via Makefile
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest

ADD interceptors /ko-app/interceptors
ENTRYPOINT ["/ko-app/interceptors"]
8 changes: 5 additions & 3 deletions openshift/resolve-yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ function resolve_resources() {
# This would get only one set of truth from the Makefile for the image lists
#
# % grep "^CORE_IMAGES" Makefile
# CORE_IMAGES=./cmd/controller ./cmd/webhook ./cmd/eventlistener
# CORE_IMAGES=./cmd/controller ./cmd/webhook ./cmd/eventlistenersink ./cmd/interceptors
# to:
# % grep '^CORE_IMAGES' Makefile|sed -e 's/.*=//' -e 's,./cmd/,,g'|tr -d '\n'|sed -e 's/ /|/g' -e 's/^/(/' -e 's/$/)\n/'
# (controller|webhook|eventlistener)
# (controller|webhook|eventlistenersink/interceptors)
local image_regexp=$(grep '^CORE_IMAGES' $(git rev-parse --show-toplevel)/Makefile| \
sed -e 's/.*=//' -e 's,./cmd/,,g'|tr '\n' ' '| \
sed -e 's/ /|/g' -e 's/^/(/' -e 's/|$/)\n/')
Expand All @@ -40,9 +40,11 @@ function resolve_resources() {
>>$resolved_file_name
fi

# Remove runAsUser: id, openshift takes care of randoming them and we dont need a fixed uid for that
# Remove runAsUser: id and runAsGroup: id, openshift takes care of randoming them and we dont need a fixed uid for that
sed -i '/runAsUser: [0-9]*/d' ${resolved_file_name}

sed -i '/runAsGroup: [0-9]*/d' ${resolved_file_name}

echo >>$resolved_file_name
done
}

0 comments on commit 18cf9dd

Please sign in to comment.