Skip to content

Instantly share code, notes, and snippets.

@hussainweb
Last active November 21, 2019 13:54
Show Gist options
  • Save hussainweb/ff27ee529593382f415c440cc57eeee6 to your computer and use it in GitHub Desktop.
Save hussainweb/ff27ee529593382f415c440cc57eeee6 to your computer and use it in GitHub Desktop.
Gitlab CI definition for platform.sh deployment
stages:
- build
- test
- deploy
platformsh:
image: axelerant/platformsh-cli:latest
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
stage: deploy
script:
- platform project:set-remote ${PLATFORM_PROJECT_ID}
- platform push --verbose --activate --target ${CI_COMMIT_REF_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment