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

chore(e2e): refactor periodic pipeline to include sanity plugins check #2248

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f54ea24
Refactor periodic pipeline to include sanity plugins check
gustavolira Jan 24, 2025
2155e56
enable audit login e2e tests
gustavolira Jan 25, 2025
cbfad77
enable audit login e2e tests
gustavolira Jan 27, 2025
9841f6e
Add temporary plugin configurations for sandbox setup
gustavolira Jan 27, 2025
bc92e7f
Add temporary plugin configurations for sandbox setup
gustavolira Jan 27, 2025
f7d3b76
Add temporary plugin configurations for sandbox setup
gustavolira Jan 28, 2025
40916ed
Add temporary plugin configurations for sandbox setup
gustavolira Jan 28, 2025
7b5e953
Add temporary plugin configurations for sandbox setup
gustavolira Jan 28, 2025
cf6fabe
Add temporary plugin configurations for sandbox setup
gustavolira Jan 28, 2025
d612017
Add temporary plugin configurations for sandbox setup
gustavolira Jan 28, 2025
0c162b3
Add temporary plugin configurations for sandbox setup
gustavolira Jan 29, 2025
50c4ac7
Add temporary plugin configurations for sandbox setup
gustavolira Jan 29, 2025
f42d395
Add temporary plugin configurations for sandbox setup
gustavolira Jan 29, 2025
75cd801
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
91b53de
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
3051a01
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
d7fe077
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
1ae5862
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
4443089
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
43abd9c
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
a479bfe
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
9304183
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
99d5c9d
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 2025
e6063bb
Add temporary plugin configurations for sandbox setup
gustavolira Jan 30, 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
1 change: 1 addition & 0 deletions .ibm/pipelines/env_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ NAME_SPACE_RBAC="${NAME_SPACE_RBAC:-showcase-rbac}"
NAME_SPACE_RUNTIME="${NAME_SPACE_RUNTIME:-showcase-runtime}"
NAME_SPACE_POSTGRES_DB="${NAME_SPACE_POSTGRES_DB:-postgress-external-db}"
NAME_SPACE_RDS="showcase-rds-nightly"
NAME_SPACE_SANITY_PLUGINS_CHECK="showcase-sanity-plugins"
OPERATOR_MANAGER='rhdh-operator'
CHART_VERSION="2.15.2" # Fixed version should be used for release branches.
GITHUB_APP_APP_ID=$(cat /tmp/secrets/GITHUB_APP_3_APP_ID)
Expand Down
32 changes: 21 additions & 11 deletions .ibm/pipelines/jobs/periodic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ handle_nightly() {

cluster_setup
initiate_deployments
# add_sanity_plugins_check
run_sanity_plugins_check
deploy_test_backstage_provider "${NAME_SPACE}"

run_standard_deployment_tests
run_rds_deployment_tests
# run_runtime_config_change_tests
run_sanity_plugins_check
# run_rds_deployment_tests
run_runtime_config_change_tests

}

Expand Down Expand Up @@ -54,12 +55,21 @@ run_runtime_config_change_tests() {
check_and_test "${RELEASE_NAME}" "${NAME_SPACE_RUNTIME}" "${runtime_url}"
}

add_sanity_plugins_check() {
helm upgrade -i "${RELEASE_NAME}" -n "${NAME_SPACE}" \
"${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" --version "${CHART_VERSION}" \
-f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" \
-f "${DIR}/value_files/sanity-check-plugins.yaml" \
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
--set upstream.backstage.image.repository="${QUAY_REPO}" \
--set upstream.backstage.image.tag="${TAG_NAME}"
run_sanity_plugins_check() {
configure_namespace "${NAME_SPACE_SANITY_PLUGINS_CHECK}"
uninstall_helmchart "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${RELEASE_NAME}"
oc apply -f "$DIR/resources/redis-cache/redis-deployment.yaml" --namespace="${NAME_SPACE_SANITY_PLUGINS_CHECK}"
local sanity_plugins_url="https://${RELEASE_NAME}-backstage-${NAME_SPACE_SANITY_PLUGINS_CHECK}.${K8S_CLUSTER_ROUTER_BASE}"
apply_yaml_files "${DIR}" "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${sanity_plugins_url}"

helm upgrade -i "${RELEASE_NAME}" \
-n "${NAME_SPACE_SANITY_PLUGINS_CHECK}" "${HELM_REPO_NAME}/${HELM_IMAGE_NAME}" \
--version "${CHART_VERSION}" \
-f "${DIR}/value_files/${HELM_CHART_VALUE_FILE_NAME}" \
-f "${DIR}/value_files/sanity-check-plugins.yaml" \
--set global.clusterRouterBase="${K8S_CLUSTER_ROUTER_BASE}" \
--set upstream.backstage.image.repository="${QUAY_REPO}" \
--set upstream.backstage.image.tag="${TAG_NAME}"

check_and_test "${RELEASE_NAME}" "smoke-tests" "${sanity_plugins_url}"
}
4 changes: 4 additions & 0 deletions .ibm/pipelines/openshift-ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ for SCRIPT in "${SCRIPTS[@]}"; do
echo "Loaded ${SCRIPT}"
done

export JOB_NAME=periodic
#export K8S_CLUSTER_URL='https://api.alxdq5slv4a572c9df.eastus.aroapp.io:6443'
#export K8S_CLUSTER_TOKEN=${K8S_CLUSTER_TOKEN_TEMPORARY}

main() {
echo "Log file: ${LOGFILE}"
echo "JOB_NAME : $JOB_NAME"
Expand Down
71 changes: 50 additions & 21 deletions .ibm/pipelines/value_files/sanity-check-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,27 @@ global:
disabled: false
- package: ./dynamic-plugins/dist/roadiehq-backstage-plugin-argo-cd-backend-dynamic
disabled: false
pluginConfig:
argocd:
username: "temp"
password: "temp"
appLocatorMethods:
- type: 'config'
instances:
- name: argoInstance1
url: "temp"
- package: ./dynamic-plugins/dist/roadiehq-scaffolder-backend-argocd-dynamic
disabled: false
disabled: true
pluginConfig:
argocd:
username: "temp"
password: "temp"
appLocatorMethods:
- type: 'config'
instances:
- name: argoInstance1
url: "temp"
token: "temp"
- package: ./dynamic-plugins/dist/roadiehq-backstage-plugin-argo-cd
disabled: false
- package: ./dynamic-plugins/dist/backstage-community-plugin-redhat-argocd
Expand All @@ -30,6 +49,13 @@ global:
disabled: false
- package: ./dynamic-plugins/dist/backstage-community-plugin-jenkins-backend-dynamic
disabled: false
pluginConfig:
jenkins:
instances:
- name: default
baseUrl: 'temp'
username: 'temp'
apiKey: 'temp'
- package: ./dynamic-plugins/dist/backstage-community-plugin-jenkins
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-notifications
Expand All @@ -38,18 +64,27 @@ global:
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-notifications-backend-module-email-dynamic
disabled: false
pluginConfig:
notifications:
processors:
email:
transportConfig:
sender: 'temp'
- package: ./dynamic-plugins/dist/backstage-plugin-signals-backend-dynamic
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-signals
disabled: false
- package: ./dynamic-plugins/dist/backstage-community-plugin-sonarqube-backend-dynamic
disabled: false
- package: ./dynamic-plugins/dist/backstage-community-plugin-sonarqube
disabled: false
pluginConfig:
sonarqube:
baseUrl: 'temp'
apiKey: 'temp'
instances:
- name: default
instanceKey: 'mySonarqube'
baseUrl: 'https://default-sonarqube.example.com'
apiKey: '123456789abcdef0123456789abcedf012'
- package: ./dynamic-plugins/dist/backstage-community-plugin-sonarqube
disabled: false
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-dynamic-home-page
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-techdocs-backend-dynamic
Expand Down Expand Up @@ -100,28 +135,22 @@ global:
authorization: "temp"
- package: ./dynamic-plugins/dist/backstage-community-plugin-3scale-backend-dynamic
disabled: false
pluginConfig:
catalog:
providers:
threeScaleApiEntity:
default:
baseUrl: 'temp'
accessToken: 'temp'
- package: ./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-bitbucket-cloud-dynamic
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-bitbucket-cloud-dynamic
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-scaffolder-backend-module-bitbucket-server-dynamic
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-bitbucket-server-dynamic
disabled: false
pluginConfig:
# https://backstage.io/docs/integrations/bitbucketServer/discovery#configuration
# https://backstage.io/docs/integrations/bitbucketCloud/discovery#configuration
catalog:
providers:
bitbucketServer:
bitbucketCloud:
default: # identifies your ingested dataset
host: 'temp'
schedule:
frequency:
minutes: 30
initialDelay:
minutes: 1
timeout:
minutes: 3
workspace: 'temp'
- package: ./dynamic-plugins/dist/backstage-community-plugin-dynatrace
disabled: false
- package: ./dynamic-plugins/dist/roadiehq-backstage-plugin-jira
Expand Down
1 change: 1 addition & 0 deletions e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"showcase-op-rbac-nightly": "playwright test --project=showcase-operator-rbac",
"showcase-rds-nightly": "playwright test --project=postgres-health-check",
"showcase-runtime": "playwright test --project=showcase-runtime",
"smoke-tests": "playwright test --project=smoke-tests",
"lint:check": "eslint . --ext .js,.ts",
"lint:fix": "eslint . --ext .js,.ts --fix",
"postinstall": "playwright install",
Expand Down
11 changes: 11 additions & 0 deletions e2e-tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,16 @@ export default defineConfig({
...useCommonDeviceAndViewportConfig,
testMatch: ["**/playwright/e2e/configuration-test/config-map.spec.ts"],
},
{
name: "smoke-tests",
...useCommonDeviceAndViewportConfig,
testMatch: [
"**/playwright/e2e-tests/catalog-timestamp.spec.ts",
"**/playwright/e2e-tests/plugins/bulk-import.spec.ts",
"**/playwright/e2e-tests/plugins/http-request.spec.ts",
"**/playwright/e2e-tests/plugins/quick-access-and-tech-radar.spec.ts",
"**/playwright/e2e-tests/plugins/frontend/sidebar.spec.ts",
],
},
],
});
2 changes: 1 addition & 1 deletion e2e-tests/playwright/e2e/audit-log/catalog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UIhelper } from "../../utils/ui-helper";
import { LogUtils } from "./log-utils";
import { CatalogImport } from "../../support/pages/catalog-import";

test.describe.skip("Audit Log check for Catalog Plugin", () => {
test.describe("Audit Log check for Catalog Plugin", () => {
let uiHelper: UIhelper;
let common: Common;
let catalogImport: CatalogImport;
Expand Down
Loading