Skip to content

Commit

Permalink
Add patch for test_images (knative#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgencur authored Jul 18, 2022
1 parent 2f22b27 commit b114624
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
22 changes: 22 additions & 0 deletions openshift/patches/001-test-images.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/test/test_images/helloworld/Dockerfile b/test/test_images/helloworld/Dockerfile
index a973e4a9..87cd0c79 100644
--- a/test/test_images/helloworld/Dockerfile
+++ b/test/test_images/helloworld/Dockerfile
@@ -1,7 +1,7 @@
# Use the official Golang image to create a build artifact.
# This is based on Debian and sets the GOPATH to /go.
# https://hub.docker.com/_/golang
-FROM docker.io/library/golang:1.13 as builder
+FROM quay.io/openshift-knative/golang:1.13 as builder

# Create and change to the app directory.
WORKDIR /app
@@ -15,7 +15,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -v -o server
# Use the official Alpine image for a lean production container.
# https://hub.docker.com/_/alpine
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
-FROM docker.io/library/alpine:3
+FROM quay.io/openshift-knative/alpine:3
RUN apk add --no-cache ca-certificates

# Copy the binary to the production image from the builder stage.
9 changes: 9 additions & 0 deletions openshift/release/create-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ git checkout openshift/main $custom_files
git add $custom_files
git commit -m "Add openshift specific files."

# Apply patches .
PATCH_DIR="openshift/patches"
# Use release-specific patch dir if exists
if [ -d "openshift/patches-${release}" ]; then
PATCH_DIR="openshift/patches-${release}"
fi
git apply $PATCH_DIR/*
git commit -am ":fire: Apply carried patches."

# Fetch and generate required resources to enable faas as a plugin.
# As a result two git commits are added.
update_faas_plugin
4 changes: 4 additions & 0 deletions openshift/release/update-to-head.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ git checkout openshift/main $custom_files
git add openshift OWNERS_ALIASES OWNERS Makefile
git commit -m ":open_file_folder: Update openshift specific files."

# Apply patches .
git apply openshift/patches/*
git commit -am ":fire: Apply carried patches."

git push -f openshift release-next

# Trigger CI
Expand Down

0 comments on commit b114624

Please sign in to comment.