Skip to content

Commit

Permalink
[main] Onboard net-kourier to automatic Dockerfile generation (#145)
Browse files Browse the repository at this point in the history
* Onboard net-kourier to automatic Dockerfile generation

* Use @latest tag for go install
  • Loading branch information
mgencur authored Sep 18, 2024
1 parent 08f6dd1 commit d3a4b02
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
generate-release:
./openshift/generate.sh
.PHONY: generate-release
3 changes: 0 additions & 3 deletions openshift/ci-operator/build-image/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions openshift/ci-operator/knative-images/kourier/Dockerfile

This file was deleted.

14 changes: 14 additions & 0 deletions openshift/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/..

go install github.com/openshift-knative/hack/cmd/generate@latest

$(go env GOPATH)/bin/generate \
--root-dir "${repo_root_dir}" \
--generators dockerfile \
--includes cmd \
--app-file-fmt "/ko-app/%s" \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.17"
3 changes: 3 additions & 0 deletions openshift/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project:
tag: knative-nightly
imagePrefix: net-kourier
9 changes: 7 additions & 2 deletions openshift/release/create-release-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ git checkout upstream/"${upstream_release}"

# Copy the openshift extra files from the OPENSHIFT/main branch.
git fetch openshift main
git checkout openshift/main -- openshift OWNERS
git add openshift OWNERS
git checkout openshift/main -- openshift OWNERS Makefile

tag=${release/release-/}
yq write --inplace openshift/project.yaml project.tag "knative-$tag"
make generate-release

git add openshift OWNERS Makefile
git commit -m "Add openshift specific files."

openshift/release/download_release_artifacts.sh "${release}"
Expand Down

0 comments on commit d3a4b02

Please sign in to comment.