-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from weaveworks/173-e2e-ci
ci: Run e2e test on PRs and merges to main
- Loading branch information
Showing
8 changed files
with
75 additions
and
4 deletions.
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: e2e | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
@@ -9,12 +13,33 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup | ||
- name: Setup | Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.20.x | ||
- name: Prepare | ||
- name: Setup | Kubernetes Cluster | ||
uses: helm/[email protected] | ||
with: | ||
version: v0.18.0 | ||
cluster_name: pipeline-controller | ||
node_image: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | ||
- name: Setup | Flux | ||
run: curl -s https://fluxcd.io/install.sh | sudo bash | ||
- 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 "machine github.com login ${{ github.actor }} password ${{ secrets.BUILD_BOT_TOKEN }}" > ~/.netrc | ||
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 |
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
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- podinfo-dev/ | ||
- podinfo-prod/ | ||
- pipeline.yaml |
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,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace.yaml | ||
- source.yaml | ||
- release.yaml | ||
- notification.yaml |
6 changes: 6 additions & 0 deletions
6
e2e/testdata/pipelines/github/podinfo-prod/kustomization.yaml
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace.yaml | ||
- source.yaml | ||
- release.yaml |
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- podinfo-dev/ | ||
- podinfo-prod/ | ||
- pipeline.yaml |
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,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace.yaml | ||
- source.yaml | ||
- release.yaml | ||
- notification.yaml |
6 changes: 6 additions & 0 deletions
6
e2e/testdata/pipelines/gitlab/podinfo-prod/kustomization.yaml
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,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- namespace.yaml | ||
- source.yaml | ||
- release.yaml |