-
Notifications
You must be signed in to change notification settings - Fork 69
Add UBI10 support for UDI with updated tool versions #246
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
+1,249
−282
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
383e9b3
feat: add UBI10 support for UDI with updated tool versions
akurinnoy 9d161f2
chore: make the markdown linter happy
akurinnoy f3217d3
chore: enable UBI10 UDI builds and add smoke test workflow
akurinnoy 6e70d37
chore: push base image to registry; update smoke tests to pull images
akurinnoy 40ce53d
fixup! chore: push base image to registry; update smoke tests to pull…
akurinnoy b124acb
fixup! fixup! chore: push base image to registry; update smoke tests …
akurinnoy 082a26a
fixup! fixup! fixup! chore: push base image to registry; update smoke…
akurinnoy 1be0bcf
fixup! fixup! fixup! fixup! chore: push base image to registry; updat…
akurinnoy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
257 changes: 257 additions & 0 deletions
257
.github/workflows/empty-worksapce-smoke-test-on-minikube-ubi10.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,257 @@ | ||
| # | ||
| # Copyright (c) 2019-2025 Red Hat, Inc. | ||
| # This program and the accompanying materials are made | ||
| # available under the terms of the Eclipse Public License 2.0 | ||
| # which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
| # | ||
| # SPDX-License-Identifier: EPL-2.0 | ||
| # | ||
| # Contributors: | ||
| # Red Hat, Inc. - initial API and implementation | ||
| # | ||
|
|
||
| name: Empty workspace smoke test on udi10 | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Pull Request Check UBI 10"] | ||
| types: | ||
| - completed | ||
| branches: | ||
| - '**' | ||
|
|
||
| env: | ||
| # Use repository variable if set, otherwise fallback to default registry | ||
| REGISTRY: ${{ vars.REGISTRY || 'quay.io/devfile' }} | ||
| USERSTORY: CloneGitRepoAPI | ||
| TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL: kubectl | ||
| DEPLOYMENT_TIMEOUT: 90s | ||
| PULL_POLICY: IfNotPresent | ||
|
|
||
| jobs: | ||
| workspace-api-tests-on-minikube: | ||
| if: github.event.workflow_run.conclusion == 'success' | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| runners: ['ubuntu-22.04', 'ubuntu-22.04-arm'] | ||
| runs-on: ${{matrix.runners}} | ||
| steps: | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@master | ||
| - name: Free runner space | ||
| run: | | ||
| sudo rm -rf /usr/local/lib/android | ||
| - name: Get PR number | ||
| id: get_pr_number | ||
| run: | | ||
| pr_number="${{ github.event.workflow_run.pull_requests[0].number }}" | ||
| if [ -z "$pr_number" ] || [ "$pr_number" == "null" ]; then | ||
| pr_number=$(echo "${{ github.event.workflow_run.head_branch }}" | grep -oE '[0-9]+' | head -1 || echo "") | ||
| fi | ||
| if [ -z "$pr_number" ]; then | ||
| echo "Error: Could not extract PR number from workflow_run event" | ||
| exit 1 | ||
| fi | ||
| echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV | ||
| echo ">>>>>>>>>>>$pr_number" | ||
|
|
||
| - name: Cleanup build-in images | ||
| run: | | ||
| # remove build-in images from the VM because it is not used | ||
| docker rmi -f $(docker images -aq) | ||
|
|
||
| - name: Set arch environment variable | ||
| run: | | ||
| if [[ ${{matrix.runners}} == 'ubuntu-22.04' ]]; then | ||
| echo arch="amd64" >> $GITHUB_ENV | ||
| else | ||
| echo arch="arm64" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Start minikube cluster | ||
| run: | | ||
| curl -LO https://github.com/kubernetes/minikube/releases/latest/download/minikube-linux-${{env.arch}} | ||
| install minikube-linux-${{env.arch}} /usr/local/bin/minikube && rm minikube-linux-${{env.arch}} | ||
| minikube start --vm-driver=docker --addons=ingress --cpus 2 --memory 6500 | ||
|
|
||
| - name: Login to Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
|
|
||
| - name: Pull UDI image into minikube | ||
| run: | | ||
| eval $(minikube docker-env) | ||
| docker pull ${{ env.REGISTRY }}/universal-developer-image:${{env.arch}}-ubi10-pr-${{ env.PR_NUMBER }} | ||
| docker tag ${{ env.REGISTRY }}/universal-developer-image:${{env.arch}}-ubi10-pr-${{ env.PR_NUMBER }} ${{ env.REGISTRY }}/universal-developer-image:ubi10-pr-${{ env.PR_NUMBER }} | ||
|
|
||
| - name: Checkout DWO | ||
| uses: actions/checkout@master | ||
| with: | ||
| repository: devfile/devworkspace-operator | ||
| path: devworkspace-operator | ||
|
|
||
| - name: Setup cert manager | ||
| run: | | ||
| cd devworkspace-operator | ||
| make install_cert_manager | ||
| kubectl wait deployment -n cert-manager cert-manager --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | ||
| kubectl wait deployment -n cert-manager cert-manager-cainjector --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | ||
| kubectl wait deployment -n cert-manager cert-manager-webhook --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | ||
|
|
||
| - name: Setup DWO | ||
| run: | | ||
| cd devworkspace-operator | ||
| make install | ||
| kubectl rollout status deployment -n devworkspace-controller devworkspace-controller-manager --timeout=$DEPLOYMENT_TIMEOUT | ||
| kubectl rollout status deployment -n devworkspace-controller devworkspace-webhook-server --timeout=$DEPLOYMENT_TIMEOUT | ||
| kubectl wait deployment -n devworkspace-controller devworkspace-webhook-server --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | ||
| kubectl wait deployment -n devworkspace-controller devworkspace-controller-manager --for condition=Available=True --timeout=$DEPLOYMENT_TIMEOUT | ||
|
|
||
| - name: Check that UDI is present in the image list | ||
| run: | | ||
| minikube image list --format table | ||
|
|
||
| - name: Install NodeJs | ||
| uses: actions/setup-node@v4 | ||
|
|
||
| - name: Checkout tests codebase | ||
| uses: actions/checkout@master | ||
| with: | ||
| ref: api-test-with-clone-project-without-generating | ||
| repository: eclipse/che | ||
| path: che | ||
|
|
||
| # Host devfile locally. | ||
| # Use the insiders tag for the che-code image and the PR number for the universal-developer-image | ||
| - name: Host devfile locally | ||
| run: | | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: devfile.yaml | ||
| data: | ||
| devfile.yaml: | | ||
| schemaVersion: 2.2.2 | ||
| metadata: | ||
| name: che-code | ||
| commands: | ||
| - id: init-container-command | ||
| apply: | ||
| component: che-code-injector | ||
| - id: init-che-code-command | ||
| exec: | ||
| component: che-code-runtime-description | ||
| commandLine: nohup /checode/entrypoint-volume.sh > /checode/entrypoint-logs.txt 2>&1 & | ||
| events: | ||
| preStart: | ||
| - init-container-command | ||
| postStart: | ||
| - init-che-code-command | ||
| components: | ||
| - name: che-code-injector | ||
| container: | ||
| image: quay.io/che-incubator/che-code:insiders | ||
| command: | ||
| - /entrypoint-init-container.sh | ||
| volumeMounts: | ||
| - name: checode | ||
| path: /checode | ||
| memoryLimit: 256Mi | ||
| memoryRequest: 32Mi | ||
| cpuLimit: 500m | ||
| cpuRequest: 30m | ||
| - name: che-code-runtime-description | ||
| container: | ||
| image: ${{ env.REGISTRY }}/universal-developer-image:ubi10-pr-${{ env.PR_NUMBER }} | ||
| memoryLimit: 1024Mi | ||
| memoryRequest: 256Mi | ||
| cpuLimit: 500m | ||
| cpuRequest: 30m | ||
| volumeMounts: | ||
| - name: checode | ||
| path: /checode | ||
| endpoints: | ||
| - name: che-code | ||
| attributes: | ||
| type: main | ||
| cookiesAuthEnabled: true | ||
| discoverable: false | ||
| urlRewriteSupported: true | ||
| targetPort: 3100 | ||
| exposure: public | ||
| secure: true | ||
| protocol: https | ||
| - name: code-redirect-1 | ||
| targetPort: 13131 | ||
| exposure: public | ||
| protocol: https | ||
| attributes: | ||
| discoverable: false | ||
| urlRewriteSupported: false | ||
| - name: code-redirect-2 | ||
| targetPort: 13132 | ||
| exposure: public | ||
| protocol: https | ||
| attributes: | ||
| discoverable: false | ||
| urlRewriteSupported: false | ||
| - name: code-redirect-3 | ||
| targetPort: 13133 | ||
| exposure: public | ||
| protocol: https | ||
| attributes: | ||
| discoverable: false | ||
| urlRewriteSupported: false | ||
| attributes: | ||
| app.kubernetes.io/component: che-code-runtime | ||
| app.kubernetes.io/part-of: che-code.eclipse.org | ||
| controller.devfile.io/container-contribution: true | ||
| - name: checode | ||
| volume: {} | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: file-server | ||
| labels: | ||
| app: file-server | ||
| spec: | ||
| containers: | ||
| - name: nginx-container | ||
| image: nginx | ||
| ports: | ||
| - containerPort: 80 | ||
| volumeMounts: | ||
| - name: server-volume | ||
| mountPath: /usr/share/nginx/html | ||
| readOnly: true | ||
| volumes: | ||
| - name: server-volume | ||
| configMap: | ||
| name: devfile.yaml | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: file-service | ||
| spec: | ||
| selector: | ||
| app: file-server | ||
| ports: | ||
| - protocol: TCP | ||
| port: 80 | ||
| targetPort: 80 | ||
| EOF | ||
|
|
||
| - name: Run Empty workspace smoke test | ||
| run: | | ||
| export TS_API_TEST_UDI_IMAGE=${{ env.REGISTRY }}/universal-developer-image:ubi10-pr-${{ env.PR_NUMBER }} | ||
| export TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI=http://file-service.default.svc:80/devfile.yaml | ||
| cd che/tests/e2e | ||
| npm i | ||
| npm run driver-less-test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.