Commit 5d132892 authored by Olav Morken's avatar Olav Morken
Browse files

Create a separate script to upload the Debian packages

We are going to restructure the deployment to automatically detect the
distros. This is easier to do from a shell script, so move the
commands to their own shell script.
parent cc4974dc
......@@ -31,19 +31,4 @@ deploy-apt:
paths:
- output
script:
- apt-get update && apt-get install openssh-client -y
- (
umask 077;
mkdir -p ~/.ssh;
echo "${SSH_PRIVKEY}" > ~/.ssh/id_rsa;
echo "${SSH_APT_HOSTKEY}" > ~/.ssh/known_hosts;
)
- ssh jenkins@apt.uninett.no
mkdir -p
/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy
/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy
- scp output/bullseye/radsecproxy*.deb
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy/
- scp output/buster/radsecproxy*.deb
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy/
- ssh jenkins@apt.uninett.no /www/apt.uninett.no/bin/mkrepo.debian
- ./upload.sh
#!/bin/bash
set -e
set -o pipefail
# Install SSH client
apt-get update
apt-get install -y openssh-client
# Create SSH configuration
(
umask 077
mkdir -p ~/.ssh
echo "${SSH_PRIVKEY}" > ~/.ssh/id_rsa
echo "${SSH_APT_HOSTKEY}" > ~/.ssh/known_hosts
)
# Upload the Debian packages
ssh jenkins@apt.uninett.no mkdir -p \
/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy \
/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy
scp output/bullseye/radsecproxy*.deb \
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/bullseye/main/binary-amd64/r/radsecproxy/
scp output/buster/radsecproxy*.deb \
jenkins@apt.uninett.no:/www/apt.uninett.no/htdocs/debian/pool/buster/main/binary-amd64/r/radsecproxy/
# Update the repository metadata
ssh jenkins@apt.uninett.no /www/apt.uninett.no/bin/mkrepo.debian
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment