Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
OGS Container Maker
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
ogs
OGS Container Maker
Commits
c1f00bfb
Commit
c1f00bfb
authored
5 years ago
by
Lars Bilke
Browse files
Options
Downloads
Patches
Plain Diff
Use release tag in name.
parent
242e0c88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ogscm/cli.py
+1
-5
1 addition, 5 deletions
ogscm/cli.py
ogscm/container_info.py
+9
-2
9 additions, 2 deletions
ogscm/container_info.py
with
10 additions
and
7 deletions
ogscm/cli.py
+
1
−
5
View file @
c1f00bfb
...
...
@@ -83,9 +83,6 @@ def main(): # pragma: no cover
print
(
'
--convert cannot be used with --format singularity!
'
'
Ignoring!
'
)
commit_hash
=
'
0
'
ogs_tag
=
''
info
=
container_info
(
build
,
args
)
info
.
make_dirs
()
...
...
@@ -382,7 +379,7 @@ def main(): # pragma: no cover
# TODO: adapt this to else
continue
build_cmd
=
(
f
"
docker build
--build-arg OGS_COMMIT_HASH=
{
commit_hash
}
"
build_cmd
=
(
f
"
docker build
"
f
"
-t
{
info
.
tag
}
-f
{
definition_file_path
}
.
"
)
if
info
.
buildkit
:
build_cmd
=
"
(cd {0} && DOCKER_BUILDKIT=1 {1})
"
.
format
(
...
...
@@ -398,7 +395,6 @@ def main(): # pragma: no cover
subprocess
.
run
(
f
"
docker push
{
info
.
tag
}
"
,
shell
=
True
)
image_file
=
f
'
{
info
.
images_out_dir
}
/
{
info
.
img_file
}
-
{
image_id_short
}
.sif
'
if
args
.
convert
and
not
os
.
path
.
exists
(
image_file
):
# (check docker image id)
subprocess
.
run
(
f
"
cd
{
cwd
}
&& singularity build --force
{
image_file
}
docker-daemon:
{
info
.
tag
}
"
,
shell
=
True
)
...
...
This diff is collapsed.
Click to expand it.
ogscm/container_info.py
+
9
−
2
View file @
c1f00bfb
...
...
@@ -7,13 +7,14 @@ from __future__ import unicode_literals
from
__future__
import
print_function
import
hashlib
import
json
import
os
import
re
import
requests
import
shutil
import
subprocess
from
ogscm
import
config
import
json
class
container_info
():
...
...
@@ -35,6 +36,7 @@ class container_info():
cmake_args
=
args_iter
[
4
].
strip
().
split
(
'
'
)
name_start
=
'
gcc
'
branch_is_release
=
False
if
ogs_version
!=
'
off
'
:
if
os
.
path
.
isdir
(
ogs_version
):
self
.
repo
=
'
local
'
...
...
@@ -63,6 +65,8 @@ class container_info():
if
self
.
branch
==
''
:
self
.
branch
=
'
master
'
else
:
if
re
.
search
(
r
'
[\d.]+
'
,
self
.
branch
):
branch_is_release
=
True
url
=
(
f
"
https://api.github.com/repos/
{
self
.
repo
}
/commits?sha=
{
self
.
branch
}
"
)
...
...
@@ -71,7 +75,10 @@ class container_info():
self
.
commit_hash
=
response_data
[
0
][
'
sha
'
]
# ogs_tag = ogs_version.replace('/', '.').replace('@', '.')
name_start
=
f
'
ogs-
{
self
.
commit_hash
[
:
8
]
}
'
if
branch_is_release
:
name_start
=
f
'
ogs-
{
self
.
branch
}
'
else
:
name_start
=
f
'
ogs-
{
self
.
commit_hash
[
:
8
]
}
'
else
:
if
args
.
compiler
==
'
clang
'
:
name_start
=
'
clang
'
...
...
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