Commit 6e89b439 authored by Leo Leung's avatar Leo Leung
Browse files

Updated pipeline to trigger ssh via environment variables

parent 2169a3cc
Pipeline #204 passed with stages
in 1 minute and 50 seconds
......@@ -16,7 +16,7 @@ docker build:
- echo "Building factorio server version $VERSION"
- docker info
- cd 0.17
- docker build -t $IMAGE_TAG:latest -t $IMAGE_TAG:$VERSION --build-arg VERSION --no-cache .
- docker build -t $IMAGE_TAG:latest -t $IMAGE_TAG:$VERSION --build-arg VERSION .
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker push $IMAGE_TAG:latest
- docker push $IMAGE_TAG:$VERSION
......@@ -31,5 +31,7 @@ update running image:
- chmod 600 /keys
- mkdir ~/.ssh
- ssh-keyscan $SSH_SERVER >> ~/.ssh/known_hosts
- ssh -i /keys remote@$SSH_SERVER docker-compose -f /root/docker/running/factorio/docker-compose.yml pull
- ssh -i /keys remote@$SSH_SERVER docker-compose -f /root/docker/running/factorio/docker-compose.yml up -d
- ssh -i /keys remote@$SSH_SERVER docker-compose -f $PROJECT_PATH/docker-compose.yml images
- ssh -i /keys remote@$SSH_SERVER docker-compose -f $PROJECT_PATH/docker-compose.yml pull
- ssh -i /keys remote@$SSH_SERVER docker-compose -f $PROJECT_PATH/docker-compose.yml up -d
- ssh -i /keys remote@$SSH_SERVER docker-compose -f $PROJECT_PATH/docker-compose.yml images
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