Skip to content

Instantly share code, notes, and snippets.

@dungdm93 dungdm93/paas-gae.yml
Last active Dec 10, 2017

Embed
What would you like to do?
GitLab-CI: Deploy Scripts
deploy:paas-gae:
stage: deploy
image: google/cloud-sdk
before_script:
- echo "${GCLOUD_SERVICE_KEY}" > /tmp/.gsa.key
- gcloud auth activate-service-account --key-file /tmp/.gsa.key
- gcloud config set project "${PROJECT_NAME}" # TODO: change this
script:
- gcloud app deploy
environment:
name: production
url: https://awesome.site
# allow_failure: false
# when: manual
# only:
# - master
deploy:vm-ansible:
stage: deploy
image: dungdm93/ansible:ubuntu16.04
before_script:
- eval "$(ssh-agent -s)"
- ssh-add <(echo "$SSH_PRIVATE_KEY")
script:
- ansible-playbook -i ansible/inventory ansible/playbook.yml -l ${CI_ENVIRONMENT_NAME}
environment:
name: production
url: https://awesome.site
# allow_failure: false
# when: manual
# only:
# - master
deploy:vm-ssh:
stage: deploy
image: dungdm93/openssh:alpine3.6
before_script:
- eval "$(ssh-agent -s)"
- ssh-add <(echo "$SSH_PRIVATE_KEY")
script:
- ssh user@server < scripts.sh
# --or--
# ssh user@server < scripts.sh "bash -s -- arg01 arg02"
environment:
name: production
url: https://awesome.site
# allow_failure: false
# when: manual
# only:
# - master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.