Merge branch 'ssh-deploy' into 'master'
Use openflexure.bath.ac.uk as update server See merge request openflexure/openflexure-microscope-jsclient!38
This commit is contained in:
commit
dd63a21064
4 changed files with 29 additions and 63 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- meta
|
- deploy
|
||||||
|
|
||||||
# Cache modules in between jobs
|
# Cache modules in between jobs
|
||||||
cache:
|
cache:
|
||||||
|
|
@ -8,71 +8,42 @@ cache:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
|
|
||||||
# Basic webapp build
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
image: electronuserland/builder:wine
|
|
||||||
script:
|
|
||||||
- npm install
|
|
||||||
- npm run build:web
|
|
||||||
artifacts:
|
|
||||||
name: "build"
|
|
||||||
paths:
|
|
||||||
- dist/
|
|
||||||
only:
|
|
||||||
- stable
|
|
||||||
- tags
|
|
||||||
- web
|
|
||||||
|
|
||||||
|
|
||||||
# Electron app build
|
# Electron app build
|
||||||
package:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
image: electronuserland/builder:wine
|
image: electronuserland/builder:wine
|
||||||
script:
|
script:
|
||||||
- npm install
|
- npm install
|
||||||
- npm run build:app
|
- npm run build:app
|
||||||
- npm run release
|
- npm run release
|
||||||
- shopt -s extglob
|
|
||||||
- mv ./release-builds/*.AppImage .
|
|
||||||
- mv ./release-builds/*.deb .
|
|
||||||
- mv ./release-builds/*.exe .
|
|
||||||
- mv ./release-builds/*.exe.blockmap .
|
|
||||||
- mv ./release-builds/?(beta*.yml|latest*.yml) .
|
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "dist"
|
name: "dist"
|
||||||
|
expire_in: 1 hour
|
||||||
paths:
|
paths:
|
||||||
- "*.AppImage"
|
- "./release-builds/*.AppImage"
|
||||||
- "*.deb"
|
- "./release-builds/*.exe"
|
||||||
- "*.exe"
|
- "./release-builds/*.exe.blockmap"
|
||||||
- "*.exe.blockmap"
|
- "./release-builds/latest*.yml"
|
||||||
- "latest*.yml"
|
- "./release-builds/beta*.yml"
|
||||||
- "beta*.yml"
|
|
||||||
only:
|
only:
|
||||||
- stable
|
- web
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
dependencies:
|
||||||
|
- build
|
||||||
|
image: ubuntu:latest
|
||||||
|
before_script:
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- ssh-add <(echo "$SSH_PRIVATE_KEY_BASE64" | base64 --decode)
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||||
|
script:
|
||||||
|
- 'which rsync || ( apt-get update -y && apt-get install rsync -y )'
|
||||||
|
- mkdir -p "./release-builds"
|
||||||
|
- rsync -hrvz -e ssh release-builds/ ci-user@openflexure.bath.ac.uk:/var/www/build/openflexure-ev/
|
||||||
|
only:
|
||||||
- web
|
- web
|
||||||
|
|
||||||
# Create a nupkg file for Choco package manager
|
|
||||||
meta:choco:
|
|
||||||
stage: meta
|
|
||||||
dependencies:
|
|
||||||
- package
|
|
||||||
image: patrickhuber/choco-linux
|
|
||||||
script:
|
|
||||||
- chmod +x ./app/make-nupkg.sh
|
|
||||||
- ./app/make-nupkg.sh
|
|
||||||
- cd ./release-builds/choco
|
|
||||||
- choco pack
|
|
||||||
- cd ../../
|
|
||||||
- mv ./release-builds/choco/openflexure-ev.nuspec .
|
|
||||||
- mv ./release-builds/choco/*.nupkg .
|
|
||||||
- mv ./release-builds/choco/tools .
|
|
||||||
artifacts:
|
|
||||||
name: "openflexure-ev-choco-nupkg"
|
|
||||||
paths:
|
|
||||||
- ./openflexure-ev.nuspec
|
|
||||||
- tools/chocolateyInstall.ps1
|
|
||||||
- ./*.nupkg
|
|
||||||
only:
|
|
||||||
- tags
|
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,6 @@ const { store } = require('./store')
|
||||||
// Auto upadater
|
// Auto upadater
|
||||||
autoUpdater.autoDownload = false;
|
autoUpdater.autoDownload = false;
|
||||||
|
|
||||||
autoUpdater.setFeedURL({
|
|
||||||
provider: "generic",
|
|
||||||
url: "https://gitlab.com/openflexure/openflexure-microscope-jsclient/-/jobs/artifacts/stable/raw?job=package"
|
|
||||||
});
|
|
||||||
|
|
||||||
autoUpdater.on('checking-for-update', function () {});
|
autoUpdater.on('checking-for-update', function () {});
|
||||||
|
|
||||||
autoUpdater.on('update-available', function (info) {
|
autoUpdater.on('update-available', function (info) {
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@ directories:
|
||||||
output: release-builds
|
output: release-builds
|
||||||
buildResources: app/resources
|
buildResources: app/resources
|
||||||
appId: org.openflexure.ev
|
appId: org.openflexure.ev
|
||||||
artifactName: ${name}-${os}-${arch}.${ext}
|
artifactName: ${name}-${version}-${os}-${arch}.${ext}
|
||||||
asar: true
|
asar: true
|
||||||
publish:
|
publish:
|
||||||
- provider: generic
|
- provider: generic
|
||||||
url: https://gitlab.com
|
url: https://build.openflexure.org/openflexure-ev/
|
||||||
files:
|
files:
|
||||||
- filter:
|
- filter:
|
||||||
- '**/*'
|
- '**/*'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openflexure-ev",
|
"name": "openflexure-ev",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "An electron-based user client for the OpenFlexure Microscope Server",
|
"description": "An electron-based user client for the OpenFlexure Microscope Server",
|
||||||
"author": "OpenFlexure <contact@openflexure.org> (https://www.openflexure.org)",
|
"author": "OpenFlexure <contact@openflexure.org> (https://www.openflexure.org)",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue