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 type: docker
name: server name: server
steps: steps:
- name: build # - name: build
image: appleboy/drone-ssh # image: appleboy/drone-ssh
settings: # settings:
host: # host:
- 172.10.10.10 # - 172.10.10.10
username: eigen # username: eigen
key: # key:
from_secret: DEVOPS_SSH_PRIVATE_OPEN # from_secret: DEVOPS_SSH_PRIVATE_OPEN
port: 22 # port: 22
script: # script:
- cd /home/eigen/PROJECT/POS/POS.DEV/BE # - cd /home/eigen/PROJECT/POS/POS.DEV/BE
- sh build.sh # - sh build.sh
when: # when:
ref: # ref:
- refs/tags/devel_* # - refs/tags/devel_*
- refs/tags/*-alpha.* # - 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 - name: build-production
image: plugins/docker image: plugins/docker
settings: settings:
registry: registry.eigen.co.id registry: registry.eigen.co.id
repo: registry.eigen.co.id/eigen/${DRONE_REPO_NAME} repo: registry.eigen.co.id/eigen/${DRONE_REPO_NAME}
build_args:
- env_target=env.production
tags: ${DRONE_TAG} tags: ${DRONE_TAG}
custom_dns: 172.10.10.16 custom_dns: 172.10.10.16
when: when:

View File

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