Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Onboard net-kourier to automatic Dockerfile generation #145

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading