mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-05-13 13:58:57 +00:00
* basic workflow sketch * metrics server also needs lint * update names * latest? * that's weird. * ok that's a start. refactor next * fix path * oops * ah * no op * make it like the other ones * refactor scripts * fix shellcheck * ah okay * upload mac artifact * Update .travis.yml Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com> * comments * add todo Co-authored-by: Vinicius Fortuna <fortuna@users.noreply.github.com>
103 lines
4.4 KiB
YAML
103 lines
4.4 KiB
YAML
# -- DEPRECATED: FOR REFERENCE ONLY --
|
|
# Due to security issues with travis, we are in the process
|
|
# of migrating to github actions: https://github.com/features/actions.
|
|
|
|
language: node_js
|
|
|
|
node_js:
|
|
- "12"
|
|
|
|
cache:
|
|
directories:
|
|
- $HOME/.cache/electron
|
|
- $HOME/.cache/electron-builder
|
|
|
|
before_install:
|
|
# Install latest Docker for BuildKit support if running on linux. See https://docs.travis-ci.com/user/docker/
|
|
- |
|
|
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
sudo apt-get update
|
|
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
|
fi;
|
|
|
|
stages:
|
|
- name: "Server Daily Release"
|
|
if: type = cron
|
|
- name: "Deploy Server"
|
|
if: tag =~ ^server-
|
|
- name: "Manager Release"
|
|
if: tag =~ ^v[0-9]
|
|
|
|
# Stages with the same name define multiple jobs which run in parallel.
|
|
jobs:
|
|
include:
|
|
- stage: "Server Daily Release"
|
|
script:
|
|
- CREATE_RELEASE_URL=https://api.github.com/repos/Jigsaw-Code/outline-server/releases?access_token=$CI_USER_TOKEN
|
|
- SERVER_RELEASE_NAME=server-$(date -I)
|
|
- curl --data '{"tag_name":"'$SERVER_RELEASE_NAME'","name":"'$SERVER_RELEASE_NAME'","prerelease":true}' $CREATE_RELEASE_URL
|
|
- MANAGER_RELEASE_NAME=v$(date -I)
|
|
- curl --data '{"tag_name":"'$MANAGER_RELEASE_NAME'","name":"'$MANAGER_RELEASE_NAME'","prerelease":true}' $CREATE_RELEASE_URL
|
|
- stage: "Deploy Server"
|
|
name: Server Testing
|
|
sudo: required
|
|
services: docker
|
|
script:
|
|
# https://docs.travis-ci.com/user/docker/
|
|
- |
|
|
sudo rm -f /usr/local/bin/docker-compose
|
|
curl -L https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m) > docker-compose
|
|
chmod +x docker-compose
|
|
sudo mv docker-compose /usr/local/bin
|
|
- npm run action shadowbox/test
|
|
- npm run action shadowbox/docker/build && cd src/shadowbox/integration_test && ./test.sh
|
|
|
|
- stage: "Deploy Server"
|
|
name: Server Docker Image
|
|
sudo: required
|
|
services: docker
|
|
script:
|
|
- npm run action shadowbox/docker/build
|
|
- docker login quay.io -u="$QUAY_IO_USERNAME" -p="$QUAY_IO_PASSWORD"
|
|
- docker tag outline/shadowbox quay.io/outline/shadowbox:$TRAVIS_TAG
|
|
- docker push quay.io/outline/shadowbox:$TRAVIS_TAG
|
|
- docker tag outline/shadowbox quay.io/outline/shadowbox:daily
|
|
- docker push quay.io/outline/shadowbox:daily
|
|
|
|
# Note that because we cannot currently sign Windows binaries on Travis,
|
|
# these must be manually built and uploaded to the releases page.
|
|
- stage: "Manager Release"
|
|
name: Manager Linux
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- rpm
|
|
script: npm run action server_manager/electron_app/release_linux
|
|
|
|
- stage: "Manager Release"
|
|
os: osx
|
|
# electron-builder requires macOS >=10.13.6 for signing to work.
|
|
osx_image: xcode10.1
|
|
name: Manager macOS
|
|
script:
|
|
- openssl aes-256-cbc -K $encrypted_61a49da75942_key -iv $encrypted_61a49da75942_iv -in macos-signing-certificate.p12.enc -out macos-signing-certificate.p12 -d
|
|
- export CSC_LINK=$(pwd)/macos-signing-certificate.p12
|
|
# Must run npm again due to the OS change, required for signing to work.
|
|
- npm install && npm run action server_manager/electron_app/release_macos
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: "0uQ8HgYBpzeXG+m/q6FUrcvQe+30YkbuGej/nT4mAj9VhX7Ft/5PdsB6lFiUjc/OnNLbaMdIHJj2MO5SDy55A4d5gC/LN4hcvwWKY+sRephyMnu3f0Nepy1bZbA1rud4MToSv7K3aD24f7AWNNiwz8f/CdvENt6fDu53GuPZLPUDR6TzMy1JBZ3jyLDpy7Cjue24B9XUaXWzBpwFD1TpeKJ37O5V655+VWWPuYWUY2or0N6Iohunhrp1IhQAM7Cw4zln94prXmdX9bux8OP6U73gnyvTf7eGG4SjzypqqCL7VzqzUmDqYm072t2jvTwtjWjUt0vTE4UfOituDBK8VXqIpa4GGk3HBbx40GEQxVXJNCJl48cZsmEPZB+w4mPgxO9EWA/SpBNloqJuvfbspczYgvrM1/p5169PcXScVF+6iV+EWUeMKrymXOmJ4LpjttCDCTg/3AfwHCbAD+4JuLLMETfWeeZQ/4w3HBwxRRUFyvryLHmshuCahJxICWeJMtxftkA3O8e9Kc6P6x/G0JKDrSLeNJcY4vyKwpe4R9uJWk0A5lAnklFKgSXNT394/TNXpuTXuarZD6VaJcx9ieBQNkzpmi9RoLTjdnigmYeTWdPFrhOP/0fJu05U3nyH0NpKscG0e3+kG0XTJOHhYSwp/UknZb4rfR+BmqSTGik="
|
|
file_glob: true
|
|
file: "build/server_manager/electron_app/static/dist/*.*"
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|
|
|
|
env:
|
|
global:
|
|
- ELECTRON_CACHE=$HOME/.cache/electron
|
|
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
|