-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from NCI-GDC/feat/BINF-679-gitlab-ci
[BINF-670] Gitlab CI
- Loading branch information
Showing
17 changed files
with
276 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,3 +108,6 @@ ENV/ | |
# VSCode | ||
.vscode/ | ||
test-reports/ | ||
|
||
# Gitlab | ||
vars.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# To contribute improvements to CI/CD templates, please follow the Development guide at: | ||
# https://docs.gitlab.com/ee/development/cicd/templates.html | ||
# This specific template is located at: | ||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml | ||
include: | ||
- project: nci-gdc/gitlab-templates | ||
ref: master | ||
file: | ||
- templates/global/full.yaml | ||
- templates/python/full.yaml | ||
|
||
variables: | ||
BASE_CONTAINER_VERSION: "2.0.1" | ||
DOCKER_BUILDKIT: 1 | ||
PIP_EXTRA_INDEX_URL: https://nexus.osdc.io/repository/pypi-all/simple | ||
DOCKER_BUILD_OPTS: "--build-arg PIP_EXTRA_INDEX_URL=https://nexus.osdc.io/repository/pypi-all/simple" | ||
|
||
tox: | ||
image: ${BASE_CONTAINER_REGISTRY}/${REPO_PY_VERSION}-builder:${BASE_CONTAINER_VERSION} | ||
before_script: | ||
- mkdir -p /usr/share/man/man1 | ||
|
||
release: | ||
image: ${BASE_CONTAINER_REGISTRY}/${REPO_PY_VERSION}-builder:${BASE_CONTAINER_VERSION} | ||
|
||
.python_versions: | ||
parallel: | ||
matrix: | ||
- REPO_PY_VERSION: [python3.8] | ||
|
||
docker_build: | ||
rules: | ||
- when: always | ||
- if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
when: never | ||
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH | ||
variables: | ||
RELEASE_REGISTRY: containers.osdc.io/ncigdc # Override globally-defined RELEASE_REGISTRY | ||
- if: $CI_COMMIT_REF_NAME =~ /main/ | ||
variables: | ||
RELEASE_REGISTRY: containers.osdc.io/ncigdc | ||
script: | ||
- echo "docker build ${DOCKER_BUILD_OPTS} -t ${RELEASE_REGISTRY}/$CI_PROJECT_NAME:$VERSION ." | ||
- echo "docker push ${DOCKER_PUSH_OPTS} ${RELEASE_REGISTRY}/$CI_PROJECT_NAME:$VERSION" | ||
- docker build . | ||
--file ./Dockerfile | ||
${DOCKER_BUILD_OPTS} | ||
--build-arg http_proxy | ||
--build-arg https_proxy | ||
--build-arg BASE_CONTAINER_VERSION | ||
-t ${RELEASE_REGISTRY}/${CI_PROJECT_NAME}:${VERSION} | ||
- docker push ${DOCKER_PUSH_OPTS} ${RELEASE_REGISTRY}/${CI_PROJECT_NAME}:${VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
-c requirements.txt | ||
detect-secrets==1.0.3 | ||
detect-secrets==1.2.0 | ||
isort | ||
flake8 | ||
flake8-docstrings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.