Skip to content

Commit bd333cf

Browse files
committed
Merge branch 'main' of github.com:catenax-ng/tx-traceability-foss-frontend into TRACEFOSS-565-docker
2 parents 8483eab + 7c27353 commit bd333cf

File tree

54 files changed

+198
-217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+198
-217
lines changed

.github/workflows/docker-image-for-branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
uses: docker/build-push-action@v4
3131
with:
3232
push: true
33-
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }} , ${{ env.REGISTRY }}/${{ github.repository }}:fe_context
33+
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.event.pull_request.head.sha }}
Lines changed: 79 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
name: E2E Tests
1+
# Require to set secrets:
2+
# - ORG_IRS_JIRA_USERNAME
3+
# - ORG_IRS_JIRA_PASSWORD
4+
name: E2E Tests - Xray
25

36
on:
7+
# triggered manually by Test Manager
8+
workflow_dispatch:
9+
inputs:
10+
jira_filter_id:
11+
description: 'Jira filter ID to fetch test scenarios'
12+
required: false
13+
# by default, we use this filter: https://jira.catena-x.net/issues/?filter=11645
14+
default: 11645
15+
# or automatically by merge to main
416
push:
517
branches: [ main ]
18+
# or in PR
619
pull_request:
720

821
jobs:
922
install:
1023
runs-on: ubuntu-latest
11-
container:
12-
# if you need to change image please make sure use the same version in all places
13-
# (here and in cypress/Dockerfile)
14-
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
15-
options: --user 1001
16-
1724
# Install YARN dependencies, cache them correctly
1825
steps:
1926
- name: Checkout
@@ -29,10 +36,28 @@ jobs:
2936
with:
3037
cmd: install # will run `yarn install` command
3138

39+
# Fetch feature files
40+
- name: Fetch .feature files from Jira Xray
41+
env:
42+
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
43+
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
44+
JIRA_FILTER_ID: ${{ github.event.inputs.jira_filter_id }}
45+
run: |
46+
./scripts/xray-download-feature-files.sh
47+
48+
- name: Save cypress/e2e folder
49+
uses: actions/upload-artifact@v3
50+
with:
51+
name: cypress - e2e
52+
if-no-files-found: error
53+
path: cypress/e2e
54+
3255
cypress-run-chrome:
3356
timeout-minutes: 15
3457
runs-on: ubuntu-latest
3558
container:
59+
# if you need to change image please make sure use the same version in all places
60+
# (here and in cypress/Dockerfile)
3661
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
3762
options: --user 1001
3863
needs: install
@@ -41,6 +66,12 @@ jobs:
4166
- name: Checkout
4267
uses: actions/checkout@v3
4368

69+
- name: Download the cypress/e2e folder
70+
uses: actions/download-artifact@v3
71+
with:
72+
name: cypress - e2e
73+
path: cypress/e2e
74+
4475
- name: Use Node.js 18.x
4576
uses: actions/setup-node@v3
4677
with:
@@ -54,6 +85,15 @@ jobs:
5485
wait-on-timeout: 120
5586
browser: chrome
5687

88+
- name: Submit results to Xray
89+
# we don't want to submit results to xray when it was run by PR
90+
if: github.event_name != 'pull_request' && (success() || failure())
91+
env:
92+
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
93+
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
94+
run: |
95+
./scripts/xray-push-test-results.sh
96+
5797
- name: Archive cypress artifacts
5898
if: success() || failure()
5999
uses: actions/upload-artifact@v3
@@ -67,6 +107,8 @@ jobs:
67107
timeout-minutes: 15
68108
runs-on: ubuntu-latest
69109
container:
110+
# if you need to change image please make sure use the same version in all places
111+
# (here and in cypress/Dockerfile)
70112
image: cypress/browsers:node16.16.0-chrome107-ff107-edge
71113
options: --user 1001
72114
needs: install
@@ -75,6 +117,12 @@ jobs:
75117
- name: Checkout
76118
uses: actions/checkout@v3
77119

120+
- name: Download the cypress/e2e folder
121+
uses: actions/download-artifact@v3
122+
with:
123+
name: cypress - e2e
124+
path: cypress/e2e
125+
78126
- name: Use Node.js 18.x
79127
uses: actions/setup-node@v3
80128
with:
@@ -88,6 +136,15 @@ jobs:
88136
wait-on-timeout: 120
89137
browser: firefox
90138

139+
- name: Submit results to Xray
140+
# we don't want to submit results to xray when it was run by PR
141+
if: github.event_name != 'pull_request' && (success() || failure())
142+
env:
143+
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
144+
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
145+
run: |
146+
./scripts/xray-push-test-results.sh
147+
91148
- name: Archive cypress artifacts
92149
if: success() || failure()
93150
uses: actions/upload-artifact@v3
@@ -106,6 +163,12 @@ jobs:
106163
- name: Checkout
107164
uses: actions/checkout@v3
108165

166+
- name: Download the cypress/e2e folder
167+
uses: actions/download-artifact@v3
168+
with:
169+
name: cypress - e2e
170+
path: cypress/e2e
171+
109172
# commented because if we use it here, we face with that problem:
110173
# "http://localhost:4200 timed out on retry 151 of 5, elapsed 150449ms, limit 150000ms
111174
# Error: connect ECONNREFUSED 127.0.0.1:4200"
@@ -132,6 +195,15 @@ jobs:
132195
wait-on-timeout: 120
133196
browser: webkit
134197

198+
- name: Submit results to Xray
199+
# we don't want to submit results to xray when it was run by PR
200+
if: github.event_name != 'pull_request' && (success() || failure())
201+
env:
202+
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
203+
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
204+
run: |
205+
./scripts/xray-push-test-results.sh
206+
135207
- name: Archive cypress artifacts
136208
if: success() || failure()
137209
uses: actions/upload-artifact@v3

.github/workflows/veracode.yaml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
appname: "Traceability-Foss-Frontend"
3030
createprofile: false
3131
filepath: "./veracode-scan-target.zip"
32-
vid: "${{ secrets.ORG_VERACODE_API_ID }}"
33-
vkey: "${{ secrets.ORG_VERACODE_API_KEY }}"
32+
vid: '${{ secrets.VERACODE_API_ID || secrets.ORG_VERACODE_API_ID }}'
33+
vkey: '${{ secrets.VERACODE_API_KEY || secrets.ORG_VERACODE_API_KEY }}'

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ testem.log
3636
/typings
3737
/audit-reports
3838
src/tests/test-report.xml
39-
cypress/videos
40-
cypress/screenshots
4139

4240
# e2e
43-
/e2e/*.js
44-
/e2e/*.map
41+
cypress/videos
42+
cypress/screenshots
43+
cypress/reports/*
44+
cucumber-messages.ndjson
4545

4646
# System Files
4747
.DS_Store

INSTALL.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Support environment variables are:
66
const ENV_VARS_MAPPING = {
77
CATENAX_PORTAL_KEYCLOAK_URL: 'keycloakUrl',
88
CATENAX_PORTAL_CLIENT_ID: 'clientId',
9-
CATENAX_PORTAL_DEFAULT_REALM: 'defaultRealm',
10-
CATENAX_PORTAL_REALM_LOGO: 'realmLogo',
119
CATENAX_PORTAL_API_URL: 'apiUrl',
1210
CATENAX_PORTAL_BASE_URL: 'baseUrl',
1311
CATENAX_PORTAL_BACKEND_DOMAIN,
@@ -20,12 +18,6 @@ This variable is used to set up and use keycloak
2018
`CATENAX_PORTAL_CLIENT_ID`
2119
This variable is used to identify the client on keycloak
2220

23-
`CATENAX_PORTAL_DEFAULT_REALM`
24-
This variable is used the set de default realm of the application
25-
26-
`CATENAX_PORTAL_REALM_LOGO`
27-
This variable is used to replace the logo on the application
28-
2921
`CATENAX_PORTAL_API_URL`
3022
This variable points to the desired api
3123

@@ -131,7 +123,7 @@ To start a container in detached mode, you use `-d=true` or just `-d` option. By
131123

132124
To expose a container’s internal port, an operator can start the container with the `-P` or `-p` flag. The exposed port is accessible on the host and the ports are available to any client that can reach the host.
133125

134-
#### `-e ***`
126+
#### `-e ENV_VAR=VAR_VALUE`
135127

136128
The operator can set any environment variable in the container by using one or more `-e` flags, even overriding already defined flags by the developer with a Dockerfile `ENV`.
137129

angular.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@
9999
}
100100
]
101101
},
102+
"localBackendNoAuth": {
103+
"fileReplacements": [
104+
{
105+
"replace": "src/environments/environment.ts",
106+
"with": "src/environments/environment.localBackendNoAuth.ts"
107+
}
108+
]
109+
},
102110
"production": {
103111
"fileReplacements": [
104112
{
@@ -154,6 +162,9 @@
154162
"localBackend": {
155163
"browserTarget": "trace-x:build:dev,localBackend"
156164
},
165+
"localBackendNoAuth": {
166+
"browserTarget": "trace-x:build:dev,localBackendNoAuth"
167+
},
157168
"production": {
158169
"browserTarget": "trace-x:build:production"
159170
},

charts/traceability-foss-frontend/templates/deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@ spec:
4949
value: "{{ .Values.image.CATENAX_PORTAL_KEYCLOAK_URL }}"
5050
- name: CATENAX_PORTAL_CLIENT_ID
5151
value: "{{ .Values.image.CATENAX_PORTAL_CLIENT_ID }}"
52-
- name: CATENAX_PORTAL_DEFAULT_REALM
53-
value: "{{ .Values.image.CATENAX_PORTAL_DEFAULT_REALM }}"
5452
- name: CATENAX_PORTAL_BASE_URL
5553
value: "{{ .Values.image.CATENAX_PORTAL_BASE_URL }}"
56-
- name: CATENAX_PORTAL_REALM_LOGO
57-
value: "{{ .Values.image.CATENAX_PORTAL_REALM_LOGO }}"
5854
- name: CATENAX_PORTAL_BACKEND_DOMAIN
5955
value: "{{ .Values.image.CATENAX_PORTAL_BACKEND_DOMAIN }}"
6056
ports:

charts/traceability-foss-frontend/values-dev-test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ image:
33
tag: $ARGOCD_APP_REVISION
44
CATENAX_PORTAL_API_URL: 'https://traceability-test.dev.demo.catena-x.net/api'
55
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.dev.demo.catena-x.net/auth'
6-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
7-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
86
CATENAX_PORTAL_BACKEND_DOMAIN: 'catena-x.net'
97

108
nameOverride: "traceability-foss-test-frontend"

charts/traceability-foss-frontend/values-dev.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ image:
22
tag: $ARGOCD_APP_REVISION
33
CATENAX_PORTAL_API_URL: 'https://traceability.dev.demo.catena-x.net/api'
44
CATENAX_PORTAL_KEYCLOAK_URL: 'https://centralidp.dev.demo.catena-x.net/auth'
5-
CATENAX_PORTAL_CLIENT_ID: 'Cl17-CX-Part'
6-
CATENAX_PORTAL_DEFAULT_REALM: 'CX-Central'
75
CATENAX_PORTAL_BACKEND_DOMAIN: 'catena-x.net'
86

97
ingress:

0 commit comments

Comments
 (0)