parch-iso-cosmic/.gitlab-ci.yml

30 lines
831 B
YAML
Raw Normal View History

2024-08-30 23:18:57 +03:30
stages:
- build
2024-09-16 11:53:40 +03:30
- deploy
2024-08-30 23:18:57 +03:30
image: archlinux/archlinux:base-devel
2024-09-16 14:56:21 +03:30
variables:
Desktop: "cosmic"
2024-08-30 23:18:57 +03:30
archiso:
stage: build
script:
2024-09-05 17:44:38 +03:30
- ./build.sh
2024-09-16 11:53:40 +03:30
- echo "Renaming the output ISO file"
2024-09-16 14:56:21 +03:30
- mv out/*.iso out/Parchlinux-$Desktop-latest.iso
2024-09-16 11:53:40 +03:30
stage: deploy
2024-09-13 03:01:21 +03:30
script:
2024-09-16 14:56:21 +03:30
- echo "Installing sshpass and rsync"
2024-09-16 13:00:53 +03:30
- pacman -Syu --noconfirm sshpass rsync
2024-09-16 14:56:21 +03:30
- echo "Removing old ISO files from remote directory"
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT rm -rf /srv/http/cosmic/
- echo "Creating new directory on remote host"
- 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/
2024-09-13 03:01:21 +03:30
rules:
2024-09-13 03:03:22 +03:30
- if: $CI_COMMIT_TAG
2024-09-16 15:26:03 +03:30
2024-08-30 23:21:10 +03:30