+26
@@ -62,6 +62,32 @@ steps:
|
|||||||
from_secret: registry_password
|
from_secret: registry_password
|
||||||
dockerfile: ./cmd/worker/Dockerfile
|
dockerfile: ./cmd/worker/Dockerfile
|
||||||
|
|
||||||
|
- name: deploy-uat
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: 10.0.0.3
|
||||||
|
username: mazyar
|
||||||
|
port: 22
|
||||||
|
key:
|
||||||
|
from_secret: ssh_deploy_key
|
||||||
|
envs:
|
||||||
|
- DRONE_BUILD_NUMBER
|
||||||
|
- DRONE_BRANCH
|
||||||
|
script:
|
||||||
|
- set -e
|
||||||
|
- cd /data/tm-uat
|
||||||
|
- NEW_TAG="${DRONE_BUILD_NUMBER}-${DRONE_BRANCH}"
|
||||||
|
- echo "Deploying tag $NEW_TAG"
|
||||||
|
- sed -i "s/^WEB_IMG_TAG=.*/WEB_IMG_TAG=$NEW_TAG/" .env
|
||||||
|
- sed -i "s/^SCRAPER_IMG_TAG=.*/SCRAPER_IMG_TAG=$NEW_TAG/" .env
|
||||||
|
- sed -i "s/^WORKER_IMG_TAG=.*/WORKER_IMG_TAG=$NEW_TAG/" .env
|
||||||
|
- docker compose pull web scraper worker
|
||||||
|
- docker compose up -d web scraper worker
|
||||||
|
- docker image prune -f
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- dev
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
|
|||||||
Reference in New Issue
Block a user