Minimal level-triggered controller #51
Workflow file for this run
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
name: e2e | |
on: | |
pull_request: | |
paths-ignore: | |
# https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | |
- "docs/**" | |
- "hack/**" | |
- "*.md" | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
e2e: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup | Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
- name: Setup | Kubernetes Cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
version: v0.18.0 | |
cluster_name: pipeline-controller | |
node_image: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | |
- name: Setup | Flux | |
uses: fluxcd/flux2/action@main | |
with: | |
version: 0.41.2 | |
- name: Prepare | Go # .netrc is used by docker-build, ~/.netrc is used by go test | |
run: echo "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" | tee ~/.netrc .netrc | |
- name: Prepare | Kubernetes Cluster | |
run: | | |
echo "Create flux-system namespace" | |
kubectl create namespace flux-system | |
echo "Adding GitHub promotion credentials" | |
kubectl create secret generic -n flux-system github-promotion-credentials \ | |
--from-literal="username=${{ secrets.PROMOTION_GITHUB_USERNAME }}" \ | |
--from-literal="password=${{ secrets.PROMOTION_GITHUB_TOKEN }}" \ | |
--from-literal="token=${{ secrets.PROMOTION_GITHUB_TOKEN }}" | |
echo "Adding GitLab promotion credentials" | |
kubectl create secret generic -n flux-system gitlab-promotion-credentials \ | |
--from-literal="username=${{ secrets.PROMOTION_GITLAB_USERNAME }}" \ | |
--from-literal="password=${{ secrets.PROMOTION_GITLAB_TOKEN }}" \ | |
--from-literal="token=${{ secrets.PROMOTION_GITLAB_TOKEN }}" | |
- name: Run E2E tests | |
run: make e2e |