Drone CI migration (#1261)
This commit is contained in:
parent
336ee28888
commit
3ce7129492
|
@ -0,0 +1,135 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-amd64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: node:12
|
||||||
|
commands:
|
||||||
|
- apt update && apt install -y build-essential git libsecret-1-dev libx11-dev libxkbfile-dev
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn package 1.41.1 daily ; else yarn package 1.41.1 $DRONE_TAG; fi
|
||||||
|
|
||||||
|
- name: build-alpine
|
||||||
|
image: node:12-alpine
|
||||||
|
commands:
|
||||||
|
- apk add libxkbfile-dev libsecret-dev build-base git
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn package 1.41.1 daily ; else yarn package 1.41.1 $DRONE_TAG; fi
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_token
|
||||||
|
files: release/*.tar.gz
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
- name: docker-publish
|
||||||
|
image: banzaicloud/drone-kaniko
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${DRONE_TAG}
|
||||||
|
build_args:
|
||||||
|
- codeServerVersion=${DRONE_TAG}
|
||||||
|
- vscodeVersion=1.41.1
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: build-arm64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: node:12
|
||||||
|
commands:
|
||||||
|
- apt update && apt install -y build-essential git libsecret-1-dev libx11-dev libxkbfile-dev
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn package 1.41.1 daily ; else yarn package 1.41.1 $DRONE_TAG; fi
|
||||||
|
|
||||||
|
- name: build-alpine
|
||||||
|
image: node:12-alpine
|
||||||
|
commands:
|
||||||
|
- apk add libxkbfile-dev libsecret-dev build-base git
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
- if [ -z $DRONE_TAG ]; then yarn package 1.41.1 daily ; else yarn package 1.41.1 $DRONE_TAG; fi
|
||||||
|
|
||||||
|
- name: publish
|
||||||
|
image: plugins/github-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: github_token
|
||||||
|
files: release/*.tar.gz
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
- name: docker-publish
|
||||||
|
image: banzaicloud/drone-kaniko
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_user
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
tags:
|
||||||
|
- latest-arm64
|
||||||
|
- ${DRONE_TAG}-arm64
|
||||||
|
build_args:
|
||||||
|
- codeServerVersion=$DRONE_TAG
|
||||||
|
- vscodeVersion=1.41.1
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
# ---
|
||||||
|
# kind: pipeline
|
||||||
|
# type: docker
|
||||||
|
# name: build-arm
|
||||||
|
#
|
||||||
|
# platform:
|
||||||
|
# arch: arm
|
||||||
|
#
|
||||||
|
# steps:
|
||||||
|
#
|
||||||
|
# - name: build
|
||||||
|
# image: node:12
|
||||||
|
# commands:
|
||||||
|
# - apt update && apt install -y build-essential git libsecret-1-dev libx11-dev libxkbfile-dev
|
||||||
|
# - yarn
|
||||||
|
# - if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
# - if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
#
|
||||||
|
# - name: build-alpine
|
||||||
|
# image: node:12-alpine
|
||||||
|
# commands:
|
||||||
|
# - apk add libxkbfile-dev libsecret-dev build-base git
|
||||||
|
# - if [ -z $DRONE_TAG ]; then yarn build 1.41.1 daily ; else yarn build 1.41.1 $DRONE_TAG; fi
|
||||||
|
# - if [ -z $DRONE_TAG ]; then yarn binary 1.41.1 daily ; else yarn binary 1.41.1 $DRONE_TAG; fi
|
||||||
|
# - if [ -z $DRONE_TAG ]; then yarn package 1.41.1 daily ; else yarn package 1.41.1 $DRONE_TAG; fi
|
||||||
|
#
|
||||||
|
# - name: publish
|
||||||
|
# image: plugins/github-release
|
||||||
|
# settings:
|
||||||
|
# api_key:
|
||||||
|
# from_secret: github_token
|
||||||
|
# files: release/*.tar.gz
|
||||||
|
# when:
|
||||||
|
# event: tag
|
12
.travis.yml
12
.travis.yml
|
@ -15,18 +15,6 @@ before_install:
|
||||||
# Don't build on tags because we'll already have built the commit.
|
# Don't build on tags because we'll already have built the commit.
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- name: "Linux build"
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
env: TARGET="linux" PUSH_DOCKER="true"
|
|
||||||
if: tag IS blank
|
|
||||||
script: scripts/ci.bash
|
|
||||||
- name: "Alpine build"
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
env: TARGET="alpine"
|
|
||||||
if: tag IS blank
|
|
||||||
script: scripts/ci.bash
|
|
||||||
- name: "MacOS build"
|
- name: "MacOS build"
|
||||||
os: osx
|
os: osx
|
||||||
if: tag IS blank
|
if: tag IS blank
|
||||||
|
|
|
@ -49,6 +49,11 @@ RUN mkdir -p /home/coder/project
|
||||||
# To avoid EACCES issues on f.ex Crostini (ChromeOS)
|
# To avoid EACCES issues on f.ex Crostini (ChromeOS)
|
||||||
RUN mkdir -p /home/coder/.local/share/code-server
|
RUN mkdir -p /home/coder/.local/share/code-server
|
||||||
|
|
||||||
|
# FIXME: permission fix required for bind-mounts
|
||||||
|
# See GH-1270
|
||||||
|
RUN sudo chmod -R g+rw /home/coder/project && sudo chmod -R g+rw /home/coder/.local/share/code-server && \
|
||||||
|
sudo chown -R coder:coder /home/coder
|
||||||
|
|
||||||
WORKDIR /home/coder/project
|
WORKDIR /home/coder/project
|
||||||
|
|
||||||
# This ensures we have a volume mounted even if the user forgot to do bind
|
# This ensures we have a volume mounted even if the user forgot to do bind
|
||||||
|
|
Loading…
Reference in New Issue