F... Gitlab

This commit is contained in:
Sohrab Behdani 2024-09-16 15:29:59 +03:30
parent 36fac961c1
commit 341feaab43

View file

@ -7,13 +7,20 @@ image: archlinux/archlinux:base-devel
variables: variables:
Desktop: "cosmic" Desktop: "cosmic"
archiso: build_iso:
stage: build stage: build
script: script:
- ./build.sh - ./build.sh
- echo "Renaming the output ISO file" - echo "Renaming the output ISO file"
- mv out/*.iso out/Parchlinux-$Desktop-latest.iso - mv out/*.iso out/ParchLinux-cosmic-latest.iso
artifacts:
paths:
- out/ParchLinux-cosmic-latest.iso
deploy_iso:
stage: deploy stage: deploy
dependencies:
- build_iso
script: script:
- echo "Installing sshpass and rsync" - echo "Installing sshpass and rsync"
- pacman -Syu --noconfirm sshpass rsync - pacman -Syu --noconfirm sshpass rsync
@ -22,8 +29,6 @@ archiso:
- echo "Creating new directory on remote host" - echo "Creating new directory on remote host"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p /srv/http/cosmic/ - sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p /srv/http/cosmic/
- echo "Uploading new ISO via rsync" - echo "Uploading new ISO via rsync"
- sshpass -p "$PASS" rsync -r "$(ls out/*.iso)" parch@SSH_ROOT:/srv/http/cosmic/ - sshpass -p "$PASS" rsync -r out/ParchLinux-cosmic-latest.iso parch@$SSH_ROOT:/srv/http/cosmic/
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG