59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
kind: pipeline
|
|
name: Build Image
|
|
|
|
clone:
|
|
depth: 1
|
|
|
|
steps:
|
|
- name: Lint Check
|
|
image: node:22-alpine
|
|
commands:
|
|
# Enable Corepack and prepare Yarn 4
|
|
- corepack enable
|
|
- corepack prepare yarn@4.9.2 --activate
|
|
|
|
# Install dependencies with Yarn 4
|
|
- yarn install --immutable
|
|
- yarn lint
|
|
|
|
- name: Build Docker Image
|
|
image: plugins/docker
|
|
settings:
|
|
build_args: 'API_BASE_URL=https://TheKalawati.in/api'
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: git.midastix.com/ci-docker-repo-user/thekalawati
|
|
registry: git.midastix.com
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|
|
- name: Deploy image
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host: midastix.com
|
|
username: TheKalawati
|
|
key:
|
|
from_secret: server_ssh_pkey
|
|
port: 22
|
|
command_timeout: 3m
|
|
script:
|
|
- echo "Deploying image"
|
|
- sudo /opt/deployable/TheKalawati/docker/deploy.sh
|
|
- echo "Completed Deployment"
|
|
when:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
# trigger:
|
|
# branch:
|
|
# - main
|
|
# - feature/env_api_url
|
|
# event:
|
|
# - push
|