Commit 36d8b125 authored by Ottomata's avatar Ottomata
Browse files

Merge branch 'ci-release' into 'master'

Use workflow_utils gitlab_ci_templates to handle releases and artifact publishing

See merge request !33
parents 1ceabfd6 f2d363e9
Pipeline #3426 passed with stages
in 2 minutes and 31 seconds
[bumpversion]
current_version = 0.15.0.dev
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z0-9]+))?
serialize =
{major}.{minor}.{patch}.{release}
{major}.{minor}.{patch}.{release}
{major}.{minor}.{patch}
[bumpversion:part:release]
optional_value = unused
values =
dev
unused
[bumpversion:file:setup.cfg]
search = version = {current_version}
replace = version = {new_version}
# Include conda-dist.yml to
# add manual build_conda_env and publish_conda_env jobs.
variables:
# TODO: rename default branch to main.
RELEASE_BRANCH: master
# Include conda_artifact_repo.yml to add release and conda env publishing jobs.
include:
- project: 'repos/data-engineering/workflow_utils'
ref: v0.2.2
file: '/gitlab_ci_templates/conda-dist.yml'
stages:
- test
- publish
ref: v0.3.0
file: '/gitlab_ci_templates/pipelines/conda_artifact_repo.yml'
lint:
stage: test
# Don't depend on other jobs in this stage.
needs: []
rules:
- when: always
script:
- !reference [.conda_setup_script]
- pip install tox
- tox -e lint
test:
stage: test
# Don't depend on other jobs in this stage.
needs: []
rules:
- when: always
parallel:
matrix:
# Run the default testenv job each of these tox envs.
- tox_env: ['py37', 'py39']
script:
- !reference [.conda_setup_script]
- pip install tox
- tox -e ${tox_env}
# Match coverage total from job log output.
# See: https://docs.gitlab.com/ee/ci/yaml/index.html#coverage
coverage: '/^TOTAL.+?(\d+\%)$/'
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
when: always
reports:
......
......@@ -10,3 +10,16 @@ usually scheduled using [Airflow](https://wikitech.wikimedia.org/wiki/Analytics/
See
https://gitlab.wikimedia.org/repos/data-engineering/workflow_utils#building-project-conda-environments-for-distribution
# Automated releases
Releasing and versioning is handled using bump2version via workflow-utils `trigger_release` GitLab
CI Pipeline Job. To bump the version and do a release, manually run the `trigger_release` GitLab
Job on a main branch pipeline. This will cause the version to be bumped, and a tag and release
to be made. Creating a tag will cause the `publish_conda_env` job to run for the tag pipeline.
If you want to control which semantic part of the version is bumped after the release, you can
change the `POST_RELEASE_VERSION_BUMP` GitLab CI variable when you run the pipeline manually.
See [workflow-utils/gitlab_ci_templates/README.md](https://gitlab.wikimedia.org/repos/data-engineering/workflow_utils/-/blob/main/gitlab_ci_templates/README.md)
### Project config Sections ###
[metadata]
name = example_job_project
version = attr: example_job_project.__version__
name = example-job-project
version = 0.15.0.dev
author = Andrew Otto
author_email = otto@wikimedia.org
description = Example project for building conda dist envs for jobs in Analytics Data Lake
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment