Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
ldv_datamanagement_tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LDV
ldv_datamanagement_tasks
Commits
ef9d4f2c
Commit
ef9d4f2c
authored
3 years ago
by
Klaas Kliffen
Browse files
Options
Downloads
Patches
Plain Diff
Add placeholder ci/cd pipeline and dummy package
parent
5ce8eb11
No related branches found
No related tags found
No related merge requests found
Pipeline
#39004
failed
3 years ago
Stage: lint
Stage: test
Stage: build
Stage: publish
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+72
-0
72 additions, 0 deletions
.gitlab-ci.yml
map/__init__.py
+1
-0
1 addition, 0 deletions
map/__init__.py
map/cool_module.py
+4
-0
4 additions, 0 deletions
map/cool_module.py
with
77 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
72
−
0
View file @
ef9d4f2c
default
:
image
:
python3.10-slim
stages
:
-
lint
-
test
-
build
-
publish
# publish instead of deploy
# Caching of dependencies to speed up builds
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
cache
:
paths
:
-
.cache/pip
-
venv/
# Make sure each step is executed in a virtual environment with some basic dependencies present
before_script
:
-
python --version
# For debugging
-
pip install --upgrade virtualenv twine wheel pipenv black flake8
# common packaging requirements
-
virtualenv venv --system-site-packages
#provide the installed packages
-
source venv/bin/activate
run_black
:
stage
:
lint
script
:
-
echo "run black"
run_flake8
:
stage
:
lint
script
:
-
echo "run flake8"
run_unit_tests
:
stage
:
test
script
:
-
echo "run python unit tests"
package_files
:
stage
:
build
# add storing of the build artefact
script
:
-
echo "python setup.py sdist bdist_wheel
# or something similar"
publish_on_gitlab
:
stage
:
publish
environment
:
gitlab
script
:
-
echo "run twine for gitlab"
# - sed -i "s/BUILD_ID/.dev${CI_JOB_ID}/g" VERSION
# - python setup.py sdist bdist_wheel # todo replace this with reading the build artefact
# - |
# TWINE_PASSWORD=${CI_JOB_TOKEN} \
# TWINE_USERNAME=gitlab-ci-token \
# python -m twine upload \
# --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
publish_on_pipy
:
stage
:
publish
environment
:
pipy
script
:
-
echo "run twine for pipy"
# - sed -i "s/BUILD_ID/.dev${CI_JOB_ID}/g" VERSION
# - python setup.py sdist bdist_wheel # todo replace this with reading the build artefact from `package_file`` step
# - |
# TWINE_PASSWORD=${PIPY_TOKEN} \
# TWINE_USERNAME=${PIPY_USERNAME} \
# python -m twine upload \
# --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*
# TODO: replace URL with a pipy URL
This diff is collapsed.
Click to expand it.
map/__init__.py
0 → 100644
+
1
−
0
View file @
ef9d4f2c
"""
My Awesome Package
"""
This diff is collapsed.
Click to expand it.
map/cool_module.py
0 → 100644
+
4
−
0
View file @
ef9d4f2c
"""
Cool module containing functions, classes and other useful things
"""
def
greeter
():
print
(
"
Hello World!
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment