Update .gitlab-ci.yml

This commit is contained in:
Isaac Riley 2024-04-29 15:53:08 +02:00
parent a55b34379a
commit 626da20afd

View File

@ -1,53 +1,21 @@
include:
- project: "Gitlab/gitlab"
ref: 0.3.0
file: "/ci-templates/research/dvc-versioning-build-release.gitlab-ci.yml"
variables:
NEXUS_PROJECT_DIR: red
IMAGENAME: "${CI_PROJECT_NAME}"
#################################
# temp. disable integration tests, b/c they don't cover the CV analysis case yet
trigger integration tests:
rules:
- when: never
######
# DOCS
# The Docker image that will be used to build your app
image: python:3.10
# Functions that should be executed before the build script is run
before_script:
- pip install poetry
- poetry config virtualenvs.in-project true
- poetry install
pages:
stage: unit-tests
# before_script:
# - !reference [.activate-venv, script]
script:
- cp ./README.md ./docs/source/README.md && cp -r ./data ./docs/source/data/
- sphinx-apidoc ./src -o ./docs/source/modules --no-toc --module-first --follow-links --separate --force
- sphinx-build -b html docs/source/ public/ -E -a
- poetry run sphinx-apidoc ./src -o ./docs/source/modules --no-toc
--module-first --follow-links --separate --force
- poetry run sphinx-build -b html docs/source/ public/ -E -a
artifacts:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
# only:
# - main
########
# BUILDS
###### UPDATE/EDIT ######
# MAKE SURE TO SWITCH OUT ALL YOUR MODEL NAMES + VERSIONS
# name the job after the model it's using in the build, keep the prefix referencing `docker-build::`
release build:
stage: release
needs:
- job: set custom version
artifacts: true
optional: true
- job: calculate patch version
artifacts: true
optional: true
- job: calculate minor version
artifacts: true
optional: true
- job: build docker nexus
artifacts: true
#################################
rules:
# This ensures that only pushes to the default branch will trigger
# a pages deploy
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH