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
|
||||
name: meshviewer build
|
||||
|
||||
clone:
|
||||
depth: 50
|
||||
|
||||
steps:
|
||||
# - name: clone git
|
||||
# image: docker:git
|
||||
# commands:
|
||||
# - git submodule update --recursive --init
|
||||
|
||||
- name: build on node 12
|
||||
image: node:12.12.0-stretch
|
||||
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/*
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: fftdf/meshviewer
|
||||
target: meshviewer
|
||||
username: from_secret: docker_username
|
||||
password: from_secret: docker_password
|
||||
|
||||
|
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