42 lines
904 B
YAML
42 lines
904 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: Build Image
|
|
|
|
steps:
|
|
- name: Build Docker Image
|
|
image: plugins/docker
|
|
settings:
|
|
build_args:
|
|
- API_BASE_URL=https://www.skylinebulletin.in/
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: git.midastix.com/ci-docker-repo-user/skylinebulletin
|
|
registry: git.midastix.com
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|
|
- name: Deploy image
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: skylinebulletin.in
|
|
username: skylinebulletin
|
|
key:
|
|
from_secret: server_ssh_pkey
|
|
port: 22
|
|
command_timeout: 3m
|
|
script:
|
|
- echo "Deploying image"
|
|
- sudo /opt/deployable/skylinebulletin/docker/deploy.sh
|
|
- echo "Completed Deployment"
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|