Skip to content

Commit

Permalink
first pass - ghactions
Browse files Browse the repository at this point in the history
fix docker step

update dockerhub action

update dockerhub action part 2

update dockerhub action part 3

update dockerhub action part 4

update dockerhub action part 5

don't install minikube

use k3d

move commans to deploy file

traefik installed already

where are tests

correct dir, re-add traefik

correct dir, re-add traefik

uninstall traefik

install bats

cleanup

always push to dockerhub

always push to dockerhub
  • Loading branch information
stinkyfingers committed Nov 16, 2021
1 parent 0c14643 commit dbd7b52
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 138 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build, test, and deploy ketch

on: push

jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Go Version
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: Unit Tests
run : |
make install-kubebuilder KUBEBUILDER_INSTALL_DIR=/tmp/kubebuilder
export TEST_ASSET_KUBECTL=/tmp/kubebuilder/bin/kubectl
export TEST_ASSET_KUBE_APISERVER=/tmp/kubebuilder/bin/kube-apiserver
export TEST_ASSET_ETCD=/tmp/kubebuilder/bin/etcd
make test
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
tags: shipasoftware/ketch:${{github.sha}}
push: true
- uses: AbsaOSS/k3d-action@v1.5.0
name: "Create K3D Cluster"
with:
cluster-name: "test-cluster-1"
args: --agents 1
- name: Install Integration Test Dependencies
run: |
# kubebuilder
make install-kubebuilder KUBEBUILDER_INSTALL_DIR=/tmp/kubebuilder
# kustomize
make install-kustomize KUSTOMIZE_INSTALL_DIR=/tmp
export PATH=$PATH:/tmp
# ketch
kubectl cluster-info
make manifests install ketch manager
export PATH=$PATH:$(pwd)/bin
ketch -v
# helm
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh
# cert-manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.3.1/cert-manager.yaml
# traefik
helm repo add traefik https://helm.traefik.io/traefik
helm repo update
helm uninstall traefik -n kube-system
helm install traefik traefik/traefik
# istio
ISTIO_VERSION=1.11.0 && curl -L -k https://istio.io/downloadIstio |ISTIO_VERSION=1.11.0 sh - && cd istio-$ISTIO_VERSION && ./bin/istioctl install --set profile=demo -y
cd ../
# nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx
# wait for containers
kubectl wait --for=condition=Ready=true pod -n cert-manager --all
kubectl get pods -A
# install bats
sudo apt-get update -yq && sudo apt-get install bats -y
- name: Run Integration Tests
run: |
cli_tests/app.sh
cli_tests/job.sh
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions cli_tests/install_bats.sh

This file was deleted.

51 changes: 0 additions & 51 deletions cli_tests/install_ketch.sh

This file was deleted.

7 changes: 0 additions & 7 deletions cli_tests/install_kubectl.sh

This file was deleted.

17 changes: 0 additions & 17 deletions cli_tests/install_minikube.sh

This file was deleted.

0 comments on commit dbd7b52

Please sign in to comment.