Remove deploy stage - use Makefile instead

This commit is contained in:
Russell Ballestrini 2025-12-21 08:57:03 -05:00
parent b905d5df62
commit 065a7c359e

View file

@ -1,6 +1,5 @@
stages:
- build
- deploy
build_sshpiper:
stage: build
@ -63,64 +62,3 @@ build_sshpiper:
paths:
- sshpiperd
expire_in: 1 week
deploy_sshpiper:
stage: deploy
tags:
- cammy.foxhop.net
only:
- main
dependencies:
- build_sshpiper
before_script:
- which systemctl || (echo "systemctl not found!" && exit 1)
script:
- echo "Deploying sshpiper to cammy..."
# Stop existing service
- sudo /bin/systemctl stop sshpiper.service || echo "Service was not running"
# Deploy binary
- sudo /bin/cp $CI_PROJECT_DIR/sshpiperd /opt/unsandbox/sshpiper/sshpiperd
- sudo /bin/chmod +x /opt/unsandbox/sshpiper/sshpiperd
# Create systemd service if it doesn't exist
- |
if [ ! -f /etc/systemd/system/sshpiper.service ]; then
echo "Creating systemd service for sshpiper..."
sudo tee /etc/systemd/system/sshpiper.service > /dev/null <<EOF
[Unit]
Description=SSH Piper - SSH routing proxy
After=network.target
[Service]
Type=simple
ExecStart=/opt/unsandbox/sshpiper/sshpiperd yaml --config /opt/unsandbox/sshpiper/sshpiper.yaml
Restart=on-failure
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
sudo /bin/systemctl daemon-reload
fi
# Start service
- sudo /bin/systemctl restart sshpiper.service
- |
if [ $? -eq 0 ]; then
echo "sshpiper service restarted successfully."
else
echo "Failed to restart sshpiper service."
exit 1
fi
- sudo /bin/systemctl enable sshpiper.service
- sudo /bin/systemctl status sshpiper.service --no-pager
- echo "Deployment completed successfully."
after_script:
- echo "Deployment process completed."