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

37 lines
987 B
YAML
Raw Normal View History

2024-08-10 13:29:33 +00:00
stages:
- build
- deploy
2024-08-10 13:29:33 +00:00
2024-08-17 17:50:14 +00:00
image: archlinux/archlinux:base-devel
2024-08-10 13:29:33 +00:00
variables:
Desktop: "cosmic"
build_iso:
2024-08-10 13:29:33 +00:00
stage: build
script:
- ./build.sh
- echo "Renaming the output ISO file"
- mv out/*.iso out/ParchLinux-cosmic-latest.iso
2024-08-10 13:29:33 +00:00
artifacts:
paths:
- out/ParchLinux-cosmic-latest.iso
rules:
- if: $CI_COMMIT_TAG
2024-08-10 13:29:33 +00:00
deploy_iso:
stage: deploy
dependencies:
- build_iso
script:
- echo "Installing sshpass and rsync"
- pacman -Syu --noconfirm sshpass rsync
- 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 out/ParchLinux-cosmic-latest.iso parch@$SSH_ROOT:/srv/http/cosmic/
rules:
- if: $CI_COMMIT_TAG