mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-11 20:12:58 +00:00
Minor fixes
This commit is contained in:
@@ -8,14 +8,14 @@ import plumbum
|
|||||||
|
|
||||||
from tagging.docker_runner import DockerRunner
|
from tagging.docker_runner import DockerRunner
|
||||||
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
|
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
|
||||||
from tagging.tags_prefix import get_tags_prefix
|
from tagging.get_tags_prefix import get_tags_prefix
|
||||||
|
|
||||||
docker = plumbum.local["docker"]
|
docker = plumbum.local["docker"]
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def tag_image(short_image_name: str, owner: str, tags_prefix: str) -> None:
|
def tag_image(short_image_name: str, owner: str) -> None:
|
||||||
"""
|
"""
|
||||||
Tags <owner>/<short_image_name>:latest with the tags reported by all taggers
|
Tags <owner>/<short_image_name>:latest with the tags reported by all taggers
|
||||||
for the given image.
|
for the given image.
|
||||||
@@ -24,6 +24,7 @@ def tag_image(short_image_name: str, owner: str, tags_prefix: str) -> None:
|
|||||||
taggers, _ = get_taggers_and_manifests(short_image_name)
|
taggers, _ = get_taggers_and_manifests(short_image_name)
|
||||||
|
|
||||||
image = f"{owner}/{short_image_name}:latest"
|
image = f"{owner}/{short_image_name}:latest"
|
||||||
|
tags_prefix = get_tags_prefix()
|
||||||
|
|
||||||
with DockerRunner(image) as container:
|
with DockerRunner(image) as container:
|
||||||
for tagger in taggers:
|
for tagger in taggers:
|
||||||
@@ -53,6 +54,4 @@ if __name__ == "__main__":
|
|||||||
arg_parser.add_argument("--owner", default="jupyter", help="Owner of the image")
|
arg_parser.add_argument("--owner", default="jupyter", help="Owner of the image")
|
||||||
args = arg_parser.parse_args()
|
args = arg_parser.parse_args()
|
||||||
|
|
||||||
tags_prefix = get_tags_prefix()
|
tag_image(args.short_image_name, args.owner)
|
||||||
|
|
||||||
tag_image(args.short_image_name, args.owner, tags_prefix)
|
|
||||||
|
@@ -10,13 +10,13 @@ from docker.models.containers import Container
|
|||||||
|
|
||||||
from tagging.docker_runner import DockerRunner
|
from tagging.docker_runner import DockerRunner
|
||||||
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
|
from tagging.get_taggers_and_manifests import get_taggers_and_manifests
|
||||||
|
from tagging.get_tags_prefix import get_tags_prefix
|
||||||
from tagging.git_helper import GitHelper
|
from tagging.git_helper import GitHelper
|
||||||
from tagging.manifests import ManifestHeader, ManifestInterface
|
from tagging.manifests import ManifestHeader, ManifestInterface
|
||||||
from tagging.tags_prefix import get_tags_prefix
|
|
||||||
|
|
||||||
LOGGER = logging.getLogger(__name__)
|
LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
# This would actually be manifest creation timestamp
|
||||||
BUILD_TIMESTAMP = datetime.datetime.utcnow().isoformat()[:-7] + "Z"
|
BUILD_TIMESTAMP = datetime.datetime.utcnow().isoformat()[:-7] + "Z"
|
||||||
MARKDOWN_LINE_BREAK = "<br />"
|
MARKDOWN_LINE_BREAK = "<br />"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user