37 lines
997 B
YAML
37 lines
997 B
YAML
|
stages:
|
||
|
- build
|
||
|
- deploy
|
||
|
|
||
|
image: archlinux/archlinux:base-devel
|
||
|
|
||
|
variables:
|
||
|
Desktop: "lite"
|
||
|
|
||
|
build_iso:
|
||
|
stage: build
|
||
|
script:
|
||
|
- ./build.sh
|
||
|
- echo "Renaming the output ISO file"
|
||
|
- mv out/*.iso out/ParchLinux-$Desktop-latest.iso
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- out/ParchLinux-$Desktop-latest.iso
|
||
|
rules:
|
||
|
- if: $CI_COMMIT_TAG
|
||
|
|
||
|
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/$Desktop/
|
||
|
- echo "Creating new directory on remote host"
|
||
|
- sshpass -p "$PASS" ssh -o StrictHostKeyChecking=no parch@$SSH_ROOT mkdir -p /srv/http/$Desktop/
|
||
|
- echo "Uploading new ISO via rsync"
|
||
|
- sshpass -p "$PASS" rsync -r out/ParchLinux-$Desktop-latest.iso parch@$SSH_ROOT:/srv/http/$Desktop/
|
||
|
rules:
|
||
|
- if: $CI_COMMIT_TAG
|