Skip to content

Commit

Permalink
ELevate CI AlmaLinux#3
Browse files Browse the repository at this point in the history
  • Loading branch information
yuravk committed Oct 17, 2024
1 parent 2de354d commit 6e0a91a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/elevate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ci/Vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6e0a91a

Please # to comment.