Skip to content

Commit

Permalink
Happy Path using github actions
Browse files Browse the repository at this point in the history
Check with each change on the plug-in registry
And check with both Alpine and UBI8 images

Change-Id: I1b3a01712e45dfd35cc5a8ee94b2ac4ba51e22d5
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
  • Loading branch information
benoitf committed Jan 18, 2021
1 parent 2b98722 commit 0f0faca
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/happy-path.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#
# 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: [push, pull_request]

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 }}

0 comments on commit 0f0faca

Please sign in to comment.