Skip to content

Commit e769793

Browse files
committed
f
1 parent 795ae11 commit e769793

18 files changed

+42914
-8314
lines changed

.github/workflows/test-prepare-cluster.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@ jobs:
3232
3333
- name: build
3434
run: |
35-
set -e
36-
make package-create-release
37-
make package-create-customer
38-
make package-create-cluster
39-
make package-helm-install
40-
make package-kots-install
35+
make package-create-release \
36+
package-create-customer \
37+
package-create-cluster \
38+
package-helm-install \
39+
package-kots-install
4140
4241
- name: pull helm chart
4342
run: |
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: test - remove-cluster
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- remove-cluster/**
9+
10+
concurrency:
11+
group: test-remove-cluster-${{ github.head_ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
cache: "npm"
23+
cache-dependency-path: |
24+
**/package-lock.json
25+
26+
- name: build
27+
run: make package-main package-remove-cluster
28+
29+
- name: create cluster
30+
id: create-cluster
31+
uses: replicatedhq/compatibility-actions/create-cluster@v1
32+
with:
33+
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
34+
kubernetes-distribution: kind
35+
timeout-minutes: 5
36+
37+
- name: test remove-cluster
38+
uses: ./remove-cluster
39+
with:
40+
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
41+
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}
42+
43+
- name: remove cluster
44+
if: always()
45+
uses: replicatedhq/compatibility-actions/remove-cluster@v1
46+
continue-on-error: true # It could be that the cluster is already removed
47+
with:
48+
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
49+
cluster-id: ${{ steps.create-cluster.outputs.cluster-id }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/build
22
**/node_modules
3+
/dist/
34
.vscode/

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
.PHONY: package-all
2-
package-all: package-archive-channel package-archive-customer package-create-cluster package-create-object-store \
2+
package-all: package-main \
3+
package-archive-channel package-archive-customer package-create-cluster package-create-object-store \
34
package-create-postgres package-expose-port package-create-customer package-create-release \
45
package-helm-install package-kots-install package-promote-release package-remove-cluster \
56
package-get-customer-instances package-report-compatibility-result package-upgrade-cluster
67

8+
.PHONY: package-main
9+
package-main:
10+
rm -rf ./build ./dist ./node_modules
11+
npm install && npm run build && npm run package
12+
713
.PHONY: package-archive-channel
814
package-archive-channel:
915
rm -rf ./archive-channel/build ./archive-channel/dist ./archive-channel/node_modules
@@ -62,7 +68,7 @@ package-promote-release:
6268
.PHONY: package-remove-cluster
6369
package-remove-cluster:
6470
rm -rf ./remove-cluster/build ./remove-cluster/dist ./remove-cluster/node_modules
65-
cd ./remove-cluster && npm install && npm run build && npm run package
71+
cp -r dist remove-cluster/
6672

6773
.PHONY: package-get-customer-instances
6874
package-get-customer-instances:
File renamed without changes.

0 commit comments

Comments
 (0)