Skip to content

Commit

Permalink
[feat] upgrade helm charts
Browse files Browse the repository at this point in the history
[feat] implement running test in ci-cd
  • Loading branch information
wirwolf committed Nov 24, 2023
1 parent 06cac20 commit f37d927
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/npm-build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest

# strategy:
# matrix:
# node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -42,6 +37,21 @@ jobs:
needs: [build]
steps:
- uses: actions/checkout@v3

- name: Install kubectl and helm
run: |
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
HELM_VERSION=$(curl -Ls https://github.com/helm/helm/releases | grep 'href="/helm/helm/releases/tag/v3.[0-9]*.[0-9]*\"' | sed -E 's/.*\/helm\/helm\/releases\/tag\/(v[0-9\.]+)".*/\1/g' | head -1)
sudo wget -q -O /usr/local/bin/kubectl https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl
sudo chmod +x /usr/local/bin/kubectl
kubectl --client=true version
sudo wget -q https://get.helm.sh/helm-$HELM_VERSION-linux-amd64.tar.gz -O - | tar -xzO linux-amd64/helm > /usr/local/bin/helm
sudo chmod +x /usr/local/bin/helm
helm version
- uses: actions/download-artifact@v3
with:
name: helm-assistant-linux-amd64
Expand All @@ -56,6 +66,7 @@ jobs:
- name: Run test -> deploy_worker
run: |
ls -lah
export HELM_ASSISTANT_BIN_CMD="./helm-assistant-linux-amd64"
chmod +x helm-assistant
export HELM_ASSISTANT_BIN_CMD="./helm-assistant"
export TESTS_PWD=$(pwd)/tests/
bash tests/deploy_worker.sh
4 changes: 3 additions & 1 deletion tests/deploy_worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ export HELM_ASSISTANT_UPGRADE_JOB_STRICT=true
#helm upgrade \
#node -r ts-node/register -r tsconfig-paths/register ../src/App.ts

helm dependency build ${TESTS_PWD}data/charts/app-worker

${HELM_ASSISTANT_BIN_CMD} upgrade \
--install helm-assistant-test-worker \
--debug \
--wait \
--timeout 15m \
${TESTS_PWD}data/charts/app-worker \
-f cases/worker-success.yaml
-f ${TESTS_PWD}cases/worker-success.yaml

0 comments on commit f37d927

Please sign in to comment.