Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
599c2be
umbrella Sandbox
mgarciaLKS Feb 17, 2025
a9a4086
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Feb 17, 2025
0dbc057
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Feb 17, 2025
23cae34
prettier
mgarciaLKS Feb 17, 2025
506b850
umbrella sandbox after build completed
mgarciaLKS Feb 17, 2025
955fbe8
Update build.yml
mgarciaLKS Feb 17, 2025
38dfb03
build pretty
mgarciaLKS Feb 17, 2025
c5be070
Update build.yml
mgarciaLKS Feb 17, 2025
6223efd
execute after build
mgarciaLKS Feb 17, 2025
9956573
Merge branch 'umbrella-Sandbox' of https://github.com/mgarciaLKS/port…
mgarciaLKS Feb 17, 2025
8d36e6d
execute after build
mgarciaLKS Feb 17, 2025
fe2a4e5
umbrella execute after build
mgarciaLKS Feb 24, 2025
10d7021
updated to run after build
mgarciaLKS Feb 24, 2025
288e518
updated to run after build
mgarciaLKS Feb 24, 2025
80ea40a
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
781e4fd
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
df62fe0
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
2cdfbc2
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
784c5c5
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
8e496ba
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
3f9785f
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 6, 2025
739d66f
Merge branch 'eclipse-tractusx:main' into umbrella-Sandbox
mgarciaLKS Mar 13, 2025
4296e75
Update Umbrella_Sandbox_Setup.yml
mgarciaLKS Mar 13, 2025
59d49e6
Update build.yml
mgarciaLKS Mar 13, 2025
4e591d1
Enable Ingress In umbrella Sandbox
mgarciaLKS Mar 14, 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
107 changes: 107 additions & 0 deletions .github/workflows/Umbrella_Sandbox_Setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
###############################################################
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
###############################################################

name: Umbrella Sandbox Setup
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: Umbrella Sandbox Setup
name: E2E Testing (Umbrella Sandbox)

Please also rename file to e2e-tests.yml


on:
#for testing purpouses
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove comment

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove comment

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove comment

pull_request:
branches:
- 'main'
Comment on lines +25 to +26
Copy link
Contributor

Choose a reason for hiding this comment

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

we should restrict the triggering of the workflow to only when really needed (it runs about 6 minutes or longer and otherwise just waste resources)

Suggested change
branches:
- 'main'
branches:
- 'main'
paths:
- 'src/**'

push:
branches:
- 'main'
Comment on lines +27 to +29
Copy link
Contributor

Choose a reason for hiding this comment

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

we should restrict the triggering of the workflow to only when really needed (it runs about 6 minutes or longer and otherwise just waste resources)

Suggested change
push:
branches:
- 'main'

workflow_dispatch:

jobs:
setup-sandbox:
runs-on: ubuntu-latest
env:
NODE_IMAGE: ${{ github.event.inputs.node_image || 'kindest/node:v1.27.3' }}
HELM_VERSION: ${{ github.event.inputs.helm_version || 'latest' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@0ad70e2299366b0e1552c7240f4e4567148f723e
with:
version: v0.20.0
node_image: ${{ env.NODE_IMAGE }}

- name: Enable Ingress in KinD
run: |
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s
- name: Verify Cluster
run: |
kubectl cluster-info
kubectl get nodes -o wide
- name: Set up Helm
uses: azure/[email protected]
with:
version: ${{ env.HELM_VERSION }}

- name: Build portal frontend
uses: docker/[email protected]
with:
context: .
file: ./.conf/Dockerfile.full
push: true
tags: kind-registry:5000/portal-frontend:testing

- name: Add Tractus-X Helm Repository
run: |
helm repo add tractusx-dev https://eclipse-tractusx.github.io/charts/dev
helm repo update
- name: Install Umbrella Chart Portal Subset
run: |
helm install \
--set portal.enabled=true,centralidp.enabled=true,sharedidp.enabled=true umbrella tractusx-dev/umbrella \
--set portal.frontend.image.repository=kind-registry:5000/portal-frontend --set portal.frontend.image.tag=testing \
--namespace umbrella --create-namespace
Copy link
Contributor

@evegufy evegufy Mar 20, 2025

Choose a reason for hiding this comment

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

Please add this, otherwise we try to start testing and the keycloak realms and/or the portal db migrations are not ready yet

Suggested change
--namespace umbrella --create-namespace
--namespace umbrella --create-namespace \
-- wait --wait-for-jobs

- name: Verify Deployment
run: |
kubectl get pods -n umbrella
helm ls --namespace umbrella
- name: Install Node.js for Cypress
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Install Cypress Dependencies
run: |
npm install cypress --legacy-peer-deps
Comment on lines +98 to +100
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is ready to execute the cypress tests yet, right? could you please have a look at the cypress docs to gh actions

As I mentioned in the last portal sync, I assume that all the addresses in umbrella for portal, centralidp and sharedidp will be needed to be overwritten to the k8s cluster internal services, example, because the ingress isn't enabled with the gh actions k8s cluster.

- name: Cleanup Resources
if: always()
run: |
helm uninstall umbrella --namespace umbrella || true
kubectl delete namespace umbrella || true
kind delete cluster || true
25 changes: 0 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,3 @@ jobs:
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
readme-filepath: '.conf/docker-notice-portal.md'
Copy link
Contributor

Choose a reason for hiding this comment

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

please undo changes to build.yml


auth-and-dispatch:
needs: build-and-push-image
runs-on: ubuntu-latest

steps:
- name: Get token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@8e4e6fbf6fcc8a272781d97597969d21b3812974 # v4.0.0
with:
application_id: ${{ secrets.ORG_PORTAL_DISPATCH_APPID }}
application_private_key: ${{ secrets.ORG_PORTAL_DISPATCH_KEY }}

- name: Trigger workflow
id: call_action
env:
TOKEN: ${{ steps.get_workflow_token.outputs.token }}
run: |
curl -v \
--request POST \
--url https://api.github.com/repos/eclipse-tractusx/portal/actions/workflows/portal-image-update.yml/dispatches \
--header "authorization: Bearer $TOKEN" \
--header "Accept: application/vnd.github.v3+json" \
--data '{"ref":"main", "inputs": { "new-image":"${{ github.sha }}" }}' \
--fail
Loading