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:
|
2025-01-26 01:55:48 +03:30
|
|
|
Desktop: "cosmic"
|
2024-09-16 14:56:21 +03:30
|
|
|
|
2024-09-16 15:29:59 +03:30
|
|
|
build_iso:
|
2024-08-30 23:18:57 +03:30
|
|
|
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-11-23 14:11:43 +03:30
|
|
|
- mv out/*.iso out/ParchLinux-$Desktop-latest.iso
|
|
|
|
- echo "Generating MD5 checksum"
|
|
|
|
- md5sum out/ParchLinux-$Desktop-latest.iso > out/md5sum.txt
|
|
|
|
- echo "Build completed. Files generated:"
|
|
|
|
- ls -lh out/
|
2024-09-16 15:29:59 +03:30
|
|
|
artifacts:
|
|
|
|
paths:
|
2024-11-23 14:11:43 +03:30
|
|
|
- out/ParchLinux-$Desktop-latest.iso
|
|
|
|
- out/md5sum.txt
|
2024-09-16 16:14:01 +03:30
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_TAG
|
2024-09-16 15:29:59 +03:30
|
|
|
|
|
|
|
deploy_iso:
|
2024-09-16 11:53:40 +03:30
|
|
|
stage: deploy
|
2024-09-16 15:29:59 +03:30
|
|
|
dependencies:
|
|
|
|
- build_iso
|
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-11-23 14:11:43 +03:30
|
|
|
- echo "Determining the remote directory based on the tag"
|
2024-11-23 14:22:20 +03:30
|
|
|
- if [[ "$CI_COMMIT_TAG" == *"beta"* ]]; then export REMOTE_DIR="/srv/http/beta/$Desktop/"; else export REMOTE_DIR="/srv/http/$Desktop/"; fi
|
2024-09-16 14:56:21 +03:30
|
|
|
- echo "Removing old ISO files from remote directory"
|
2024-11-23 14:15:33 +03:30
|
|
|
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT rm -rf "$REMOTE_DIR/"
|
2024-09-16 14:56:21 +03:30
|
|
|
- echo "Creating new directory on remote host"
|
2024-11-23 14:15:33 +03:30
|
|
|
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p "$REMOTE_DIR/"
|
2024-09-16 14:56:21 +03:30
|
|
|
- echo "Uploading new ISO via rsync"
|
2024-11-23 14:15:33 +03:30
|
|
|
- sshpass -p "$PASS" rsync -r out/ParchLinux-$Desktop-latest.iso out/md5sum.txt parch@$SSH_ROOT:"$REMOTE_DIR/"
|
2024-09-13 03:01:21 +03:30
|
|
|
rules:
|
2024-09-16 15:29:59 +03:30
|
|
|
- if: $CI_COMMIT_TAG
|