Files
doneit-web/bitbucket-pipelines.yml
T

23 lines
887 B
YAML
Raw Normal View History

2021-07-07 18:42:21 +01:00
pipelines:
2021-07-08 11:07:40 +01:00
branches:
2022-06-02 16:11:57 +01:00
developer:
- step:
name: 'Build Images and push to Docker hub'
script:
- export BITBUCKET_COMMIT_SHORT=$(echo $BITBUCKET_COMMIT| cut -c1-7)
- export IMAGE_NAME=gabinetedigital/gdsite:$BITBUCKET_COMMIT_SHORT
2022-06-02 16:13:42 +01:00
- docker build -t $IMAGE_NAME .
2022-06-02 16:11:57 +01:00
- docker login --username $DOCKER_USER --password $DOCKER_PASS
- docker push $IMAGE_NAME
- step:
name: 'Deploy on server'
script:
- export BITBUCKET_COMMIT_SHORT=$(echo $BITBUCKET_COMMIT| cut -c1-7)
- pipe: atlassian/ssh-run:0.4.0
variables:
SSH_USER: 'administrator'
SERVER: '41.63.166.54'
COMMAND: 'export GDOS_VERSION=${BITBUCKET_COMMIT_SHORT};cd ${COMPOSE_FOLDER} ; docker-compose up -d gdsite'
2021-07-08 11:07:40 +01:00
2022-06-02 16:11:57 +01:00
options:
docker: true