Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
289d1ab
prepare enablement of ui e2e tests
Jul 29, 2025
5645463
format
Jul 29, 2025
181065c
add test requirements
Jul 29, 2025
e5e582d
redo
Jul 29, 2025
481e279
improvements
Jul 30, 2025
439bbf9
Revert "improvements"
Jul 30, 2025
2362c47
remove
Jul 30, 2025
f3349f5
improvements
Jul 30, 2025
ea95cae
improvements
Jul 30, 2025
aa9536a
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 1, 2025
e84b951
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 2, 2025
75fecdd
improvements
Sep 4, 2025
7228cc1
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 4, 2025
5a4cce6
fix
Sep 4, 2025
622a774
fix
rsoaresd Sep 4, 2025
beb7403
improvements
rsoaresd Sep 4, 2025
129654e
try
rsoaresd Sep 4, 2025
20494ca
fix
rsoaresd Sep 5, 2025
c6ab616
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 8, 2025
0f14ffc
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 8, 2025
a97cf54
Merge branch 'master' into enable_ui_e2e_tests
mfrancisc Sep 8, 2025
e16c223
requested changes
rsoaresd Sep 9, 2025
9760f20
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 9, 2025
29111a1
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 11, 2025
90ec11f
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 16, 2025
e6291ed
requested changes
rsoaresd Sep 16, 2025
e947f20
requested changes
rsoaresd Sep 17, 2025
2611cc7
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 17, 2025
e4a310b
add libX11-xcb to Dockerfile
rsoaresd Sep 17, 2025
589e2d6
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 18, 2025
058e278
update doc
rsoaresd Sep 18, 2025
66752ae
Merge branch 'master' into enable_ui_e2e_tests
rsoaresd Sep 22, 2025
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
92 changes: 92 additions & 0 deletions .github/workflows/publish-operators-for-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: publish-operators-for-ui-e2e-tests
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]

env:
GOPATH: /tmp/go

jobs:
binary:
name: Build & push operator bundles for UI e2e tests

runs-on: ubuntu-24.04
if: ${{ github.event.comment == '' || contains(github.event.comment.body, '/retest') || contains(github.event.comment.body, '/test all') || contains(github.event.comment.body, '/test e2e') }}
steps:
# Checkout from PR event - in that case the comment field is empty
- name: Checkout code from PR event
uses: actions/checkout@v4
if: ${{ github.event.comment == '' }}
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0

# If the workflow was triggered based on comment, then we need to get the information about the PR
# Is executed only for comment events - in that case the pull_request field is empty
- name: Send Github API Request to get PR data
id: request
uses: octokit/request-action@v2.4.0
if: ${{ github.event.pull_request == '' }}
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Checkout the code based on the data retrieved from the previous step
# Is executed only for comment events - in that case the pull_request field is empty
- name: Checkout code from PR
uses: actions/checkout@v4
if: ${{ github.event.pull_request == '' }}
with:
repository: ${{ fromJson(steps.request.outputs.data).head.repo.full_name }}
ref: ${{ fromJson(steps.request.outputs.data).head.ref }}
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Prepare tools
uses: codeready-toolchain/toolchain-cicd/prepare-tools-action@master

# Execute composite action using values from PR event
# Is executed only for PR events - in that case the comment field is empty
- name: Publish current operator bundles for host & member based on PR event
uses: rsoaresd/toolchain-cicd/publish-operators-for-ui-e2e-tests@add_actions_to_ui_e2e_tests
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

temporary, just to test

if: ${{ github.event.comment == '' }}
with:
quay-token: ${{ secrets.TEST_QUAY_TOKEN }}
quay-namespace: codeready-toolchain-test
sha: ${{ github.event.pull_request.head.sha }}
pr-number: ${{ github.event.pull_request.number }}
author: ${{ github.event.pull_request.head.user.login }}
gh-head-ref: ${{ github.event.pull_request.head.ref }}

# Execute composite action using values from PR event
# Is executed only for comment events - in that case the pull_request field is empty
- name: Publish current operator bundles for host & member based on comment event
uses: rsoaresd/toolchain-cicd/publish-operators-for-ui-e2e-tests@add_actions_to_ui_e2e_tests
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

temporary, just to test

if: ${{ github.event.pull_request == '' }}
with:
quay-token: ${{ secrets.TEST_QUAY_TOKEN }}
quay-namespace: codeready-toolchain-test
sha: ${{ fromJson(steps.request.outputs.data).head.sha }}
pr-number: ${{ fromJson(steps.request.outputs.data).number }}
author: ${{ fromJson(steps.request.outputs.data).head.user.login }}
gh-head-ref: ${{ fromJson(steps.request.outputs.data).head.ref }}
92 changes: 92 additions & 0 deletions .github/workflows/publish-sandbox-ui-for-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: publish-sandbox-ui-for-ui-e2e-tests
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]

env:
GOPATH: /tmp/go

jobs:
binary:
name: Build & push Developer Sandbox UI image for UI e2e tests

runs-on: ubuntu-24.04
if: ${{ github.event.comment == '' || contains(github.event.comment.body, '/retest') || contains(github.event.comment.body, '/test all') || contains(github.event.comment.body, '/test e2e') }}
steps:
# Checkout from PR event - in that case the comment field is empty
- name: Checkout code from PR event
uses: actions/checkout@v4
if: ${{ github.event.comment == '' }}
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
fetch-depth: 0

# If the workflow was triggered based on comment, then we need to get the information about the PR
# Is executed only for comment events - in that case the pull_request field is empty
- name: Send Github API Request to get PR data
id: request
uses: octokit/request-action@v2.4.0
if: ${{ github.event.pull_request == '' }}
with:
route: ${{ github.event.issue.pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Checkout the code based on the data retrieved from the previous step
# Is executed only for comment events - in that case the pull_request field is empty
- name: Checkout code from PR
uses: actions/checkout@v4
if: ${{ github.event.pull_request == '' }}
with:
repository: ${{ fromJson(steps.request.outputs.data).head.repo.full_name }}
ref: ${{ fromJson(steps.request.outputs.data).head.ref }}
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Prepare tools
uses: codeready-toolchain/toolchain-cicd/prepare-tools-action@master

# Execute composite action using values from PR event
# Is executed only for PR events - in that case the comment field is empty
- name: Publish current Developer Sandbox UI image
uses: rsoaresd/toolchain-cicd/publish-sandbox-ui-for-ui-e2e-tests@add_actions_to_ui_e2e_tests
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

temporary, just to test

if: ${{ github.event.comment == '' }}
with:
quay-token: ${{ secrets.TEST_QUAY_TOKEN }}
quay-namespace: codeready-toolchain-test
sha: ${{ github.event.pull_request.head.sha }}
pr-number: ${{ github.event.pull_request.number }}
author: ${{ github.event.pull_request.head.user.login }}
gh-head-ref: ${{ github.event.pull_request.head.ref }}

# Execute composite action using values from PR event
# Is executed only for comment events - in that case the pull_request field is empty
- name: Publish current Developer Sandbox UI image
uses: rsoaresd/toolchain-cicd/publish-sandbox-ui-for-ui-e2e-tests@add_actions_to_ui_e2e_tests
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

temporary, just to test

if: ${{ github.event.pull_request == '' }}
with:
quay-token: ${{ secrets.TEST_QUAY_TOKEN }}
quay-namespace: codeready-toolchain-test
sha: ${{ fromJson(steps.request.outputs.data).head.sha }}
pr-number: ${{ fromJson(steps.request.outputs.data).number }}
author: ${{ fromJson(steps.request.outputs.data).head.user.login }}
gh-head-ref: ${{ fromJson(steps.request.outputs.data).head.ref }}
78 changes: 65 additions & 13 deletions make/sandbox-ui.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,30 @@ TAG := latest
PLATFORM ?= linux/amd64
RHDH_PLUGINS_DIR ?= $(TMPDIR)rhdh-plugins
AUTH_FILE := /tmp/auth.json
IMAGE_TO_PUSH_IN_QUAY ?= quay.io/$(QUAY_NAMESPACE)/sandbox-rhdh-plugin:$(TAG)
OPENID_SECRET_NAME=openid-sandbox-public-client-secret
PUSH_SANDBOX_IMAGE ?= true
UI_ENVIRONMENT := ui-e2e-tests

TAG := $(shell \
if [ -n "$(CI)$(CLONEREFS_OPTIONS)" ]; then \
if [ -n "$(GITHUB_ACTIONS)" ]; then \
REPOSITORY_NAME=$$(basename "$(GITHUB_REPOSITORY)"); \
COMMIT_ID_SUFFIX=$$(echo "$(PULL_PULL_SHA)" | cut -c1-7); \
echo "from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
else \
AUTHOR=$$(jq -r '.refs[0].pulls[0].author' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'); \
PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
fi; \
else \
echo "latest"; \
fi)
Comment on lines +13 to +27
Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc Sep 8, 2025

Choose a reason for hiding this comment

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

If I understand this correctly the tags will be something like : rhdh-plugins.199.123ed6 where:

  • rhdh-plugins is the name of the repo with the UI code
  • 199 is a pr number
  • 123ed6 is a short commit sha

I'm wondering if we really need to add all this information to the image tag or if just the short commit sha ( 7 chars ) would be enough ? In order to simplify a bit the code and the tag names. Also I'f I'm not mistaken there is a limit in the length of the tag which is 128 chars.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@mfrancisc thanks for all your suggestions!

If I understand this correctly the tags will be something like : rhdh-plugins.199.123ed6 where:

rhdh-plugins is the name of the repo with the UI code
199 is a pr number
123ed6 is a short commit sha

Yes, exactly!

I'm wondering if we really need to add all this information to the image tag or if just the short commit sha ( 7 chars )
would be enough ? In order to simplify a bit the code and the tag names. Also I'f I'm not mistaken there is a limit in the length of the tag which is 128 chars.

I used the same approach as we use for pushing host and member images.
I think we will not have any problem regarding the tag limit length. For example, in from.rhdh-plugins.PR1980.a1b2c3d we have only 32 chars.
I believe the format from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX} was implemented to ensure that we can identify the tag on our quay org and also to ensure we do not push the same tag (at least, from my understanding, and it was the intention that I reused the approach). But it is something that we can discuss with the team

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes sense! Thanks for your additional details. Let's keep it consistent with the other tags than I agree 👍


Comment thread
coderabbitai[bot] marked this conversation as resolved.

IMAGE_TO_PUSH_IN_QUAY ?= quay.io/$(QUAY_NAMESPACE)/sandbox-rhdh-plugin:$(TAG)


.PHONY: deploy-sandbox-ui
deploy-sandbox-ui: REGISTRATION_SERVICE_API=https://$(shell oc get route registration-service -n ${HOST_NS} -o custom-columns=":spec.host" | tr -d '\n')/api/v1
deploy-sandbox-ui: HOST_OPERATOR_API=https://$(shell oc get route api -n ${HOST_NS} -o custom-columns=":spec.host" | tr -d '\n')
Expand All @@ -21,11 +40,11 @@ ifeq ($(PUSH_SANDBOX_IMAGE),true)
$(MAKE) push-sandbox-plugin
endif
kustomize build deploy/sandbox-ui/ui-e2e-tests | REGISTRATION_SERVICE_API=${REGISTRATION_SERVICE_API} \
HOST_NS=${HOST_NS} \
HOST_OPERATOR_API=${HOST_OPERATOR_API} \
SANDBOX_UI_NS=${SANDBOX_UI_NS} \
SANDBOX_PLUGIN_IMAGE=${IMAGE_TO_PUSH_IN_QUAY} \
RHDH=${RHDH} envsubst | oc apply -f -
HOST_NS=${HOST_NS} \
HOST_OPERATOR_API=${HOST_OPERATOR_API} \
SANDBOX_UI_NS=${SANDBOX_UI_NS} \
SANDBOX_PLUGIN_IMAGE=${IMAGE_TO_PUSH_IN_QUAY} \
RHDH=${RHDH} envsubst | oc apply -f -
$(MAKE) configure-oauth-idp
@echo "restarting registration-service to apply toolchainconfig changes"
@oc -n ${HOST_NS} rollout restart deploy/registration-service
Expand Down Expand Up @@ -71,10 +90,43 @@ create-namespace:
.PHONY: get-rhdh-plugins
get-rhdh-plugins:
ifeq ($(strip $(RHDH_PLUGINS_DIR)), $(TMPDIR)rhdh-plugins)
echo "using rhdh-plugins repo from master"
ifeq ($(GITHUB_ACTIONS),true)
@echo "using author ${AUTHOR}"
$(eval AUTHOR_LINK = https://github.com/${AUTHOR})
@echo "detected branch ${BRANCH_NAME}"
# check if a branch with the same ref exists in the user's fork of rhdh-plugins repo
@echo "branches of ${AUTHOR_LINK}/rhdh-plugins - checking if there is a branch ${BRANCH_NAME} we could pair with."
curl ${AUTHOR_LINK}/rhdh-plugins.git/info/refs?service=git-upload-pack --output -
$(eval REMOTE_RHDH_PLUGINS_BRANCH := $(shell curl ${AUTHOR_LINK}/rhdh-plugins.git/info/refs?service=git-upload-pack --output - 2>/dev/null | grep -a "refs/heads/${BRANCH_NAME}$$" | awk '{print $$2}'))
Comment on lines +114 to +115
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

Unsafe curl output redirection may expose sensitive data.

Line 118 uses curl ... --output - which outputs the raw git protocol response to stdout. This could potentially expose sensitive repository information in CI logs.

-	curl ${AUTHOR_LINK}/rhdh-plugins.git/info/refs?service=git-upload-pack --output -
-	$(eval REMOTE_RHDH_PLUGINS_BRANCH := $(shell curl ${AUTHOR_LINK}/rhdh-plugins.git/info/refs?service=git-upload-pack --output - 2>/dev/null | grep -a "refs/heads/${BRANCH_NAME}$$" | awk '{print $$2}'))
+	@echo "Checking for branch ${BRANCH_NAME} in ${AUTHOR_LINK}/rhdh-plugins..."
+	$(eval REMOTE_RHDH_PLUGINS_BRANCH := $(shell curl -s ${AUTHOR_LINK}/rhdh-plugins.git/info/refs?service=git-upload-pack 2>/dev/null | grep -a "refs/heads/${BRANCH_NAME}$$" | awk '{print $$2}'))
🤖 Prompt for AI Agents
In make/sandbox-ui.mk around lines 118-119 the curl invocation uses --output -
which writes the raw git-upload-pack info/refs response to stdout (exposing
sensitive repo data in CI logs); replace this with a safe call that suppresses
raw output (for example use curl --silent --show-error --fail or redirect stdout
to /dev/null) or, better, replace the curl approach with a non-verbose git
protocol command such as git ls-remote to fetch branch refs; ensure the command
returns only the branch ref value to the shell evaluation (no raw protocol on
stdout) and preserve existing grep/awk logic to set REMOTE_RHDH_PLUGINS_BRANCH.


# check if the branch with the same name exists, if so then merge it with master and use the merge branch, if not then use master
@echo "REMOTE_RHDH_PLUGINS_BRANCH: ${REMOTE_RHDH_PLUGINS_BRANCH}"
@$(MAKE) pair-if-needed REMOTE_RHDH_PLUGINS_BRANCH=${REMOTE_RHDH_PLUGINS_BRANCH} AUTHOR_LINK=${AUTHOR_LINK}
else
@echo "using rhdh-plugins repo from master"
@$(MAKE) clone-rhdh-plugins
endif
else
@echo "using local rhdh-plugins repo, no pairing needed: ${RHDH_PLUGINS_DIR}"
endif

Comment on lines +93 to +127
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

GA pairing depends on undefined AUTHOR/BRANCH_NAME.

Default these from GA env to avoid no-op pairing.

-ifeq ($(GITHUB_ACTIONS),true)
+ifeq ($(GITHUB_ACTIONS),true)
+	# defaults for GA
+	AUTHOR ?= $(GITHUB_ACTOR)
+	BRANCH_NAME ?= $(GITHUB_HEAD_REF)
 	@echo "using author ${AUTHOR}"
 	$(eval AUTHOR_LINK = https://github.com/${AUTHOR})
 	@echo "detected branch ${BRANCH_NAME}"

Committable suggestion skipped: line range outside the PR's diff.

pair-if-needed:
ifneq ($(strip $(REMOTE_RHDH_PLUGINS_BRANCH)),)
@echo "Branch ref of the user's fork to be used for pairing: \"${REMOTE_RHDH_PLUGINS_BRANCH}\""
git config --global user.email "devsandbox@redhat.com"
git config --global user.name "KubeSaw"
# clone
rm -rf ${RHDH_PLUGINS_DIR}
Comment thread
rsoaresd marked this conversation as resolved.
Outdated
git clone --depth=1 https://github.com/redhat-developer/rhdh-plugins.git ${RHDH_PLUGINS_DIR}
# add the user's fork as remote repo
git --git-dir=${RHDH_PLUGINS_DIR}/.git --work-tree=${RHDH_PLUGINS_DIR} remote add external ${AUTHOR_LINK}/rhdh-plugins.git
# fetch the branch
git --git-dir=${RHDH_PLUGINS_DIR}/.git --work-tree=${RHDH_PLUGINS_DIR} fetch external ${REMOTE_RHDH_PLUGINS_BRANCH}
# merge the branch with master
git --git-dir=${RHDH_PLUGINS_DIR}/.git --work-tree=${RHDH_PLUGINS_DIR} merge --allow-unrelated-histories --no-commit FETCH_HEAD
else
Comment on lines +134 to +142
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this code and the other ones look very similar (if not the same) to what we have in the scripts/ci. Probably stupid question - have you considered adding a file similar to manage-member-operator.sh and leverage the logic that is already available?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

never mind, I see the differences and challenges in the code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

TBH, I did this way to try to simplify as much as I could

echo "using local rhdh-plugins repo: ${RHDH_PLUGINS_DIR}"
@echo "no pairing needed, using rhdh-plugins repo from master"
@$(MAKE) clone-rhdh-plugins
endif
Comment thread
coderabbitai[bot] marked this conversation as resolved.

.PHONY: clone-rhdh-plugins
Expand All @@ -91,9 +143,9 @@ push-sandbox-plugin:
rm -rf red-hat-developer-hub-backstage-plugin-sandbox && \
yarn install && \
npx @janus-idp/cli@3.3.1 package package-dynamic-plugins \
--tag $(IMAGE_TO_PUSH_IN_QUAY) \
--platform $(PLATFORM) && \
podman push $(IMAGE_TO_PUSH_IN_QUAY)
--tag $(IMAGE_TO_PUSH_IN_QUAY) \
--platform $(PLATFORM) && \
podman push $(IMAGE_TO_PUSH_IN_QUAY)

.PHONY: clean-sandbox-ui
clean-sandbox-ui:
Expand Down Expand Up @@ -141,7 +193,7 @@ build-sandbox-ui-e2e-tests:
podman build --platform $(PLATFORM) -t $(UNIT_TEST_IMAGE_NAME) -f $(UNIT_TEST_DOCKERFILE) .

# Run Developer Sandbox UI e2e tests image using podman
PHONY: test-sandbox-ui-in-container
.PHONY: test-sandbox-ui-in-container
test-sandbox-ui-in-container: build-sandbox-ui-e2e-tests
@echo "pushing Developer Sandbox UI image..."
$(MAKE) push-sandbox-plugin
Expand All @@ -159,4 +211,4 @@ test-sandbox-ui-in-container: build-sandbox-ui-e2e-tests
-e TMP=/tmp/ \
-e PUSH_SANDBOX_IMAGE=false \
-e RUNNING_IN_CONTAINER=true \
$(UNIT_TEST_IMAGE_NAME)
$(UNIT_TEST_IMAGE_NAME)
9 changes: 5 additions & 4 deletions make/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ endif
TESTS_RUN_FILTER_REGEXP ?= ""

.PHONY: test-e2e
test-e2e: test-ui-e2e
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

temporary, just to test

## Run the e2e tests
test-e2e: INSTALL_OPERATOR=true
test-e2e: prepare-e2e verify-migration-and-deploy-e2e e2e-run-parallel e2e-run e2e-run-metrics
@echo "The tests successfully finished"
@echo "To clean the cluster run 'make clean-e2e-resources'"
#test-e2e: INSTALL_OPERATOR=true
#test-e2e: prepare-e2e verify-migration-and-deploy-e2e e2e-run-parallel e2e-run e2e-run-metrics
#@echo "The tests successfully finished"
#@echo "To clean the cluster run 'make clean-e2e-resources'"

.PHONY: test-e2e-without-migration
## Run the e2e tests without migration tests
Expand Down
8 changes: 7 additions & 1 deletion scripts/ci/manage-host-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,22 @@ if [[ -n "${CI}${REG_REPO_PATH}${HOST_REPO_PATH}" ]] && [[ $(echo ${REPO_NAME} |
if [[ ${PUBLISH_OPERATOR} == "true" ]]; then
push_image
OPERATOR_IMAGE_LOC=${IMAGE_LOC}
make -C ${REPOSITORY_PATH} publish-current-bundle INDEX_IMAGE_TAG=${BUNDLE_AND_INDEX_TAG} BUNDLE_TAG=${BUNDLE_AND_INDEX_TAG} QUAY_NAMESPACE=${QUAY_NAMESPACE} OTHER_REPO_PATH=${REG_REPO_PATH} OTHER_REPO_IMAGE_LOC=${REG_SERV_IMAGE_LOC} IMAGE=${OPERATOR_IMAGE_LOC}
make -C ${REPOSITORY_PATH} publish-current-bundle INDEX_IMAGE_NAME=${REPO_NAME_FOR_IMAGE}-index INDEX_IMAGE_TAG=${BUNDLE_AND_INDEX_TAG} BUNDLE_TAG=${BUNDLE_AND_INDEX_TAG} QUAY_NAMESPACE=${QUAY_NAMESPACE} OTHER_REPO_PATH=${REG_REPO_PATH} OTHER_REPO_IMAGE_LOC=${REG_SERV_IMAGE_LOC} IMAGE=${OPERATOR_IMAGE_LOC}
fi
else
INDEX_IMAGE_LOC="quay.io/codeready-toolchain/host-operator-index:latest"
if [[ "${ENVIRONMENT}" == "ui-e2e-tests" ]]; then
INDEX_IMAGE_LOC="quay.io/codeready-toolchain/host-operator-ui-e2e-tests-index:latest"
fi
fi

if [[ ${INSTALL_OPERATOR} == "true" ]]; then
OPERATOR_RESOURCE_NAME=host-operator
OPERATOR_NAME=toolchain-host-operator
INDEX_IMAGE_NAME=host-operator-index
if [[ "${ENVIRONMENT}" == "ui-e2e-tests" ]]; then
INDEX_IMAGE_NAME=host-operator-ui-e2e-tests-index
fi
NAMESPACE=${HOST_NS}
EXPECT_CRD=toolchainconfigs.toolchain.dev.openshift.com
install_operator
Expand Down
8 changes: 7 additions & 1 deletion scripts/ci/manage-member-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,23 @@ if [[ -n "${CI}${MEMBER_REPO_PATH}" ]] && [[ $(echo ${REPO_NAME} | sed 's/"//g')
push_image

OPERATOR_IMAGE_LOC=${IMAGE_LOC}
make -C ${REPOSITORY_PATH} publish-current-bundle INDEX_IMAGE_TAG=${BUNDLE_AND_INDEX_TAG} BUNDLE_TAG=${BUNDLE_AND_INDEX_TAG} QUAY_NAMESPACE=${QUAY_NAMESPACE} IMAGE=${OPERATOR_IMAGE_LOC}
make -C ${REPOSITORY_PATH} publish-current-bundle INDEX_IMAGE_NAME=${REPO_NAME_FOR_IMAGE}-index INDEX_IMAGE_TAG=${BUNDLE_AND_INDEX_TAG} BUNDLE_TAG=${BUNDLE_AND_INDEX_TAG} QUAY_NAMESPACE=${QUAY_NAMESPACE} IMAGE=${OPERATOR_IMAGE_LOC}
fi
else
INDEX_IMAGE_LOC="quay.io/codeready-toolchain/member-operator-index:latest"
if [[ "${ENVIRONMENT}" == "ui-e2e-tests" ]]; then
INDEX_IMAGE_LOC="quay.io/codeready-toolchain/member-operator-ui-e2e-tests-index:latest"
fi
fi


if [[ ${INSTALL_OPERATOR} == "true" ]]; then
OPERATOR_RESOURCE_NAME=member-operator
OPERATOR_NAME=toolchain-member-operator
INDEX_IMAGE_NAME=member-operator-index
if [[ "${ENVIRONMENT}" == "ui-e2e-tests" ]]; then
INDEX_IMAGE_NAME=member-operator-ui-e2e-tests-index
fi
NAMESPACE=${MEMBER_NS}
EXPECT_CRD=memberoperatorconfigs.toolchain.dev.openshift.com
install_operator
Expand Down
Loading
Loading