Added some comments

This commit is contained in:
Joel Collins 2019-10-01 18:16:57 +00:00
parent 7206f93714
commit 4949076234

View file

@ -2,20 +2,24 @@ stages:
- build - build
- deploy - deploy
# Cache modules in between jobs # Cache modules in between jobs
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
- node_modules/ - node_modules/
# Electron app build # Electron app build
build: 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
artifacts: artifacts:
name: "dist" name: "dist"
expire_in: 1 week expire_in: 1 week
@ -25,26 +29,36 @@ build:
- "./release-builds/*.exe.blockmap" - "./release-builds/*.exe.blockmap"
- "./release-builds/latest*.yml" - "./release-builds/latest*.yml"
- "./release-builds/beta*.yml" - "./release-builds/beta*.yml"
only: only:
- merge_requests - merge_requests
- stable - stable
- web - web
# Deploy to builds.openflexure.org # Deploy to builds.openflexure.org
deploy: deploy:
stage: deploy stage: deploy
dependencies: dependencies:
- build - build
image: ubuntu:latest image: ubuntu:latest
before_script: before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY_BATH_OPENFLEXURE_BASE64" | base64 --decode) - ssh-add <(echo "$SSH_PRIVATE_KEY_BATH_OPENFLEXURE_BASE64" | base64 --decode)
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
script: script:
# Install rsync if not already installed
- 'which rsync || ( apt-get update -y && apt-get install rsync -y )' - 'which rsync || ( apt-get update -y && apt-get install rsync -y )'
# Upload the builds folder to openflexure-microscope builds
- rsync -hrvz -e ssh release-builds/ ci-user@openflexure.bath.ac.uk:/var/www/build/openflexure-ev/ - rsync -hrvz -e ssh release-builds/ ci-user@openflexure.bath.ac.uk:/var/www/build/openflexure-ev/
# Run update-latest.py on the build server
- ssh -t ci-user@openflexure.bath.ac.uk "/var/www/build/update-latest.py" - ssh -t ci-user@openflexure.bath.ac.uk "/var/www/build/update-latest.py"
only: only:
- stable - stable