Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osc-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
mpcdf
obs
osc-plugins
Commits
7bf0f12f
There was a problem fetching the pipeline summary.
Commit
7bf0f12f
authored
7 years ago
by
Lorenz Huedepohl
Browse files
Options
Downloads
Patches
Plain Diff
No more default distribution
parent
662c3384
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mpcdf_common.py
+7
-1
7 additions, 1 deletion
mpcdf_common.py
mpcdf_setup_repos.py
+1
-5
1 addition, 5 deletions
mpcdf_setup_repos.py
with
8 additions
and
6 deletions
mpcdf_common.py
+
7
−
1
View file @
7bf0f12f
...
...
@@ -147,7 +147,7 @@ def mpcdf_enable_repositories(api_url, project, package, verbose=False):
return
True
def
mpcdf_setup_repos
(
api_url
,
project
,
distribution
,
parent
=
None
,
packages
=
None
,
dry_run
=
False
):
def
mpcdf_setup_repos
(
api_url
,
project
,
distribution
=
None
,
parent
=
None
,
packages
=
None
,
dry_run
=
False
):
if
parent
:
for
attribute
in
[
"
MPCDF:compiler_modules
"
,
"
MPCDF:mpi_modules
"
,
"
MPCDF:cuda_modules
"
]:
try
:
...
...
@@ -160,6 +160,12 @@ def mpcdf_setup_repos(api_url, project, distribution, parent=None, packages=None
mpis
=
list
(
get_attribute_values
(
api_url
,
project
,
None
,
"
MPCDF:mpi_modules
"
))
cudas
=
list
(
get_attribute_values
(
api_url
,
project
,
None
,
"
MPCDF:cuda_modules
"
))
if
distribution
is
None
:
# Get existing value from project meta
distribution
=
project_meta
(
api_url
,
project
if
parent
is
None
else
parent
).
find
(
"
./repository[@name=
'
System
'
]/path[@project=
'
distributions
'
]
"
).
get
(
"
repository
"
)
print
(
"
Using
'
{0}
'
as base distribution
"
.
format
(
distribution
))
distributions
=
project_meta
(
api_url
,
"
distributions
"
)
dist_repo
=
distributions
.
find
(
'
./repository[@name=
"
{0}
"
]
'
.
format
(
distribution
))
if
dist_repo
is
None
:
...
...
This diff is collapsed.
Click to expand it.
mpcdf_setup_repos.py
+
1
−
5
View file @
7bf0f12f
...
...
@@ -9,16 +9,12 @@ import osc.conf
import
osc.core
import
osc.cmdln
default_distribution
=
"
SLE_12_SP1
"
@osc.cmdln.option
(
'
-n
'
,
'
--dry-run
'
,
action
=
"
store_true
"
,
help
=
"
Do not actually run anything but output the resulting XML configuration
"
)
@osc.cmdln.option
(
'
--parent
'
,
metavar
=
"
PARENT
"
,
help
=
"
Setup the repositories to be based on the upstream project PARENT (e.g. for home: projects)
"
)
@osc.cmdln.option
(
'
--distribution
'
,
default
=
default_distribution
,
help
=
"
Base distribution [default: %default]
"
)
help
=
"
Base distribution, necessary argument unless set previously for this project
"
)
def
do_mpcdf_setup_repos
(
self
,
subcmd
,
opts
,
*
args
):
"""
${cmd_name}: Create all repository combinations for an MPCDF project
...
...
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