diff --git a/.github/workflows/update-external-base-images.yml b/.github/workflows/update-external-base-images.yml index 1d5e951592e79..51666a6aaee27 100644 --- a/.github/workflows/update-external-base-images.yml +++ b/.github/workflows/update-external-base-images.yml @@ -25,8 +25,8 @@ jobs: git config --global user.name "auto dockerfiles update" echo "==== $(date): Starting pipenv setup... ====" python -m pip install --upgrade pip - pip install pipenv==2023.3.18 - pipenv install + pip install pipenv==2024.4.0 + pipenv install --python=$(which python) echo "==== Finished ====" [[ ${{ vars.DISABLE_TIMESTAMP_AUTOUPDATES }} = 'true' ]] && tu_flag="--no-timestamp-updates" echo tu_flag being passed is $tu_flag diff --git a/.github/workflows/update-internal-base-images.yml b/.github/workflows/update-internal-base-images.yml index af091a7f31f74..4eec0f451c18c 100644 --- a/.github/workflows/update-internal-base-images.yml +++ b/.github/workflows/update-internal-base-images.yml @@ -24,8 +24,8 @@ jobs: git config --global user.name "auto dockerfiles update" echo "==== $(date): Starting pipenv setup... ====" python -m pip install --upgrade pip - pip install pipenv==2023.3.18 - pipenv install + pip install pipenv==2024.4.0 + pipenv install --python=$(which python) echo "==== Finished ====" pipenv run python ./utils/auto_dockerfile_update/update_dockerfiles.py -t internal echo "Done!" diff --git a/docker/demisto-sdk/Dockerfile b/docker/demisto-sdk/Dockerfile index 9421d1fdb131b..8f6b6caa77595 100644 --- a/docker/demisto-sdk/Dockerfile +++ b/docker/demisto-sdk/Dockerfile @@ -1,4 +1,4 @@ -FROM demisto/python3-deb:3.11.10.115178 +FROM demisto/python3-deb:3.12.7.117935 WORKDIR /content diff --git a/utils/auto_dockerfile_update/get_dockerfiles.py b/utils/auto_dockerfile_update/get_dockerfiles.py index bb9034548bfd0..a84ee8c14b5ff 100644 --- a/utils/auto_dockerfile_update/get_dockerfiles.py +++ b/utils/auto_dockerfile_update/get_dockerfiles.py @@ -48,6 +48,9 @@ def parse_base_image(full_base_image_name: str) -> (str, str, str): else: repository, full_image_name = full_base_image_name.split("/") + if not ":" in full_image_name: + return repository, full_image_name, None + image_name, tag = full_image_name.split(":") return repository, image_name, tag @@ -160,7 +163,11 @@ def get_docker_files(base_path="docker/", devonly=False, external=False, interna base_image = base_image.replace("FROM ", "") is_internal = re.search(INTERNAL_BASE_IMAGES, base_image) if (is_internal and internal) or (not is_internal and external): + repo, image_name, tag = parse_base_image(base_image) + if not tag: # base image doesn't have a version to update + continue + last_modified = get_last_modified(docker_file_content) curr_dockerfile = { "path": path,