diff --git a/.github/workflows/elevate.yml b/.github/workflows/elevate.yml index 5c3b96e..882639b 100644 --- a/.github/workflows/elevate.yml +++ b/.github/workflows/elevate.yml @@ -459,10 +459,12 @@ jobs: - name: Run vagrant up id: vagrant-up - run: sudo vagrant up elevatevm + run: | + sudo vagrant up elevatevm - name: Check source system release run: | + exit 1 echo "[Debug] $(sudo vagrant ssh elevatevm -c 'cat /etc/redhat-release')" source_release=$(sudo vagrant ssh elevatevm -c 'rpm -E %rhel') echo "source_release=${source_release}" >> $GITHUB_ENV @@ -521,7 +523,7 @@ jobs: if: inputs.leapp-data-git run: | sudo vagrant ssh elevatevm -c "sudo /vagrant/leapp-data-git.sh ${{ env.source_release }}" || exit 1 - echo "pkgs_versions=${{ env.pkgs_versions }}, 'leapp-data ${{ github.ref_name }}'" >> $GITHUB_ENV + echo "pkgs_versions=${{ env.pkgs_versions }}, 'leapp-data branch ${{ github.ref_name }}'" >> $GITHUB_ENV - name: Vendor - Imunify360 if: inputs.vendors == 'all' && matrix.scenario == '8' @@ -571,7 +573,7 @@ jobs: sudo vagrant scp elevatevm:/vagrant/leapp/* .${{ env.leapp_log_dir }}/ - name: Print VM's serial console log - if: success() || failure() + if: ( success() || failure() ) && steps.vagrant-up.outcome == 'success' run: | sudo chmod +r /var/log/elevatevm_consoles/serial.log cat /var/log/elevatevm_consoles/serial.log @@ -593,8 +595,7 @@ jobs: - name: Serial console log as artifact uses: actions/upload-artifact@v4 id: serial-artifact - if: success() || failure() - # if: steps.vagrant-up.outcome == 'success' + if: ( success() || failure() ) && steps.vagrant-up.outcome == 'success' with: name: ${{ matrix.distro }}-${{ env.target_release }}-serial-console.log path: ${{ matrix.distro }}-${{ env.target_release }}-serial-console.log diff --git a/ci/Vagrant/Vagrantfile b/ci/Vagrant/Vagrantfile index f7aa777..a14813a 100644 --- a/ci/Vagrant/Vagrantfile +++ b/ci/Vagrant/Vagrantfile @@ -18,10 +18,10 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", inline: <<-SHELL [ "$(rpm --eval %rhel)" = "7" ] && sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://el7.repo.almalinux.org/centos/CentOS-Base.repo sudo yum -y -q install dnf - sudo dnf -y -q update + # sudo dnf -y -q update SHELL # Reboot after upgrade - config.vm.provision :reload + # config.vm.provision :reload end \ No newline at end of file