Skip to content

Drone CI migration #1261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 0 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ before_install:
# Don't build on tags because we'll already have built the commit.
jobs:
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"
os: osx
if: tag IS blank
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ RUN mkdir -p /home/coder/project
# To avoid EACCES issues on f.ex Crostini (ChromeOS)
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

# This ensures we have a volume mounted even if the user forgot to do bind
Expand Down