Merge pull request 'Fix deployment script' (#1) from hurui200320/actions-clevermicro:clevermicro-pipeline into master

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2025-10-21 13:33:17 +00:00
committed by Forgejo
2 changed files with 25 additions and 4 deletions
+22 -3
View File
@@ -24,11 +24,20 @@ inputs:
runs:
using: composite
steps:
- name: Decide kind cluster name
id: cluster-name
shell: bash
run: |
rand=$(head /dev/urandom | tr -dc a-z0-9 | head -c 16)
timestamp=$(date +%s)
echo "cluster-name=$(echo clevermicro-test-$timestamp-$rand)" >> "$FORGEJO_OUTPUT"
# this action will setup kind and helm, then create a kind cluster
- name: Bring up Kubernetes cluster using Kind
uses: https://git.cleverthis.com/actions/kubernetes@master
with:
cluster-name: clevermicro
kind-config-path: clevermicro-kind-config.yaml
cluster-name: ${{ steps.cluster-name.outputs.cluster-name }}
kind-config-path: ${{ forge.action_path }}/clevermicro-kind-config.yaml
registry-url: ${{ inputs.registry-url }}
registry-user: ${{ inputs.registry-user }}
registry-password: ${{ inputs.registry-password }}
@@ -36,33 +45,43 @@ runs:
- name: Add Helm chart repositories
shell: bash
run: |
echo "==================== Adding helm chart repositories ===================="
helm repo add kedacore https://kedacore.github.io/charts
helm repo add cleverthis "https://${{ inputs.registry-url }}/api/packages/infra/helm" \
--username "${{ inputs.registry-user }}" \
--password "${{ inputs.registry-password }}"
helm repo update
echo "==================== Done adding helm chart repositories ===================="
- name: Install KEDA and wait for ready
shell: bash
run: |
echo "==================== Installing KEDA ===================="
helm install keda kedacore/keda --namespace keda --create-namespace --wait --timeout 10m
echo "==================== Done installing KEDA ===================="
- name: Install CleverMicro and wait for ready
shell: bash
run: |
echo "==================== Installing CleverMicro ===================="
helm install clevermicro cleverthis/clevermicro-deployment --namespace clevermicro --create-namespace \
--set "clevermicro.amqp-router.image.tag=${{ inputs.amqp-router-tag }}" \
--set "clevermicro.management-service.image.tag=${{ inputs.management-service-tag }}" \
--set "client-lib-demo.image.tag=${{ inputs.client-lib-demo-tag }}" \
--wait --timeout 20m
echo "==================== Done installing CleverMicro ===================="
- name: Create additional resources for CleverMicro testing
shell: bash
run: |
kubectl apply -f service.yaml
echo "==================== Applying service file ===================="
kubectl -n clevermicro apply -f ${{ forge.action_path }}/service.yaml
echo "==================== Done applying service file ===================="
- name: Wait for all pods ready
shell: bash
run: |
echo "==================== Waiting for all pods ready ===================="
kubectl -n clevermicro wait pod --for=condition=Ready --timeout=10m --all
kubectl -n clevermicro get pod
echo "==================== All pods ready ===================="
+3 -1
View File
@@ -1,6 +1,5 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: clevermicro-test
networking:
podSubnet: 10.242.0.0/16
serviceSubnet: 10.246.0.0/16
@@ -10,6 +9,9 @@ nodes:
- containerPort: 30080
hostPort: 30080
protocol: TCP
- containerPort: 30081
hostPort: 30081
protocol: TCP
- containerPort: 8001
hostPort: 8001
protocol: TCP