Skip to content

Commit 23bbfb5

Browse files
committed
Reorganizing and renaming
1 parent 42b443c commit 23bbfb5

File tree

5 files changed

+116
-151
lines changed

5 files changed

+116
-151
lines changed

.circleci/config.yml

Lines changed: 3 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,8 @@ orbs:
1010
minikube: ccpgames/[email protected]
1111

1212
jobs:
13-
# Run Helm Lint checks
14-
helm-lint:
15-
working_directory: ~/stackstorm-ha
16-
docker:
17-
- image: lachlanevenson/k8s-helm:v3.5.3
18-
steps:
19-
- checkout
20-
- run:
21-
name: Prepare Helm
22-
command: |
23-
set -x
24-
helm dependency update
25-
- run:
26-
name: Helm Lint Check
27-
command: helm lint
28-
- run:
29-
name: Helm template
30-
command: |
31-
mkdir -p community
32-
helm template --output-dir community .
33-
- persist_to_workspace:
34-
root: ~/stackstorm-ha/
35-
paths:
36-
- community
37-
38-
# Run Kubernetes lint checks
39-
k8s-lint:
40-
docker:
41-
- image: garethr/kubeval
42-
steps:
43-
- attach_workspace:
44-
at: .
45-
- run:
46-
name: K8s Kubeval Lint Check
47-
command: kubeval $(find . -type f)
48-
working_directory: community/stackstorm-ha/templates/
49-
5013
# Spin up minikube K8s cluster and run Helm chart & e2e tests on it
51-
helm-e2e:
14+
"E2E Tests / minikube":
5215
# 'large' 4 vCPUs & 15GB RAM CircleCI machine executor
5316
# required to deploy heavy 'stackstorm-ha' Helm release with RabbitMQ, MongoDB, Redis clusters and 25+ st2 Pods.
5417
# https://circleci.com/docs/2.0/configuration-reference/#machine-executor-linux
@@ -101,25 +64,11 @@ workflows:
10164
version: 2
10265
helm:
10366
jobs:
104-
- helm-lint
105-
- k8s-lint:
106-
requires:
107-
- helm-lint
108-
- helm-e2e:
109-
requires:
110-
- helm-lint
111-
- k8s-lint
67+
- "E2E Tests / minikube"
11268
# Run periodic nightly Helm tests to ensure there are no regressions
11369
helm-nightly:
11470
jobs:
115-
- helm-lint
116-
- k8s-lint:
117-
requires:
118-
- helm-lint
119-
- helm-e2e:
120-
requires:
121-
- helm-lint
122-
- k8s-lint
71+
- "E2E Tests / minikube"
12372
triggers:
12473
- schedule:
12574
cron: "0 1 * * *"

.github/workflows/lint-and-e2e.yaml renamed to .github/workflows/e2e.yaml

Lines changed: 3 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Lint & E2E Tests (Experimental)
1+
name: E2E Tests
22

33
on:
44
pull_request:
@@ -13,57 +13,7 @@ on:
1313
workflow_dispatch:
1414

1515
jobs:
16-
helm-lint:
17-
runs-on: ubuntu-22.04
18-
timeout-minutes: 10
19-
steps:
20-
- name: Checkout source
21-
uses: actions/checkout@v3
22-
23-
- name: Update stackstorm-ha chart dependencies
24-
run: |
25-
set -x
26-
helm dependency update
27-
28-
- name: Helm lint
29-
run: |
30-
helm lint
31-
32-
- name: Cache community
33-
id: cache-community
34-
uses: actions/cache@v3
35-
with:
36-
path: community
37-
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }}
38-
39-
- name: Helm template
40-
if: steps.cache-community.outputs.cache-hit != 'true'
41-
shell: bash
42-
run: |
43-
helm template --output-dir community .
44-
45-
k8s-lint:
46-
runs-on: ubuntu-22.04
47-
timeout-minutes: 10
48-
needs: [helm-lint]
49-
steps:
50-
- name: Checkout source
51-
uses: actions/checkout@v3
52-
53-
- name: Cache community
54-
id: cache-community
55-
uses: actions/cache@v3
56-
with:
57-
path: community
58-
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }}
59-
60-
- name: Kubernetes kubeval lint
61-
uses: instrumenta/kubeval-action@master
62-
with:
63-
files: community
64-
65-
helm-e2e:
66-
needs: [k8s-lint]
16+
k3s:
6717
runs-on: ubuntu-22.04
6818
# NOTE: Just a thought in case the timeouts fail; might not be
6919
# necessary, but might not hurt either, would vary based on the
@@ -74,6 +24,7 @@ jobs:
7424
max-parallel: 1
7525
matrix:
7626
# TODO: Document which versions we support and cover them.
27+
# https://github.com/StackStorm/stackstorm-k8s/issues/342
7728
k3s-channel:
7829
- "v1.25.4+k3s1"
7930
steps:

.github/workflows/lint.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
push:
9+
branches:
10+
- master
11+
schedule:
12+
- cron: "0 1 * * *"
13+
workflow_dispatch:
14+
15+
jobs:
16+
helm-lint:
17+
runs-on: ubuntu-22.04
18+
timeout-minutes: 10
19+
steps:
20+
- name: Checkout source
21+
uses: actions/checkout@v3
22+
23+
- name: Update stackstorm-ha chart dependencies
24+
run: |
25+
set -x
26+
helm dependency update
27+
28+
- name: Helm lint
29+
run: |
30+
helm lint
31+
32+
- name: Cache community
33+
id: cache-community
34+
uses: actions/cache@v3
35+
with:
36+
path: community
37+
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }}
38+
39+
- name: Helm template
40+
if: steps.cache-community.outputs.cache-hit != 'true'
41+
shell: bash
42+
run: |
43+
helm template --output-dir community .
44+
45+
k8s-lint:
46+
runs-on: ubuntu-22.04
47+
timeout-minutes: 10
48+
needs: [helm-lint]
49+
steps:
50+
- name: Checkout source
51+
uses: actions/checkout@v3
52+
53+
- name: Cache community
54+
id: cache-community
55+
uses: actions/cache@v3
56+
with:
57+
path: community
58+
key: ${{ runner.os }}-community-${{ hashFiles('conf/**', 'templates/**', 'Chart.yaml', 'values.yaml') }}
59+
60+
- name: Kubernetes kubeval lint
61+
uses: instrumenta/kubeval-action@master
62+
with:
63+
files: community

.github/workflows/unit-tests.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/unit.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types:
9+
- opened
10+
- synchronize
11+
schedule:
12+
- cron: "0 1 * * *"
13+
workflow_dispatch:
14+
15+
jobs:
16+
helm-unittest:
17+
runs-on: ubuntu-22.04
18+
# strategy:
19+
# matrix:
20+
# Relevant tools installed by default on ubuntu 20.04:
21+
# - helm 3.8.0
22+
# - jq 1.6
23+
# - kind 0.11.1
24+
# - kubectl 1.23.3
25+
# - minikube 1.25.1
26+
# - python 3.8.10
27+
# - yamllint 1.26.3
28+
# - yq 4.19.1
29+
# see: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md
30+
31+
steps:
32+
- uses: actions/checkout@v2
33+
34+
- name: Install helm-unittest
35+
# We should periodically check to see if another fork has taken over maintenance,
36+
# as the de-facto "best" fork has changed several times over the years.
37+
run: |
38+
helm plugin install https://github.com/quintush/helm-unittest
39+
40+
- name: Install chart dependencies
41+
run: |
42+
helm dependency update
43+
44+
- name: Run helm-unittest
45+
# by default looks for tests/*_test.yaml
46+
run: |
47+
helm unittest --color --helm3 -f 'tests/unit/*_test.yaml' .

0 commit comments

Comments
 (0)