Skip to content

Che 22364 origin

Che 22364 origin #72

#
# Copyright (c) 2019-2021 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 udi8
on:
pull_request:
paths-ignore:
- '**/*.md'
- .devfile.yaml
- LICENSE
- '.rebase/*'
env:
USERSTORY: CloneGitRepoAPI
TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL: kubectl
DEPLOYMENT_TIMEOUT: 90s
jobs:
workspace-api-tests-on-minikube:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@master
# - name: Login to Quay
# uses: docker/login-action@v1
# with:
# registry: quay.io
# username: ${{ secrets.QUAY_USERNAME }}
# password: ${{ secrets.QUAY_PASSWORD }}
- name: Get PR number
id: get_pr_number
run: |
pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV
# - name: Build base image
# run: |
# cd base/ubi8 && docker buildx build --platform linux/amd64 -t quay.io/devfile/base-developer-image:${{ env.PR_NUMBER }} .
# - name: Build universal image
# run: |
# cd universal/ubi8 && docker buildx build --platform linux/amd64 -t quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }} .
# - name: Archive base image to tar
# run: |
# docker save quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }} | gzip > universal-developer-image${{ env.PR_NUMBER }}.tar.gz
# docker rmi quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }}
# docker rmi quay.io/devfile/base-developer-image:${{ env.PR_NUMBER }}
# - name: Download and archive image
# run: |
# docker pull quay.io/devfile/universal-developer-image:93
# docker save quay.io/devfile/universal-developer-image:93 | gzip > universal-developer-image.tar.gz
# docker rmi quay.io/devfile/universal-developer-image:93
# - name: Start minikube cluster
# id: run-minikube
# uses: che-incubator/setup-minikube-action@next
# with:
# minikube-version: v1.30.1
# - 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: Pre-pull image on minikube
# run: |
# minikube image load universal-developer-image${{ env.PR_NUMBER }}.tar.gz
# rm universal-developer-image${{ env.PR_NUMBER }}.tar.gz
# minikube image list
# - name: Pre-pull image on minikube
# run: |
# df -H --output=size,used,avail
# minikube image load universal-developer-image.tar.gz
# sleep 20
# rm universal-developer-image.tar.gz
# minikube stop
# minikube start
# minikube image list --format table
# - name: Install NodeJs
# uses: actions/setup-node@v3
# - name: Checkout tests codebase
# uses: actions/checkout@master
# with:
# ref: api-test-with-clone-project-without-generating
# repository: eclipse/che
# path: che
# - name: Run Empty workspace smoke test
# run: |
# export TS_API_TEST_UDI_IMAGE=quay.io/devfile/universal-developer-image:${{ env.PR_NUMBER }}
# export TS_API_TEST_CHE_CODE_EDITOR_DEVFILE_URI=https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml
# cd che/tests/e2e
# npm i
# npm run driver-less-test