Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pygwinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
gwinc
pygwinc
Commits
9bca25ab
Commit
9bca25ab
authored
4 years ago
by
Jameson Graef Rollins
Browse files
Options
Downloads
Patches
Plain Diff
CI: export PYTHONPATH for inspiral_range in noise_change_approval job
parent
9cc0aa3c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#121914
passed
4 years ago
Stage: dist
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-3
5 additions, 3 deletions
.gitlab-ci.yml
gwinc/test/__main__.py
+1
-0
1 addition, 0 deletions
gwinc/test/__main__.py
with
6 additions
and
3 deletions
.gitlab-ci.yml
+
5
−
3
View file @
9bca25ab
...
...
@@ -62,6 +62,7 @@ noise_change_approval:
-
if
:
$CI_MERGE_REQUEST_ID
image
:
$CI_REGISTRY_IMAGE/gwinc/base:$CI_COMMIT_REF_NAME
script
:
-
export PYTHONPATH=/inspiral_range
-
|
cat <<EOF > check_approved.py
import sys
...
...
@@ -76,16 +77,17 @@ noise_change_approval:
approvals = mr.approvals.get()
print(approvals.approved)
EOF
-
e
cho $CI_MERGE_REQUEST_PROJECT_ID, $CI_MERGE_REQUEST_IID, $CI_MERGE_REQUEST_TARGET_BRANCH_NAME,
-
e
xport | grep '^CI_'
-
approved=$(python3 check_approved.py $CI_MERGE_REQUEST_PROJECT_ID $CI_MERGE_REQUEST_IID )
-
if [[ $approved != True ]] ; then
-
echo "Approval not yet given, checking for noise changes..."
-
target=origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
-
if ! python3 -m gwinc.test --git-rev $target -r gwinc_test_report.pdf ; then
-
echo "NOISE CHANGES RELATIVE TO $CI_MERGE_REQUEST_TARGET_BRANCH_NAME."
-
echo "Approval required to merge this branch."
-
/bin/false
-
else
-
echo "No noise changes detected."
-
echo "No noise changes detected
, merge may proceed
."
-
fi
-
else
-
echo "Merge request approved, noise change accepted."
...
...
@@ -94,7 +96,7 @@ noise_change_approval:
when
:
on_failure
paths
:
-
gwinc_test_report.pdf
expose_as
:
'
noise
changes
relative
to
target
branch'
expose_as
:
'
PDF
report
of
noise
changes
relative
to
target
branch'
# generate the html doc web pages. the "pages" job has special
# meaning, as it's "public" artifact becomes the directory served
...
...
This diff is collapsed.
Click to expand it.
gwinc/test/__main__.py
+
1
−
0
View file @
9bca25ab
...
...
@@ -19,6 +19,7 @@ from ..io import load_hdf5
try
:
import
inspiral_range
except
ImportError
:
logging
.
warning
(
"
inspiral_range package not found, range will not be calculated
"
)
inspiral_range
=
None
...
...
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