code-server/.drone.yml

443 lines
7.9 KiB
YAML
Raw Normal View History

2020-01-16 03:14:05 +08:00
kind: pipeline
type: docker
2020-01-15 02:29:57 +08:00
name: amd64:linux
2020-01-16 03:14:05 +08:00
platform:
arch: amd64
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine/git
commands:
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12
commands:
- ./scripts/cacher.sh
2020-01-16 03:14:05 +08:00
2020-01-15 02:29:57 +08:00
- name: build
image: codercom/nbin:centos
2020-01-15 02:29:57 +08:00
commands:
- yum install -y libxkbfile-devel libsecret-devel
- . /opt/rh/devtoolset-6/enable
2020-01-15 02:29:57 +08:00
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
- name: cache:package
image: node:12
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12
commands:
- yarn test
- name: publish:github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: release/*.tar.gz
draft: true
overwrite: true
title: ${DRONE_TAG}
2020-01-15 02:29:57 +08:00
when:
event: tag
- name: publish:docker
image: plugins/docker
2020-01-15 02:29:57 +08:00
settings:
username:
from_secret: docker_user
password:
from_secret: docker_pass
repo: codercom/code-server
dockerfile: scripts/ci.dockerfile
2020-01-15 02:29:57 +08:00
tags:
- ${DRONE_TAG}
when:
2020-01-16 03:14:05 +08:00
event: tag
- name: publish:gcs
image: plugins/gcs
settings:
2020-02-05 03:27:46 +08:00
source: binary-upload
target: codesrv-ci.cdr.sh/
token:
from_secret: gcs-token
when:
event: tag
2020-01-15 02:29:57 +08:00
---
kind: pipeline
type: docker
name: amd64:alpine
platform:
arch: amd64
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine/git
commands:
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12-alpine
commands:
- ./scripts/cacher.sh
- name: build
image: node:12-alpine
commands:
- apk add libxkbfile-dev libsecret-dev build-base git bash python
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
- name: cache:package
image: node:12-alpine
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12-alpine
commands:
- yarn test
- name: publish:github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: release/*.tar.gz
draft: true
overwrite: true
title: ${DRONE_TAG}
2020-01-15 02:29:57 +08:00
when:
event: tag
- name: publish:gcs
image: plugins/gcs
settings:
2020-02-05 03:27:46 +08:00
source: binary-upload
target: codesrv-ci.cdr.sh/
token:
from_secret: gcs-token
when:
event: tag
2020-01-15 02:29:57 +08:00
---
kind: pipeline
type: docker
name: arm64:linux
platform:
arch: arm64
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine
commands:
- apk add git
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12
commands:
- ./scripts/cacher.sh
- name: build
image: node:12
commands:
- apt update && apt install -y build-essential git libsecret-1-dev libx11-dev libxkbfile-dev
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
- name: cache:package
image: node:12
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12
commands:
- yarn test
- name: publish:github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: release/*.tar.gz
draft: true
overwrite: true
title: ${DRONE_TAG}
2020-01-15 02:29:57 +08:00
when:
event: tag
- name: publish:docker
image: plugins/docker
2020-01-15 02:29:57 +08:00
settings:
username:
from_secret: docker_user
password:
from_secret: docker_pass
repo: codercom/code-server
dockerfile: scripts/ci.dockerfile
2020-01-15 02:29:57 +08:00
tags:
- ${DRONE_TAG}-arm64
when:
event: tag
2020-01-16 03:14:05 +08:00
- name: publish:gcs
image: plugins/gcs
settings:
2020-02-05 03:27:46 +08:00
source: binary-upload
target: codesrv-ci.cdr.sh/
token:
from_secret: gcs-token
when:
event: tag
2020-01-16 03:14:05 +08:00
---
kind: pipeline
type: docker
2020-01-15 02:29:57 +08:00
name: arm64:alpine
2020-01-16 03:14:05 +08:00
platform:
arch: arm64
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine
commands:
- apk add git
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12-alpine
commands:
- ./scripts/cacher.sh
- name: build
image: node:12-alpine
commands:
- apk add libxkbfile-dev libsecret-dev build-base git bash python
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
- name: cache:package
image: node:12-alpine
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12-alpine
commands:
- yarn test
- name: publish:github
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files: release/*.tar.gz
draft: true
overwrite: true
title: ${DRONE_TAG}
2020-01-15 02:29:57 +08:00
when:
event: tag
- name: publish:gcs
image: plugins/gcs
settings:
2020-02-05 03:27:46 +08:00
source: binary-upload
target: codesrv-ci.cdr.sh/
token:
from_secret: gcs-token
when:
event: tag
2020-01-15 02:29:57 +08:00
---
kind: pipeline
type: docker
name: arm:linux
platform:
arch: arm
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine
commands:
- apk add git
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12
commands:
- ./scripts/cacher.sh
- name: build
image: node:12
commands:
- apt update && apt install -y build-essential git libsecret-1-dev libx11-dev libxkbfile-dev
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
2020-01-16 03:14:05 +08:00
2020-01-15 02:29:57 +08:00
- name: cache:package
image: node:12
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12
failure: ignore
2020-01-15 02:29:57 +08:00
commands:
- yarn test
# - name: publish:github
# image: plugins/github-release
# settings:
# api_key:
# from_secret: github_token
# files: release/*.tar.gz
# draft: true
# overwrite: true
# title: ${DRONE_TAG}
# when:
# event: tag
# - name: publish:docker
# image: plugins/docker
# settings:
# username:
# from_secret: docker_user
# password:
# from_secret: docker_pass
# repo: codercom/code-server
# dockerfile: scripts/ci.dockerfile
# tags:
# - ${DRONE_TAG}-arm
# when:
# event: tag
2020-01-16 03:14:05 +08:00
2020-01-15 02:29:57 +08:00
---
kind: pipeline
type: docker
name: arm:alpine
platform:
arch: arm
steps:
2020-02-05 03:27:46 +08:00
- name: submodules
image: alpine
commands:
- apk add git
- git submodule update --init
2020-01-15 02:29:57 +08:00
- name: cache:restore
image: node:12-alpine
commands:
- ./scripts/cacher.sh
- name: build
image: node:12-alpine
commands:
- apk add libxkbfile-dev libsecret-dev build-base git bash python
- timeout 50m ./scripts/ci.bash || echo 'Timed out or failed; continuing so we can preserve cache for the next run'
- name: cache:package
image: node:12-alpine
commands:
- ./scripts/cacher.sh
when:
event: push
- name: cache:push
image: plugins/gcs
settings:
source: cache-upload/
target: codesrv-ci.cdr.sh
token:
from_secret: gcs-token
when:
event: push
- name: test
image: node:12-alpine
failure: ignore
2020-01-15 02:29:57 +08:00
commands:
- yarn test
# - name: publish:github
# image: plugins/github-release
# failure: ignore
# settings:
# api_key:
# from_secret: github_token
# files: release/*.tar.gz
# draft: true
# overwrite: true
# title: ${DRONE_TAG}
# when:
# event: tag