Skip to content
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: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ kubeExport := "jq 'del(.metadata.namespace,.metadata.resourceVersion,.metadata.u
pr-deploy-configresolver:
$(eval USER=$(shell curl --fail -Ss https://api.github.com/repos/openshift/ci-tools/pulls/$(PULL_REQUEST)|jq -r .head.user.login))
$(eval BRANCH=$(shell curl --fail -Ss https://api.github.com/repos/openshift/ci-tools/pulls/$(PULL_REQUEST)|jq -r .head.ref))
oc --context app.ci --as system:admin process -p USER=$(USER) -p BRANCH=$(BRANCH) -p PULL_REQUEST=$(PULL_REQUEST) -f hack/pr-deploy.yaml | oc --context app.ci --as system:admin apply -f -
$(eval RELEASE_BRANCH=$(shell curl --fail -Ss https://api.github.com/repos/openshift/release | jq -r .default_branch))
oc --context app.ci --as system:admin process -p USER=$(USER) -p BRANCH=$(BRANCH) -p PULL_REQUEST=$(PULL_REQUEST) -p RELEASE_BRANCH=$(RELEASE_BRANCH) -f hack/pr-deploy.yaml | oc --context app.ci --as system:admin apply -f -
echo "server is at https://$$( oc --context app.ci --as system:admin get route server -n ci-tools-$(PULL_REQUEST) -o jsonpath={.spec.host} )"
.PHONY: pr-deploy

Expand Down
7 changes: 5 additions & 2 deletions hack/pr-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ parameters:
- description: The branch to deploy from.
name: BRANCH
required: true
- description: The remote branch name
name: RELEASE_BRANCH
required: true
objects:
- apiVersion: v1
kind: Namespace
Expand Down Expand Up @@ -154,7 +157,7 @@ objects:
- /git-sync
args:
- --repo=https://github.com/openshift/release.git
- --branch=master
- --branch=${RELEASE_BRANCH}
- --root=/tmp/git-sync
- --one-time=true
env:
Expand All @@ -170,7 +173,7 @@ objects:
- /git-sync
args:
- --repo=https://github.com/openshift/release.git
- --branch=master
- --branch=${RELEASE_BRANCH}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work. Will oc command resolve that var from the env vars?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an Openshift Template Variable/Parameter defined on line 227 of the Makefile and used as an argument on oc with -p RELEASE_BRANCH=$(RELEASE_BRANCH)

- --wait=30
- --root=/tmp/git-sync
env:
Expand Down