Allow code quality jobs to retry
This commit is contained in:
parent
3058c67542
commit
f15a5c73d1
1 changed files with 11 additions and 11 deletions
|
|
@ -3,17 +3,17 @@ 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/
|
||||||
|
|
||||||
pylint:
|
pylint:
|
||||||
stage: analysis
|
stage: analysis
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
allow_failure: false
|
allow_failure: false
|
||||||
|
retry: 3
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
||||||
|
|
@ -34,6 +34,7 @@ black:
|
||||||
stage: analysis
|
stage: analysis
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
retry: 3
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
||||||
|
|
@ -80,31 +81,30 @@ build:
|
||||||
- tags
|
- tags
|
||||||
- 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
|
# 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
|
# Upload the builds folder to openflexure-microscope builds
|
||||||
- rsync -hrvz -e ssh dist/ ci-user@openflexure.bath.ac.uk:/var/www/build/openflexure-microscope-server
|
- rsync -hrvz -e ssh dist/ ci-user@openflexure.bath.ac.uk:/var/www/build/openflexure-microscope-server
|
||||||
|
|
||||||
# Run update-latest.py on the build server
|
# 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:
|
||||||
- tags
|
- tags
|
||||||
- web
|
- web
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue