mirror of https://github.com/fluxcd/flux2.git
Add e2e tests for install command
parent
403a0f2882
commit
35163fa9eb
@ -0,0 +1,6 @@
|
||||
FROM giantswarm/tiny-tools
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
@ -0,0 +1,9 @@
|
||||
name: 'kustomize'
|
||||
description: 'A GitHub Action to run kustomize commands'
|
||||
author: 'Stefan Prodan'
|
||||
branding:
|
||||
icon: 'command'
|
||||
color: 'blue'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
@ -0,0 +1,12 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
VERSION=3.5.4
|
||||
curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${VERSION}/kustomize_v${VERSION}_linux_amd64.tar.gz | tar xz
|
||||
|
||||
mkdir -p $GITHUB_WORKSPACE/bin
|
||||
cp ./kustomize $GITHUB_WORKSPACE/bin
|
||||
chmod +x $GITHUB_WORKSPACE/bin/kustomize
|
||||
ls -lh $GITHUB_WORKSPACE/bin
|
||||
|
||||
echo "::add-path::$GITHUB_WORKSPACE/bin"
|
||||
echo "::add-path::$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin"
|
@ -0,0 +1,46 @@
|
||||
name: e2e
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
kind:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Restore Go cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2-beta
|
||||
with:
|
||||
go-version: 1.14.x
|
||||
- name: Setup Kubernetes
|
||||
uses: engineerd/setup-kind@v0.3.0
|
||||
- name: Setup Kustomize
|
||||
uses: ./.github/actions/kustomize
|
||||
- name: Run test
|
||||
run: make test
|
||||
- name: Check if working tree is dirty
|
||||
run: |
|
||||
if [[ $(git diff --stat) != '' ]]; then
|
||||
echo 'run make test and commit changes'
|
||||
exit 1
|
||||
fi
|
||||
- name: Build
|
||||
run: sudo go build -o ./bin/tk ./cmd/tk
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
./bin/tk install --manifests ./manifests/install/
|
||||
- name: Debug failure
|
||||
if: failure()
|
||||
run: |
|
||||
kubectl -n gitops-system get all
|
@ -1,2 +1,9 @@
|
||||
# toolkit
|
||||
Experimental toolkit for assembling CD pipelines
|
||||
|
||||
[![e2e](https://github.com/fluxcd/toolkit/workflows/e2e/badge.svg)](https://github.com/fluxcd/toolkit/actions)
|
||||
|
||||
Experimental toolkit for assembling CD pipelines.
|
||||
|
||||
Components:
|
||||
* [source-controller](https://github.com/fluxcd/source-controller)
|
||||
* [kustomize-controller](https://github.com/fluxcd/kustomize-controller)
|
||||
|
Loading…
Reference in New Issue