ci: build k8s only
continuous-integration/drone/push Build encountered an error Details
continuous-integration/drone/tag Build encountered an error Details

pull/115/head 20.2.3-alpha.4
Supan Adit Pratama 2024-10-30 14:37:07 +07:00
parent bd32d4fbdd
commit 1d54b709b6
2 changed files with 30 additions and 22 deletions

View File

@ -2,29 +2,37 @@ kind: pipeline
type: docker
name: server
steps:
- name: build
image: appleboy/drone-ssh
settings:
host:
- 172.10.10.10
username: eigen
key:
from_secret: DEVOPS_SSH_PRIVATE_OPEN
port: 22
script:
- cd /home/eigen/PROJECT/POS/POS.DEV/BE
- sh build.sh
when:
ref:
- refs/tags/devel_*
- refs/tags/*-alpha.*
# - name: build
# image: appleboy/drone-ssh
# settings:
# host:
# - 172.10.10.10
# username: eigen
# key:
# from_secret: DEVOPS_SSH_PRIVATE_OPEN
# port: 22
# script:
# - cd /home/eigen/PROJECT/POS/POS.DEV/BE
# - sh build.sh
# when:
# ref:
# - refs/tags/devel_*
# - refs/tags/*-alpha.*
- name: build-production
image: plugins/docker
settings:
registry: registry.eigen.co.id
repo: registry.eigen.co.id/eigen/${DRONE_REPO_NAME}
tags: ${DRONE_TAG}
custom_dns: 172.10.10.16
when:
ref:
- refs/tags/*-production.*
- name: build-production
image: plugins/docker
settings:
registry: registry.eigen.co.id
repo: registry.eigen.co.id/eigen/${DRONE_REPO_NAME}
build_args:
- env_target=env.production
tags: ${DRONE_TAG}
custom_dns: 172.10.10.16
when:

View File

@ -5,11 +5,11 @@ COPY . .
RUN yarn install
RUN yarn build
FROM node:18.17-alpine
ARG env_target
# ARG env_target
WORKDIR /app
RUN echo ${env_target}
COPY env/$env_target /app/.env
COPY --from=builder /app/env/$env_target .env
# RUN echo ${env_target}
# COPY env/$env_target /app/.env
# COPY --from=builder /app/env/$env_target .env
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/assets ./assets