This commit is contained in:
Sohrab Behdani 2024-09-16 14:56:21 +03:30
parent 7ff8cb4f5c
commit 3b8b359356

View file

@ -4,24 +4,29 @@ stages:
image: archlinux/archlinux:base-devel image: archlinux/archlinux:base-devel
variables:
Desktop: "cosmic"
archiso: archiso:
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-cosmic-latest.iso - mv out/*.iso out/Parchlinux-$Desktop-latest.iso
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
deploy: deploy:
stage: deploy stage: deploy
script: script:
- echo "Installing sshpass" - echo "Installing sshpass and rsync"
- pacman -Syu --noconfirm sshpass rsync - pacman -Syu --noconfirm sshpass rsync
- echo "Deleting old ISO files from remote directory" - echo "Removing old ISO files from remote directory"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT "rm -f /srv/http/cosmic/*.iso" - sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT rm -rf /srv/http/cosmic/
- echo "Deploying new ISO via rsync" - echo "Creating new directory on remote host"
- sshpass -p "$PASS" scp -o StrictHostKeyChecking=no out/*.iso parch@$SSH_ROOT:/srv/http/cosmic - sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p /srv/http/cosmic/
- echo "Uploading new ISO via rsync"
- sshpass -p "$PASS" rsync -r "$(ls out/*.iso)" parch@SSH_ROOT:/srv/http/cosmic/
rules: rules:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
dependencies: dependencies: