This is an automated email from the ASF dual-hosted git repository.
sunnianjun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git
The following commit(s) were added to refs/heads/main by this push:
new a8e3378 fix(ci): fix workflows triggers and directories (#122)
a8e3378 is described below
commit a8e337865948758f6a41d1e9332667caf36ffe4f
Author: liyao <[email protected]>
AuthorDate: Wed Nov 30 13:28:23 2022 +0800
fix(ci): fix workflows triggers and directories (#122)
* fix: fix operator it workflow
Signed-off-by: mlycore <[email protected]>
* fix: fix proxy helm it
Signed-off-by: mlycore <[email protected]>
* fix: add condition for unit test
Signed-off-by: mlycore <[email protected]>
* fix: update workflow for helm to pull_request
Signed-off-by: mlycore <[email protected]>
* fix: add branch and path to docker build
Signed-off-by: mlycore <[email protected]>
Signed-off-by: mlycore <[email protected]>
---
.github/workflows/build.yaml | 4 ++++
.github/workflows/operator-integration.yml | 16 +++++++++++-----
.github/workflows/proxy-integration.yml | 11 ++++++++---
.github/workflows/unit-test.yml | 7 +++++--
4 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 636b972..8f9910b 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -19,6 +19,10 @@ name: Create and publish a Docker image
on:
push:
+ branches:
+ - 'release-v*'
+ paths:
+ - 'shardingsphere-operator/**'
tags:
env:
REGISTRY: ghcr.io
diff --git a/.github/workflows/operator-integration.yml
b/.github/workflows/operator-integration.yml
index e795c28..26ce1c4 100644
--- a/.github/workflows/operator-integration.yml
+++ b/.github/workflows/operator-integration.yml
@@ -17,7 +17,13 @@
name: Integration Test for Operator Helm Charts
-on: push
+on:
+ pull_request:
+ branches: [ main ]
+ paths:
+ - 'charts/apache-shardingsphere-operator-cluster-cluster-charts/**'
+ - 'charts/apache-shardingsphere-operator-cluster-charts/**'
+ - '.github/workflows/operator-integration.yml'
jobs:
run:
@@ -36,20 +42,20 @@ jobs:
run: |
set -x
kubectl create namespace shardingsphere-operator
- cd charts/shardingsphere-operator/
+ cd charts/apache-shardingsphere-operator-charts/
helm dependency build
cd ../
- helm install shardingsphere-operator shardingsphere-operator -n
shardingsphere-operator --set replicaCount=1
+ helm install shardingsphere-operator shardingsphere-operator -n
apache-shardingsphere-operator-charts --set replicaCount=1
kubectl wait --timeout=120s --for=condition=Ready --all pod -n
shardingsphere-operator
kubectl get pod -n shardingsphere-operator --show-labels
- name: "Install Helm Charts for ShardingSphere Cluster"
run: |
set -x
kubectl create namespace shardingsphere
- cd charts/shardingsphere-operator-cluster
+ cd charts/apache-shardingsphere-operator-cluster-charts
helm dependency build
cd ../
- helm install shardingsphere-operator-cluster
shardingsphere-operator-cluster -n shardingsphere --set replicaCount=1
+ helm install shardingsphere-operator-cluster
apache-shardingsphere-operator-cluster-charts -n shardingsphere --set
replicaCount=1
kubectl wait --timeout=60s --for=condition=Ready --all pod -n
shardingsphere
kubectl get pod -n shardingsphere --show-labels
kubectl get svc -n shardingsphere --show-labels
diff --git a/.github/workflows/proxy-integration.yml
b/.github/workflows/proxy-integration.yml
index d0bf4f0..16da054 100644
--- a/.github/workflows/proxy-integration.yml
+++ b/.github/workflows/proxy-integration.yml
@@ -17,7 +17,12 @@
name: Integration Test for Proxy Helm Charts
-on: push
+on:
+ pull_request:
+ branches: [ main ]
+ paths:
+ - 'charts/apache-shardingsphere-proxy-charts/**'
+ - '.github/workflows/proxy-integration.yml'
jobs:
run:
@@ -37,12 +42,12 @@ jobs:
set -x
export TEST_NAMESPACE="shardingsphere-system"
kubectl create namespace ${TEST_NAMESPACE}
- cd charts/shardingsphere-proxy/charts/governance
+ cd charts/apache-shardingsphere-proxy-charts/charts/governance
helm dependency build
cd ../..
helm dependency build
cd ..
- helm install shardingsphere-proxy shardingsphere-proxy -n
${TEST_NAMESPACE} --set compute.replicas=1
+ helm install shardingsphere-proxy apache-shardingsphere-proxy-charts
-n ${TEST_NAMESPACE} --set compute.replicas=1
kubectl wait --timeout=60s --for=condition=Ready --all pod -n
${TEST_NAMESPACE}
kubectl get pod,svc -n ${TEST_NAMESPACE} --show-labels
cd ..
diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml
index 89e8cd8..acdadb5 100644
--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -18,8 +18,11 @@
name: Unit Test
on:
- pull_request
-
+ pull_request:
+ branches: [ main ]
+ paths:
+ - 'shardingsphere-operator/**'
+ - '.github/workflows/unit-test.yml'
jobs:
operator:
runs-on: ubuntu-latest