optimisations drone
continuous-integration/drone/push Build is passing Details

production
Override-6 2 years ago
parent 60b4120f7e
commit 3d98a006ce

@ -5,16 +5,15 @@ name: Deployment
steps:
- name: Unit tests
image: amazoncorretto:11
image: override6/tbasket-backend:latest
volumes:
- name: build
path: ./build
commands:
- echo
- ./gradlew :test
- name: Deploy
image: amazoncorretto:11
image: override6/tbasket-backend:latest
depends_on:
- 'Unit tests'
environment:

@ -0,0 +1,10 @@
# syntax=override6/tbasket-end:latest
FROM ubuntu:latest
RUN apt update &&\
apt install openjdk-11-jdk openssh-client wget unzip -y &&\
wget https://services.gradle.org/distributions/gradle-7.5.1-bin.zip &&\
mkdir /opt/gradle &&\
unzip -d /opt/gradle gradle-7.5.1-bin.zip &&\
export GRADLE_HOME=/opt/gradle/gradle-7.5.1

@ -1,22 +1,5 @@
#!/usr/bin/env bash
echo "installing packages..."
#use the right command to install packages
if [ "$(command -v apt)" ]; then
apt update > /dev/null
apt -y install openssh-client openssh-clients > /dev/null
elif [ "$(command -v yum)" ]; then
yum update > /dev/null
yum -y install openssh-client openssh-clients > /dev/null
elif [ "$(command -v apk)" ]; then
apk update > /dev/null
apk add openssh > /dev/null
else
echo "could not find a package manager, aborting" >&2
exit 1
fi
echo "done."
mkdir /root/.ssh
echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
chmod 0600 /root/.ssh/*
@ -26,7 +9,7 @@ case "$DRONE_BRANCH" in
"dev")
USER=maxime
IP=92.132.18.192
DIR=server/TBasket/
DIR=server/TBasket
;;
"production")
USER=palafour