mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-13 04:52:57 +00:00
Add DateTagger for tags like 2021-08-09
This commit is contained in:
@@ -5,6 +5,7 @@ from typing import Optional, List
|
|||||||
from .taggers import (
|
from .taggers import (
|
||||||
TaggerInterface,
|
TaggerInterface,
|
||||||
SHATagger,
|
SHATagger,
|
||||||
|
DateTagger,
|
||||||
UbuntuVersionTagger,
|
UbuntuVersionTagger,
|
||||||
PythonVersionTagger,
|
PythonVersionTagger,
|
||||||
JupyterNotebookVersionTagger,
|
JupyterNotebookVersionTagger,
|
||||||
@@ -39,6 +40,7 @@ ALL_IMAGES = {
|
|||||||
parent_image=None,
|
parent_image=None,
|
||||||
taggers=[
|
taggers=[
|
||||||
SHATagger,
|
SHATagger,
|
||||||
|
DateTagger,
|
||||||
UbuntuVersionTagger,
|
UbuntuVersionTagger,
|
||||||
PythonVersionTagger,
|
PythonVersionTagger,
|
||||||
JupyterNotebookVersionTagger,
|
JupyterNotebookVersionTagger,
|
||||||
|
@@ -1,5 +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 datetime import datetime
|
||||||
import logging
|
import logging
|
||||||
from .git_helper import GitHelper
|
from .git_helper import GitHelper
|
||||||
from .docker_runner import DockerRunner
|
from .docker_runner import DockerRunner
|
||||||
@@ -50,6 +51,12 @@ class SHATagger(TaggerInterface):
|
|||||||
return GitHelper.commit_hash_tag()
|
return GitHelper.commit_hash_tag()
|
||||||
|
|
||||||
|
|
||||||
|
class DateTagger(TaggerInterface):
|
||||||
|
@staticmethod
|
||||||
|
def tag_value(container) -> str:
|
||||||
|
return datetime.utcnow().strftime("%Y-%m-%d")
|
||||||
|
|
||||||
|
|
||||||
class UbuntuVersionTagger(TaggerInterface):
|
class UbuntuVersionTagger(TaggerInterface):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def tag_value(container) -> str:
|
def tag_value(container) -> str:
|
||||||
|
Reference in New Issue
Block a user