Updated CI to build dist archive
This commit is contained in:
parent
fb51930cc4
commit
1b3e25be9b
1 changed files with 6 additions and 3 deletions
|
|
@ -24,10 +24,13 @@ build:
|
||||||
- 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
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
# Install server
|
||||||
- $HOME/.poetry/bin/poetry install
|
- $HOME/.poetry/bin/poetry install
|
||||||
|
# Run static build script
|
||||||
- $HOME/.poetry/bin/poetry run build_static
|
- $HOME/.poetry/bin/poetry run build_static
|
||||||
- $HOME/.poetry/bin/poetry build
|
# Build distribution archive
|
||||||
- $HOME/.poetry/bin/poetry export --without-hashes -f requirements.txt > dist/requirements.txt
|
- mkdir -p dist
|
||||||
|
- tar -c --exclude-vcs --exclude-from .tarignore -vzf dist/openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz .
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "dist"
|
name: "dist"
|
||||||
|
|
@ -60,7 +63,7 @@ deploy:
|
||||||
- '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/${CI_COMMIT_REF_NAME} --delete
|
- 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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue