You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
image: node:latest
stages:
- build
- test
- deploy
compile:
stage: build
script:
- npm install
- npm run grunt
artifacts:
expire_in: 6 hours
paths:
- dist/**/*.lua
- dist/**/*.cfg
only:
- master
- develop
tags:
- docker
test:
stage: test
script:
- echo "Testing happening here"
only:
- master
- develop
tags:
- docker
development:
image: panubo/sshd:latest
stage: deploy
variables:
DEPLOY_USER: "deploy"
DEPLOY_HOST: "sothr.com"
DEPLOY_PORT: "9140"
ENVIRONMENT: "Development"
TARGET_DIRECTORY: "~/download_dir/oc/development"
DOWNLOAD_URL_BASE: "https://sothr.com/download/oc/development/"
script:
- echo "Deployment To Development Starting..."
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- pushd ./dist
- find * -type f -exec sed -i -e 's/{ENVIRONMENT}/'"$ENVIRONMENT"'/g' {} \;
- find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \;
- find * -type f -exec sed -i -e 's@{FILE_PATH}@'"{}"'@g' {} \;
- popd
- rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:
- develop
tags:
- docker
environment: development
production:
image: panubo/sshd:latest
stage: deploy
variables:
DEPLOY_USER: "deploy"
DEPLOY_HOST: "sothr.com"
DEPLOY_PORT: "9140"
ENVIRONMENT: "Release"
TARGET_DIRECTORY: "~/download_dir/oc/release"
DOWNLOAD_URL_BASE: "https://sothr.com/download/oc/release/"
script:
- echo "Deployment To Production Starting..."
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- pushd ./dist
- find * -type f -exec sed -i -e 's/{ENVIRONMENT}/'"$ENVIRONMENT"'/g' {} \;
- find * -type f -exec sed -i -e 's@{URL_BASE}@'"$DOWNLOAD_URL_BASE"'@g' {} \;
- find * -type f -exec sed -i -e 's@{FILE_PATH}@'"{}"'@g' {} \;
- popd
- rsync -avz --delete-delay -e "ssh -p $DEPLOY_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress dist/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:
- master
tags:
- docker
environment: production
|