diff --git a/.github/workflows/happy-path.yaml b/.github/workflows/happy-path.yaml new file mode 100644 index 0000000000..7f34fa7b75 --- /dev/null +++ b/.github/workflows/happy-path.yaml @@ -0,0 +1,66 @@ +# +# Copyright (c) 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 +# + +# che-plugin-registry Happy Path workflow +# matrix jobs with alpine and ubi8 +name: Happy Path + +on: + pull_request: + paths: + - '.github/workflows/happy-path.yaml' + - '!sidecars/**' + push: + paths: + - '.github/workflows/happy-path.yaml' + - '!sidecars/**' + +jobs: + image-build: + strategy: + matrix: + dist: ['alpine', 'rhel'] + runs-on: ubuntu-20.04 + steps: + - name: Clone source code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: image-build + run: | + if [[ "${{matrix.dist}}" == "alpine" ]]; then + docker pull quay.io/eclipse/che-plugin-registry:nightly + docker build --cache-from=quay.io/eclipse/che-plugin-registry:nightly -t che-plugin-registry-image -f ./build/dockerfiles/Dockerfile --target registry . + elif [[ "${{matrix.dist}}" == "rhel" ]]; then + docker build -t che-plugin-registry-image -f ./build/dockerfiles/rhel.Dockerfile --target registry . + fi + # save locally built image + docker save -o docker-image.tar che-plugin-registry-image:latest + - name: Start minikube + id: run-minikube + uses: che-incubator/setup-minikube-action@next + - name: load-image-minikube-registry + id: load-image-minikube-registry + run: | + # load image in the docker registry + eval $(minikube docker-env) + docker load --input=docker-image.tar + # display images + docker images + - name: Deploy Eclipse Che + id: deploy-che + uses: che-incubator/che-deploy-action@next + with: + # use custom image built by this PR + plugin-registry-image: che-plugin-registry-image:latest + - name: Run Happy Path tests + id: run-happy-path-tests + uses: che-incubator/happy-path-tests-action@next + with: + che-url: ${{ steps.deploy-che.outputs.che-url }}