diff --git a/.github/workflows/basic-ci.yaml b/.github/workflows/basic-ci.yaml index 1f5a523c..84990c6c 100644 --- a/.github/workflows/basic-ci.yaml +++ b/.github/workflows/basic-ci.yaml @@ -78,96 +78,96 @@ jobs: popd echo Running integration tests NDM_HOME=`pwd` go test -v ./tests/... - - name: "Get NDM logs" - if: always() - run: | - if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then - echo "VM is not deployed, skip getting logs" - exit 0 - fi - ./ci/scripts/get-debug-info.sh - - name: "Tear Down / Cleanup" - if: always() - run: | - if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then - echo "VM is not deployed, skip VM destroy" - exit 0 - fi - rm -rf /tmp/hotplug_disks/ndm-new-vagrant-k3s - pushd ndm-new-vagrant-k3s - vagrant destroy -f --parallel - popd + #- name: "Get NDM logs" + # if: always() + # run: | + # if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then + # echo "VM is not deployed, skip getting logs" + # exit 0 + # fi + # ./ci/scripts/get-debug-info.sh + #- name: "Tear Down / Cleanup" + # if: always() + # run: | + # if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then + # echo "VM is not deployed, skip VM destroy" + # exit 0 + # fi + # rm -rf /tmp/hotplug_disks/ndm-new-vagrant-k3s + # pushd ndm-new-vagrant-k3s + # vagrant destroy -f --parallel + # popd - jobs-upgrade: - needs: validation - runs-on: - - self-hosted - - golang - steps: - - name: "Clone and check" - uses: actions/checkout@v3 - - name: "Build the Image for the Integration Test" - run: | - BUILD_FOR_CI=true make - ./ci/scripts/patch-ttl-repo.sh - echo "NDM override result as below:" - cat ci/charts/ndm-override.yaml - - name: "Local Deployment (Harvester+Longhorn+Node-Disk-Manager) for testing" - id: vm_deploy - run: | - rm -rf ndm-upgrade-vagrant-k3s - git clone https://github.com/bk201/vagrant-k3s ndm-upgrade-vagrant-k3s - pushd ndm-upgrade-vagrant-k3s - yq e -i ".cluster_size = 1" settings.yaml - ./new-cluster.sh - echo "VM_DEPLOYED=true" >> "$GITHUB_ENV" - yq e -i ".longhorn_version = \"1.7.1\"" settings.yaml - ./scripts/deploy_longhorn.sh - cp ../ci/scripts/deploy_ndm_chart.sh ./deploy_ndm_chart.sh - ./deploy_ndm_chart.sh - popd - - name: "Add disk" - run: | - pushd ndm-upgrade-vagrant-k3s - ./scripts/attach-disk.sh node1 ndm-upgrade-vagrant-k3s - sleep 30 - popd - - name: "Patch Image target (for upgrade)" - run: | - ./ci/scripts/patch-ttl-repo.sh - echo "NDM override result as below:" - cat ci/charts/ndm-override.yaml - - name: "Upgrade NDM" - run: | - pushd ndm-upgrade-vagrant-k3s - cp ../ci/scripts/upgrade_ndm.sh ./upgrade_ndm.sh - ./upgrade_ndm.sh - popd - - name: "Run Basic Test" - id: basic-test - run: | - pushd ndm-upgrade-vagrant-k3s - vagrant ssh-config node1 > ../ssh-config - cp kubeconfig ../kubeconfig - popd - echo Running integration tests - NDM_HOME=`pwd` go test -v ./tests/... - - name: "Get NDM logs" - if: always() - run: | - if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then - echo "VM is not deployed, skip getting logs" - exit 0 - fi - ./ci/scripts/get-debug-info.sh - - name: "Tear Down / Cleanup" - if: always() - run: | - if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then - echo "VM is not deployed, skip VM destroy" - exit 0 - fi - rm -rf /tmp/hotplug_disks/ndm-upgrade-vagrant-k3s - pushd ndm-upgrade-vagrant-k3s - vagrant destroy -f --parallel - popd + #jobs-upgrade: + # needs: validation + # runs-on: + # - self-hosted + # - golang + # steps: + # - name: "Clone and check" + # uses: actions/checkout@v3 + # - name: "Build the Image for the Integration Test" + # run: | + # BUILD_FOR_CI=true make + # ./ci/scripts/patch-ttl-repo.sh + # echo "NDM override result as below:" + # cat ci/charts/ndm-override.yaml + # - name: "Local Deployment (Harvester+Longhorn+Node-Disk-Manager) for testing" + # id: vm_deploy + # run: | + # rm -rf ndm-upgrade-vagrant-k3s + # git clone https://github.com/bk201/vagrant-k3s ndm-upgrade-vagrant-k3s + # pushd ndm-upgrade-vagrant-k3s + # yq e -i ".cluster_size = 1" settings.yaml + # ./new-cluster.sh + # echo "VM_DEPLOYED=true" >> "$GITHUB_ENV" + # yq e -i ".longhorn_version = \"1.7.1\"" settings.yaml + # ./scripts/deploy_longhorn.sh + # cp ../ci/scripts/deploy_ndm_chart.sh ./deploy_ndm_chart.sh + # ./deploy_ndm_chart.sh + # popd + # - name: "Add disk" + # run: | + # pushd ndm-upgrade-vagrant-k3s + # ./scripts/attach-disk.sh node1 ndm-upgrade-vagrant-k3s + # sleep 30 + # popd + # - name: "Patch Image target (for upgrade)" + # run: | + # ./ci/scripts/patch-ttl-repo.sh + # echo "NDM override result as below:" + # cat ci/charts/ndm-override.yaml + # - name: "Upgrade NDM" + # run: | + # pushd ndm-upgrade-vagrant-k3s + # cp ../ci/scripts/upgrade_ndm.sh ./upgrade_ndm.sh + # ./upgrade_ndm.sh + # popd + # - name: "Run Basic Test" + # id: basic-test + # run: | + # pushd ndm-upgrade-vagrant-k3s + # vagrant ssh-config node1 > ../ssh-config + # cp kubeconfig ../kubeconfig + # popd + # echo Running integration tests + # NDM_HOME=`pwd` go test -v ./tests/... + # - name: "Get NDM logs" + # if: always() + # run: | + # if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then + # echo "VM is not deployed, skip getting logs" + # exit 0 + # fi + # ./ci/scripts/get-debug-info.sh + # - name: "Tear Down / Cleanup" + # if: always() + # run: | + # if [ ${{ env.VM_DEPLOYED }} != 'true' ]; then + # echo "VM is not deployed, skip VM destroy" + # exit 0 + # fi + # rm -rf /tmp/hotplug_disks/ndm-upgrade-vagrant-k3s + # pushd ndm-upgrade-vagrant-k3s + # vagrant destroy -f --parallel + # popd