diff --git a/.github/workflows/chart_test.yml b/.github/workflows/chart_test.yml index 6c8d4347..e4a12b2d 100644 --- a/.github/workflows/chart_test.yml +++ b/.github/workflows/chart_test.yml @@ -32,6 +32,10 @@ on: jobs: basic-tests: runs-on: ubuntu-latest + outputs: + changed: ${{ steps.list-changed.outputs.changed }} + chart_name: ${{ steps.list-changed.outputs.chart_name }} + steps: - name: Checkout uses: actions/checkout@v2 @@ -109,16 +113,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.20.15 @@ -128,12 +122,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -146,7 +140,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -183,16 +177,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.21.14 @@ -202,12 +186,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -220,7 +204,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -257,16 +241,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.22.17 @@ -276,12 +250,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -294,7 +268,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -331,16 +305,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.23.17 @@ -350,12 +314,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -368,7 +332,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -405,16 +369,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.24.15 @@ -424,12 +378,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -442,7 +396,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -480,16 +434,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.25.11 @@ -499,12 +443,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -517,7 +461,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -555,16 +499,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.26.6 @@ -574,12 +508,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -592,7 +526,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3 @@ -630,16 +564,6 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.4.0 - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml) - chart_name=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .ci/ct.yaml | grep -v '>>>') - if [[ -n "$changed" ]]; then - echo "changed=true" >> $GITHUB_OUTPUT - echo "chart_name=$chart_name" >> $GITHUB_OUTPUT - fi - - name: Create kind cluster run: | ./hack/kind-cluster-build.sh --nodeNum 3 --k8sVersion v1.27.3 @@ -649,12 +573,12 @@ jobs: env: KIND_VERSION: 0.20.0 SN_IMAGE: streamnative/sn-platform:2.10.4.3 - if: steps.list-changed.outputs.changed == 'true' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' # Install the pulsar operator before testing the sn-platform - name: Install the pulsar operator - if: steps.list-changed.outputs.changed == 'true' && steps.list-changed.outputs.chart_name == 'charts/sn-platform' + if: ${{ needs.basic-tests.outputs.changed }} == 'true' && ${{ needs.basic-tests.outputs.chart_name }} != 'charts/pulsar-operator' run: | helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com helm -n sn-system install sn charts/pulsar-operator --create-namespace @@ -667,7 +591,7 @@ jobs: df -h - name: Run chart-testing (install) - run: ct install --debug --config ct.yaml --print-config --charts charts/sn-platform + run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.basic-tests.outputs.chart_name }} - name: Setup tmate session uses: mxschmitt/action-tmate@v3