Commit abf1002e authored by RIA\kristjankr's avatar RIA\kristjankr

Removed redundant scripts

parent 521bc8a0
image: riha-test-env
variables:
ARTIFACT_NAME: "$CI_PROJECT_NAME.war"
stages:
- build
- deploy
build:
stage: build
script:
- mvn -DskipTests=true clean package
artifacts:
paths:
- target/*.war
expire_in: 1 mos
tags:
- riha
deploy_development:
stage: deploy
script:
- echo "$SSH_PRIVATE_KEY" > id_rsa
- chmod 700 id_rsa
- mkdir $HOME/.ssh
- echo "$SSH_HOST_KEY" > $HOME/.ssh/known_hosts
- scp -i id_rsa target/*.war deployer@$SSH_HOST:$DEPLOYMENT_DIR/$ARTIFACT_NAME
environment:
name: demo
when: manual
tags:
- riha
\ No newline at end of file
#!/usr/bin/env bash
#
# PGPASSWORD=password dbcreate.sh [-n] host port database user [password]
#
# Create database tables
new="n"
if [ "$1" = "-n" ]; then
new="y"
shift
fi
if [ -z "$4" ]; then
echo "Usage: [PGPASSWORD=<password>] $0 [-n] <host> <port> <database> <user> [<password>]"
exit 1
fi
host=$1
port=$2
database=$3
user=$4
if [ -n "$5" ]; then
PGPASSWORD="$5" ; export PGPASSWORD
fi
psql --no-password -h $host -d $database -p $port -U $user -f ./sql/create_tables.sql
if [ "$new" = "n" ]; then
psql --no-password -h $host -d $database -p $port -U $user -f ./sql/create_triggers.sql
fi
\ No newline at end of file
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