Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
10075e76
Commit
10075e76
authored
7 years ago
by
gakin
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-4584 : test_openbis_sync - switch to sissource v4 api for downloading plugins.
SVN: 38079
parent
2422b929
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
integration-tests/test_openbis_sync.py
+7
-7
7 additions, 7 deletions
integration-tests/test_openbis_sync.py
with
7 additions
and
7 deletions
integration-tests/test_openbis_sync.py
+
7
−
7
View file @
10075e76
...
...
@@ -251,11 +251,11 @@ class TestCase(systemtest.testcase.TestCase):
def
installPlugin
(
self
,
openbisController
,
plugin_name
):
repository
=
GitLabArtifactRepository
(
self
.
artifactRepository
.
localRepositoryFolder
)
path
=
repository
.
getPathToArtifact
(
'
1
49
'
,
'
archive.zip
'
)
path
=
repository
.
getPathToArtifact
(
'
1
0
'
,
'
archive.zip
'
)
util
.
printAndFlush
(
"
path to core plugin in the repository: %s
"
%
path
)
destination
=
"
%s/servers/core-plugins/%s/
"
%
(
openbisController
.
installPath
,
openbisController
.
instanceName
)
util
.
printAndFlush
(
"
Unzipping plugin % s into folder %s
"
%
(
plugin_name
,
destination
))
util
.
unzipSubfolder
(
path
,
'
o
penbis
s
ync
.git
/core-plugins/%s/1/
'
%
plugin_name
,
destination
)
util
.
unzipSubfolder
(
path
,
'
O
penbis
S
ync
-master-c25365e4e2ff09203bbbb9286061c92f8d04df1e
/core-plugins/%s/1/
'
%
plugin_name
,
destination
)
def
installDataSourcePlugin
(
self
,
openbisController
,
dss_port
):
self
.
installPlugin
(
openbisController
,
"
datasource
"
)
...
...
@@ -292,18 +292,18 @@ class GitLabArtifactRepository(GitArtifactRepository):
"""
Artifact repository for a gitlab projects.
Note: it requires project id as the project
"
argument
"
. This can be found by using the following command:
curl --header
"
PRIVATE-TOKEN:
Wbt8EV8pREkqwu3BqQtQ
"
"
https://ss
dm
source.ethz.ch/api/v
3
/projects?per_page=99999
"
curl --header
"
PRIVATE-TOKEN:
Rz1DbhpVBXSUpRny5Dbr
"
"
https://s
i
ssource.ethz.ch/api/v
4
/projects?per_page=99999
"
after logging in and retrieving the private token with
curl https://ss
dm
source.ethz.ch/api/v
3
/session --data-urlencode
'
login=’ --data-urlencode
'
password=’
curl https://s
i
ssource.ethz.ch/api/v
4
/session --data-urlencode
'
login=’ --data-urlencode
'
password=’
"""
def
__init__
(
self
,
localRepositoryFolder
,
host
=
'
ss
dm
source.ethz.ch
'
):
def
__init__
(
self
,
localRepositoryFolder
,
host
=
'
s
i
ssource.ethz.ch
'
):
GitArtifactRepository
.
__init__
(
self
,
localRepositoryFolder
)
self
.
host
=
host
def
downloadArtifact
(
self
,
project
,
pattern
):
url
=
"
https://%s/api/v
3
/projects/%s/repository/%s
"
%
(
self
.
host
,
project
,
pattern
)
url
=
"
https://%s/api/v
4
/projects/%s/repository/%s
"
%
(
self
.
host
,
project
,
pattern
)
util
.
printAndFlush
(
"
Download %s to %s.
"
%
(
url
,
self
.
localRepositoryFolder
))
request
=
Request
(
url
,
headers
=
{
'
PRIVATE-TOKEN
'
:
'
Wbt8EV8pREkqwu3BqQtQ
'
})
request
=
Request
(
url
,
headers
=
{
'
PRIVATE-TOKEN
'
:
'
Rz1DbhpVBXSUpRny5Dbr
'
})
self
.
_download
(
urllib2
.
urlopen
(
request
),
pattern
)
return
pattern
...
...
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