I am using the following code in my bitbucket-pipelines.yml
files to remotely deply code to a staging server.
image: php:7.1.1
pipelines:
def
I am using a similar configuration, but in my case I want to cache the gettext
package, came here for the same reason (to find how to cache gettext
).
if you don't have that dependency, you can use the bitbucket provided ssh pipe pipe: atlassian/ssh-run. don't have to create custom docker image.
image: atlassian/default-image:2
pipelines:
branches:
develop:
- step:
deployment: staging
script:
- apt update && apt install -y gettext
- envsubst < scripts/deploy.sh > deploy-out.sh
- pipe: atlassian/ssh-run:0.2.6
variables:
SSH_USER: $STAGE_USER
SERVER: $STAGE_SERVER
COMMAND: 'deploy-out.sh'
MODE: 'script'