[chore] - update pipeline

This commit is contained in:
2023-01-05 13:32:01 +07:00
parent 39574b2839
commit 1c4a4e2190
2 changed files with 47 additions and 0 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM node:12.19.0-buster AS compile-image
WORKDIR /opt/ng
COPY package.json /opt/ng/package.json
RUN npm install
RUN npm install -g @angular/cli
ENV PATH="./node_modules/.bin:$PATH"
COPY . ./
RUN ng build --configuration production --base-href /nggitea/ --deploy-url /nggitea/
FROM nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=compile-image /opt/ng/dist/ng-gitea /usr/share/nginx/html

33
drone.yaml Normal file
View File

@@ -0,0 +1,33 @@
kind: pipeline
type: docker
name: default
globals:
- &docker_creds
username:
from_secret: gitea_username
password:
from_secret: gitea_password
steps:
- name: API # building the API docker image
image: plugins/docker
settings:
dockerfile: Dockerfile
repo: gitea.71dev.com/Phet/ng-gitea
tags: dev
registry: "gitea.71dev.com"
#dry_run: true
debug: false
<<: *docker_creds
- name: deploy
image: sinlead/drone-kubectl
settings:
kubernetes_server: "https://202.129.205.205:6443"
kubernetes_cert:
from_secret: kube_ca_certificate
kubernetes_token:
from_secret: kube_token
# commands:
# - kubectl --insecure-skip-tls-verify --namespace=rmutr rollout restart deployment/rmutr-budget-api