test for multistage build
This commit is contained in:
parent
a768496858
commit
b4b9d42bf4
39
.drone.yml
39
.drone.yml
@ -1,37 +1,12 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: meshviewer build
|
name: meshviewer build
|
||||||
|
|
||||||
clone:
|
|
||||||
depth: 50
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# - name: clone git
|
- name: docker
|
||||||
# image: docker:git
|
image: plugins/docker
|
||||||
# commands:
|
settings:
|
||||||
# - git submodule update --recursive --init
|
repo: fftdf/meshviewer
|
||||||
|
target: meshviewer
|
||||||
- name: build on node 12
|
username: from_secret: docker_username
|
||||||
image: node:12.12.0-stretch
|
password: from_secret: docker_password
|
||||||
commands:
|
|
||||||
- node --version
|
|
||||||
- npm --version
|
|
||||||
- yarn --version
|
|
||||||
- pwd
|
|
||||||
- ls -alh
|
|
||||||
- npm i gulp-cli -g
|
|
||||||
- yarn
|
|
||||||
- gulp
|
|
||||||
|
|
||||||
# - name: backup-old-firmware
|
|
||||||
# image: appleboy/drone-ssh
|
|
||||||
# settings:
|
|
||||||
# host: 46.4.138.183
|
|
||||||
# username: fwupload
|
|
||||||
# key:
|
|
||||||
# from_secret: ssh-update
|
|
||||||
# port: 22
|
|
||||||
# command_timeout: 120m
|
|
||||||
# script:
|
|
||||||
# - ./rsync-backup.sh
|
|
||||||
# - rm -rf /srv/fwuploads/troisdorf/*
|
|
||||||
|
|
||||||
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# builder
|
||||||
|
FROM node:12.12.0-stretch as builder
|
||||||
|
|
||||||
|
# show versions
|
||||||
|
RUN node --version && npm --version && yarn --version
|
||||||
|
|
||||||
|
# install gulp
|
||||||
|
RUN npm i gulp-cli -g
|
||||||
|
|
||||||
|
# run yarn for prerequisits
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
|
# run gulp to build app
|
||||||
|
RUN gulp
|
||||||
|
|
||||||
|
|
||||||
|
# build docker container
|
||||||
|
FROM nginx:1.17.6-alpine as meshviewer
|
||||||
|
COPY --from=builder /drone/src/build /usr/share/nginx/html/
|
Loading…
Reference in New Issue
Block a user