Skip to content

chore(ci): test prepare-cluster on pr #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/test-create-customer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
- name: build
run: make package-create-customer

- name: pull helm chart
run: |
helm pull oci://registry-1.docker.io/bitnamicharts/wordpress --version ${{ env.WORDPRESS_CHART_VERSION }}

- name: test create-customer
id: create-customer
uses: ./create-customer
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,18 @@ jobs:
run: |
helm pull oci://registry-1.docker.io/bitnamicharts/wordpress --version ${{ env.WORDPRESS_CHART_VERSION }}

- name: test create-release
id: create-release
- name: test create-release / helm
id: create-release-helm
uses: ./create-release
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: replicated-actions-ci # from the Replicated QA team
chart: wordpress-${{ env.WORDPRESS_CHART_VERSION }}.tgz

- name: test create-release / kots-install
id: create-release-kots-install
uses: ./create-release
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: replicated-actions-ci # from the Replicated QA team
yaml-dir: ./test/kots-install
19 changes: 1 addition & 18 deletions .github/workflows/test-kots-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,13 @@ jobs:
- name: build
run: make package-kots-install

- name: pull helm chart
run: |
helm pull oci://registry-1.docker.io/bitnamicharts/wordpress --version ${{ env.WORDPRESS_CHART_VERSION }}

- name: create-release
id: create-release
uses: replicatedhq/compatibility-actions/create-release@v1
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: ${{ env.APP_SLUG }}
chart: wordpress-${{ env.WORDPRESS_CHART_VERSION }}.tgz
yaml-dir: ./test/kots-install

- name: create-customer
id: create-customer
Expand All @@ -60,19 +56,6 @@ jobs:
kubernetes-distribution: kind
timeout-minutes: 5

- name: helm-install
id: helm-install
uses: replicatedhq/compatibility-actions/helm-install@v1
with:
kubeconfig: ${{ steps.create-cluster.outputs.cluster-kubeconfig }}
helm-path: helm
registry-username: ${{ github.ref_name }}@example.com
registry-password: ${{ steps.create-customer.outputs.license-id }}
chart: oci://registry.replicated.com/${{ env.APP_SLUG }}/release__${{ steps.create-release.outputs.release-sequence }}/wordpress
name: wordpress
namespace: default
run-preflights: false

- name: test kots-install
id: kots-install
uses: ./kots-install
Expand Down
37 changes: 36 additions & 1 deletion .github/workflows/test-prepare-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

jobs:
test:
test-helm:
runs-on: ubuntu-latest
env:
WORDPRESS_CHART_VERSION: 22.2.8
Expand Down Expand Up @@ -57,3 +57,38 @@ jobs:
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
cluster-id: ${{ steps.prepare-cluster.outputs.cluster-id }}

test-kots-install:
runs-on: ubuntu-latest
env:
WORDPRESS_CHART_VERSION: 22.2.8

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: |
**/package-lock.json

- name: build
run: make package-prepare-cluster

- name: test prepare-cluster
id: prepare-cluster
uses: ./prepare-cluster
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
app-slug: replicated-actions-ci # from the Replicated QA team
yaml-dir: ./test/kots-install
kubernetes-distribution: kind
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this fail on the preflights?


- name: remove cluster
id: remove-cluster
if: always()
uses: replicatedhq/compatibility-actions/remove-cluster@v1
continue-on-error: true # It could be that the cluster is already removed
with:
api-token: ${{ secrets.REPLICATED_API_TOKEN }}
cluster-id: ${{ steps.prepare-cluster.outputs.cluster-id }}
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ package-prepare-cluster: package-main

.PHONY: package-archive-channel
package-archive-channel:
rm -rf ./archive-channel/build ./archive-channel/dist ./archive-channel/node_modules
rm -rf ./archive-channel/build ./archive-channel/dist
cd ./archive-channel && npm install && npm run build && npm run package

.PHONY: package-archive-customer
package-archive-customer:
rm -rf ./archive-customer/build ./archive-customer/dist ./archive-customer/node_modules
rm -rf ./archive-customer/build ./archive-customer/dist
cd ./archive-customer && npm install && npm run build && npm run package

.PHONY: package-create-cluster
Expand All @@ -41,17 +41,17 @@ package-create-cluster: package-main

.PHONY: package-create-object-store
package-create-object-store:
rm -rf ./create-object-store/build ./create-object-store/dist ./create-object-store/node_modules
rm -rf ./create-object-store/build ./create-object-store/dist
cd ./create-object-store && npm install && npm run build && npm run package

.PHONY: package-create-postgres
package-create-postgres:
rm -rf ./create-postgres/build ./create-postgres/dist ./create-postgres/node_modules
rm -rf ./create-postgres/build ./create-postgres/dist
cd ./create-postgres && npm install && npm run build && npm run package

.PHONY: package-expose-port
package-expose-port:
rm -rf ./expose-port/build ./expose-port/dist ./expose-port/node_modules
rm -rf ./expose-port/build ./expose-port/dist
cd ./expose-port && npm install && npm run build && npm run package

.PHONY: package-create-customer
Expand All @@ -76,7 +76,7 @@ package-kots-install: package-main

.PHONY: package-promote-release
package-promote-release:
rm -rf ./promote-release/build ./promote-release/dist ./promote-release/node_modules
rm -rf ./promote-release/build ./promote-release/dist
cd ./promote-release && npm install && npm run build && npm run package

.PHONY: package-remove-cluster
Expand All @@ -86,17 +86,17 @@ package-remove-cluster: package-main

.PHONY: package-get-customer-instances
package-get-customer-instances:
rm -rf ./get-customer-instances/build ./get-customer-instances/dist ./get-customer-instances/node_modules
rm -rf ./get-customer-instances/build ./get-customer-instances/dist
cd ./get-customer-instances && npm install && npm run build && npm run package

.PHONY: package-report-compatibility-result
package-report-compatibility-result:
rm -rf ./report-compatibility-result/build ./report-compatibility-result/dist ./report-compatibility-result/node_modules
rm -rf ./report-compatibility-result/build ./report-compatibility-result/dist
cd ./report-compatibility-result && npm install && npm run build && npm run package

.PHONY: package-upgrade-cluster
package-upgrade-cluster:
rm -rf ./upgrade-cluster/build ./upgrade-cluster/dist ./upgrade-cluster/node_modules
rm -rf ./upgrade-cluster/build ./upgrade-cluster/dist
cd ./upgrade-cluster && npm install && npm run build && npm run package

.PHONY: readme-all
Expand Down
2 changes: 1 addition & 1 deletion create-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ create_cluster ---> cluster_kubeconfig
| kubernetes-distribution | | True | Kubernetes distribution of the cluster to provision. |
| kubernetes-version | | False | Kubernetes version to provision (format is distribution dependent). |
| license-id | | False | License ID to use for the installation (required for Embedded Cluster distribution). |
| cluster-name | | True | Name of the cluster to provision |
| cluster-name | | False | Name of the cluster to provision |
| ttl | | False | Cluster TTL (duration, max 48h) |
| disk | | False | Disk size in GiB |
| nodes | | False | Number of nodes to provision |
Expand Down
4 changes: 1 addition & 3 deletions create-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ inputs:
api-token:
description: "API Token."
required: true
default: ""
kubernetes-distribution:
description: "Kubernetes distribution of the cluster to provision."
required: true
Expand All @@ -16,8 +15,7 @@ inputs:
required: false
cluster-name:
description: "Name of the cluster to provision"
required: true
default: ""
required: false
ttl:
description: "Cluster TTL (duration, max 48h)"
required: false
Expand Down
8 changes: 4 additions & 4 deletions create-cluster/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion create-cluster/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions create-customer/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ inputs:
app-slug:
description: "App Slug."
required: true
default: ""
api-token:
description: "API Token."
required: true
default: ""
customer-name:
description: "Name of the customer."
required: true
Expand Down
8 changes: 4 additions & 4 deletions create-customer/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion create-customer/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions create-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ inputs:
app-slug:
description: "App Slug."
required: true
default: ""
api-token:
description: "API Token."
required: true
default: ""
chart:
description: "Path to the helm chart (One of `chart` or `yaml-dir` is required)."
required: false
Expand Down
8 changes: 4 additions & 4 deletions create-release/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion create-release/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion expose-port/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion expose-port/dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion expose-port/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function run() {
const apiToken = core.getInput("api-token");
const clusterId = core.getInput("cluster-id");
const port = core.getInput("port");
const protocols = core.getInput("protocols").split(",");
const protocols = core.getInput("protocols") ? core.getInput("protocols").split(",") : ["https"];
const apiEndpoint = core.getInput("replicated-api-endpoint");
const isWildcard = core.getBooleanInput("wildcard");

Expand Down
8 changes: 4 additions & 4 deletions helm-install/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion helm-install/dist/index.js.map

Large diffs are not rendered by default.

Loading