ci_cd
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
cf4f1acee4
commit
df0d1c6ae8
|
|
@ -0,0 +1,50 @@
|
|||
kind: pipeline
|
||||
name: Build Image
|
||||
|
||||
steps:
|
||||
- name: Lint Check
|
||||
image: node:21-alpine
|
||||
commands:
|
||||
- yarn install
|
||||
# - yarn lint
|
||||
|
||||
- name: Build Docker Image
|
||||
image: plugins/docker
|
||||
settings:
|
||||
build_args: "API_BASE_URL=https://loopssustainability-api.midastix.com"
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: git.midastix.com/ci-docker-repo-user/loopssustainability
|
||||
registry: git.midastix.com
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
|
||||
- name: Deploy image
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
host: loopssustainability.midastix.com
|
||||
username: loopssustainability
|
||||
key:
|
||||
from_secret: server_ssh_pkey
|
||||
port: 22
|
||||
command_timeout: 3m
|
||||
script:
|
||||
- echo "Deploying image"
|
||||
- sudo /opt/deployable/loopssustainability/docker/deploy.sh
|
||||
- echo "Completed Deployment"
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
# trigger:
|
||||
# branch:
|
||||
# - main
|
||||
# - feature/env_api_url
|
||||
# event:
|
||||
# - push
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
FROM node:21-alpine as builder
|
||||
|
||||
ARG API_BASE_URL="https://mfs-api.midastix.com"
|
||||
|
||||
ENV REACT_APP_API_BASE_URL $API_BASE_URL
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package.json
|
||||
COPY yarn.lock yarn.lock
|
||||
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn build
|
||||
|
||||
|
||||
FROM scratch
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/build ./build
|
||||
|
||||
CMD ["sh"]
|
||||
|
||||
Loading…
Reference in New Issue