Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Mgmt Services
Wellbore
Wellbore Domain Services
Commits
be3a51d9
Commit
be3a51d9
authored
Oct 01, 2021
by
Alexandre Vincent
Browse files
add jobs to verify existing requirements and generate upgraded
parent
23f6f087
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
be3a51d9
...
...
@@ -65,6 +65,52 @@ include:
-
project
:
"
osdu/platform/ci-cd-pipelines"
file
:
"
cloud-providers/aws-python.yml"
verify_existing_requirements
:
extends
:
-
.python
-
.skipForTriggeringMergeRequests
stage
:
build
before_script
:
-
pip3 install --upgrade pip-tools
script
:
-
pip-compile requirements.in --output-file requirements.ref
-
pip-compile requirements_dev.in --output-file requirements_dev.ref
# checking difference between existing requirements and the newly generated one
# and using the number of lines as exit status code
-
|
delta=$(diff -u requirements.txt requirements.ref | tee /dev/fd/2 | wc -l)
delta_dev=$(diff -u requirements_dev.txt requirements_dev.ref | tee /dev/fd/2 | wc -l)
exit $(expr "$delta" + "$delta_dev")
artifacts
:
when
:
always
paths
:
-
"
*.ref"
expire_in
:
2 days
generate_updated_requirements
:
extends
:
-
.python
-
.skipForTriggeringMergeRequests
stage
:
build
before_script
:
-
pip3 install --upgrade pip-tools
script
:
-
pip-compile requirements.in --upgrade --output-file requirements.upg
-
pip-compile requirements_dev.in --upgrade --output-file requirements_dev.upg
artifacts
:
when
:
always
paths
:
-
"
*.upg"
expire_in
:
2 days
containerize
:
extends
:
.skipForTriggeringMergeRequests
stage
:
containerize
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment