-
Notifications
You must be signed in to change notification settings - Fork 111
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
[SHIPA-2130] Port CI to Github Actions from Travis #194
Merged
+84
−138
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
This file contains 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,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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can also do
helm install --wait --timeout=5m ingress-nginx ingress-nginx/ingress-nginx