Use tagging as a module

This commit is contained in:
Ayaz Salikhov
2021-05-01 11:04:44 +03:00
parent 8858a8f22a
commit 27f45c7f2c
8 changed files with 15 additions and 15 deletions

View File

@@ -100,8 +100,8 @@ git-commit: ## commit outstading git changes and push to remote
hook/%: WIKI_PATH?=../wiki hook/%: WIKI_PATH?=../wiki
hook/%: ## run post-build hooks for an image hook/%: ## run post-build hooks for an image
./tagging/tag_image.py --short-image-name "$(notdir $@)" --owner "$(OWNER)" && \ python3 -m tagging.tag_image --short-image-name "$(notdir $@)" --owner "$(OWNER)" && \
./tagging/create_manifests.py --short-image-name "$(notdir $@)" --owner "$(OWNER)" --wiki-path "$(WIKI_PATH)" python3 -m tagging.create_manifests --short-image-name "$(notdir $@)" --owner "$(OWNER)" --wiki-path "$(WIKI_PATH)"
hook-all: $(foreach I,$(ALL_IMAGES),hook/$(I) ) ## run post-build hooks for all images hook-all: $(foreach I,$(ALL_IMAGES),hook/$(I) ) ## run post-build hooks for all images

0
tagging/__init__.py Normal file
View File

View File

@@ -5,10 +5,10 @@ import argparse
import datetime import datetime
import logging import logging
import os import os
from docker_runner import DockerRunner from .docker_runner import DockerRunner
from get_taggers_and_manifests import get_taggers_and_manifests from .get_taggers_and_manifests import get_taggers_and_manifests
from git_helper import GitHelper from .git_helper import GitHelper
from manifests import ManifestHeader from .manifests import ManifestHeader
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -1,6 +1,6 @@
# Copyright (c) Jupyter Development Team. # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License. # Distributed under the terms of the Modified BSD License.
from images_hierarchy import ALL_IMAGES from .images_hierarchy import ALL_IMAGES
def get_taggers_and_manifests(short_image_name): def get_taggers_and_manifests(short_image_name):

View File

@@ -2,13 +2,13 @@
# Distributed under the terms of the Modified BSD License. # Distributed under the terms of the Modified BSD License.
from dataclasses import dataclass, field from dataclasses import dataclass, field
from typing import Optional, List from typing import Optional, List
from taggers import TaggerInterface, \ from .taggers import TaggerInterface, \
SHATagger, \ SHATagger, \
UbuntuVersionTagger, PythonVersionTagger, \ UbuntuVersionTagger, PythonVersionTagger, \
JupyterNotebookVersionTagger, JupyterLabVersionTagger, JupyterHubVersionTagger, \ JupyterNotebookVersionTagger, JupyterLabVersionTagger, JupyterHubVersionTagger, \
RVersionTagger, TensorflowVersionTagger, JuliaVersionTagger, \ RVersionTagger, TensorflowVersionTagger, JuliaVersionTagger, \
SparkVersionTagger, HadoopVersionTagger, JavaVersionTagger SparkVersionTagger, HadoopVersionTagger, JavaVersionTagger
from manifests import ManifestInterface, \ from .manifests import ManifestInterface, \
CondaEnvironmentManifest, AptPackagesManifest, \ CondaEnvironmentManifest, AptPackagesManifest, \
RPackagesManifest, JuliaPackagesManifest, SparkInfoManifest RPackagesManifest, JuliaPackagesManifest, SparkInfoManifest

View File

@@ -2,8 +2,8 @@
# Distributed under the terms of the Modified BSD License. # Distributed under the terms of the Modified BSD License.
import logging import logging
from plumbum.cmd import docker from plumbum.cmd import docker
from docker_runner import run_simple_command from .docker_runner import run_simple_command
from git_helper import GitHelper from .git_helper import GitHelper
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -4,8 +4,8 @@
import argparse import argparse
import logging import logging
from plumbum.cmd import docker from plumbum.cmd import docker
from docker_runner import DockerRunner from .docker_runner import DockerRunner
from get_taggers_and_manifests import get_taggers_and_manifests from .get_taggers_and_manifests import get_taggers_and_manifests
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -1,8 +1,8 @@
# Copyright (c) Jupyter Development Team. # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License. # Distributed under the terms of the Modified BSD License.
import logging import logging
from git_helper import GitHelper from .git_helper import GitHelper
from docker_runner import run_simple_command from .docker_runner import run_simple_command
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)