2019-02-22 00:55:42 +07:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2019-09-17 23:26:59 +07:00
|
|
|
- 10.16.0
|
2019-04-26 21:00:15 +07:00
|
|
|
services:
|
2019-09-17 23:26:59 +07:00
|
|
|
- docker
|
|
|
|
|
2019-08-03 07:26:41 +07:00
|
|
|
before_install:
|
2019-09-17 23:26:59 +07:00
|
|
|
- export MAJOR_VERSION="2"
|
2020-01-08 07:27:41 +07:00
|
|
|
- export VSCODE_VERSION="1.41.1"
|
2019-09-17 23:26:59 +07:00
|
|
|
- export VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
|
2019-09-18 01:17:38 +07:00
|
|
|
- export TAG="$VERSION-vsc$VSCODE_VERSION"
|
2019-09-17 23:26:59 +07:00
|
|
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
|
|
|
|
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
|
|
|
|
|
|
|
|
# Don't build on tags because we'll already have built the commit.
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- name: "Linux build"
|
|
|
|
os: linux
|
|
|
|
dist: trusty
|
2019-10-23 06:43:21 +07:00
|
|
|
env: TARGET="linux" PUSH_DOCKER="true"
|
2019-09-17 23:26:59 +07:00
|
|
|
if: tag IS blank
|
2019-09-17 23:53:25 +07:00
|
|
|
script: scripts/ci.bash
|
2019-09-17 23:26:59 +07:00
|
|
|
- name: "Alpine build"
|
|
|
|
os: linux
|
|
|
|
dist: trusty
|
|
|
|
env: TARGET="alpine"
|
|
|
|
if: tag IS blank
|
2019-09-17 23:53:25 +07:00
|
|
|
script: scripts/ci.bash
|
2019-09-17 23:26:59 +07:00
|
|
|
- name: "MacOS build"
|
|
|
|
os: osx
|
|
|
|
if: tag IS blank
|
2019-10-26 01:12:04 +07:00
|
|
|
script: travis_wait 60 scripts/ci.bash
|
2019-09-17 23:26:59 +07:00
|
|
|
|
|
|
|
git:
|
|
|
|
depth: 3
|
|
|
|
|
2019-03-05 07:21:29 +07:00
|
|
|
before_deploy:
|
2019-09-18 01:17:38 +07:00
|
|
|
- echo "$TAG" "$TRAVIS_COMMIT"
|
2019-09-17 23:26:59 +07:00
|
|
|
- git config --local user.name "$USER_NAME"
|
|
|
|
- git config --local user.email "$USER_EMAIL"
|
2019-09-18 01:17:38 +07:00
|
|
|
- if ! git tag "$TAG" "$TRAVIS_COMMIT" ; then echo "$TAG already exists"; fi
|
2019-10-23 06:43:21 +07:00
|
|
|
- if [[ -n "$PUSH_DOCKER" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin ; fi
|
2019-09-17 23:26:59 +07:00
|
|
|
|
2019-03-05 07:21:29 +07:00
|
|
|
deploy:
|
2019-09-17 23:53:25 +07:00
|
|
|
- provider: releases
|
|
|
|
file_glob: true
|
2019-09-18 01:42:14 +07:00
|
|
|
draft: true
|
2019-09-18 01:17:38 +07:00
|
|
|
tag_name: "$TAG"
|
2019-09-17 23:53:25 +07:00
|
|
|
target_commitish: "$TRAVIS_COMMIT"
|
2019-09-18 01:17:38 +07:00
|
|
|
name: "$TAG"
|
2019-09-17 23:53:25 +07:00
|
|
|
skip_cleanup: true
|
|
|
|
api_key:
|
|
|
|
secure: YL/x24KjYjgYXPcJWk3FV7FGxI79Mh6gBECQEcdlf3fkLEoKFVgzHBoUNWrFPzyR4tgLyWNAgcpD9Lkme1TRWTom7UPjXcwMNyLcLa+uec7ciSAnYD9ntLTpiCuPDD1u0LtRGclSi/EHQ+F8YVq+HZJpXTsJeAmOmihma3GVbGKSZr+BRum+0YZSG4w+o4TOlYzw/4bLWS52MogZcwpjd+hemBbgXLuGU2ziKv2vEKCZFbEeA16II4x1WLI4mutDdCeh7+3aLzGLwDa49NxtsVYNjyNFF75JhCTCNA55e2YMiLz9Uq69IXe/mi5F7xUaFfhIqqLNyKBnKeEOzu3dYnc+8n3LjnQ+00PmkF05nx9kBn3UfV1kwQGh6QbyDmTtBP07rtUMyI14aeQqHjxsaVRdMnwj9Q2DjXRr8UDqESZF0rmK3pHCXS2fBhIzLE8tLVW5Heiba2pQRFMHMZW+KBE97FzcFh7is90Ait3T8enfcd/PWFPYoBejDAdjwxwOkezh5N5ZkYquEfDYuWrFi6zRFCktsruaAcA+xGtTf9oilBBzUqu8Ie+YFWH5me83xakcblJWdaW/D2rLJAJH3m6LFm8lBqyUgDX5t/etob6CpDuYHu5D1J3XINOj/+aLAcadq6qlh70PMZS3zYffUu3JlzaD2amlSHIT8b5YXFc=
|
|
|
|
file:
|
|
|
|
- release/*.tar.gz
|
|
|
|
- release/*.zip
|
|
|
|
on:
|
|
|
|
repo: cdr/code-server
|
|
|
|
branch: master
|
2019-09-18 01:17:38 +07:00
|
|
|
|
2019-09-17 23:53:25 +07:00
|
|
|
- provider: script
|
2019-09-18 02:21:23 +07:00
|
|
|
skip_cleanup: true
|
2020-01-09 04:04:58 +07:00
|
|
|
script: docker build -f ./scripts/ci.dockerfile -t codercom/code-server:"$TAG" . && docker push codercom/code-server:"$TAG"
|
2019-09-17 23:53:25 +07:00
|
|
|
on:
|
|
|
|
repo: cdr/code-server
|
|
|
|
branch: master
|
2019-10-23 06:43:21 +07:00
|
|
|
condition: -n "$PUSH_DOCKER"
|
2019-09-17 23:26:59 +07:00
|
|
|
|
2019-04-04 02:24:00 +07:00
|
|
|
cache:
|
2020-01-09 02:20:50 +07:00
|
|
|
timeout: 1000
|
2019-04-04 02:24:00 +07:00
|
|
|
yarn: true
|
|
|
|
directories:
|
2019-10-21 23:16:22 +07:00
|
|
|
- source
|