From b816a37c597b2315e0d6d007be827efac2ed26e8 Mon Sep 17 00:00:00 2001 From: ania singh Date: Thu, 29 Aug 2024 12:02:45 +0530 Subject: [PATCH 1/2] fix quickstart image --- projects/vdk-core/cicd/Dockerfile-vdk-base | 16 ++++++++++++++++ projects/vdk-core/cicd/deploy-base-vdk-image.sh | 5 +++-- .../vdk-core/src/vdk/api/plugin/plugin_input.py | 2 +- projects/vdk-plugins/.plugin-common.yml | 6 ++++-- .../vdk-plugins/quickstart-vdk/.plugin-ci.yml | 14 ++++++++------ 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/projects/vdk-core/cicd/Dockerfile-vdk-base b/projects/vdk-core/cicd/Dockerfile-vdk-base index 28446ab0a4..4ba8e5b8db 100644 --- a/projects/vdk-core/cicd/Dockerfile-vdk-base +++ b/projects/vdk-core/cicd/Dockerfile-vdk-base @@ -13,4 +13,20 @@ ENV VDK_VERSION $vdk_version ARG vdk_version ARG vdk_package ARG pip_extra_index_url + +# Install bash +RUN apt-get update && apt-get install -y bash && echo "Bash installed successfully" || echo "Bash installation failed" + +# Set default shell to bash +SHELL ["/bin/bash", "-c"] + +# Default command +CMD ["/bin/bash"] + +# Force a snapshot with a no-op RUN command +RUN echo "Forcing snapshot" + + RUN pip install --extra-index-url $pip_extra_index_url $vdk_package==$vdk_version + + diff --git a/projects/vdk-core/cicd/deploy-base-vdk-image.sh b/projects/vdk-core/cicd/deploy-base-vdk-image.sh index eae7185bfd..7f57388f94 100755 --- a/projects/vdk-core/cicd/deploy-base-vdk-image.sh +++ b/projects/vdk-core/cicd/deploy-base-vdk-image.sh @@ -41,11 +41,12 @@ echo "{\"auths\":{\"$VDK_DOCKER_REGISTRY_URL\":{\"username\":\"$VDK_DOCKER_REGIS SCRIPT_DIR=$(dirname "$0") DOCKERFILE_PATH="$SCRIPT_DIR/Dockerfile-vdk-base" -/kaniko/executor --force --single-snapshot \ +/kaniko/executor --force \ --dockerfile="${DOCKERFILE_PATH}" \ --destination="${DOCKER_REGISTRY_IMAGE}:${VDK_VERSION}" \ --destination="${DOCKER_REGISTRY_IMAGE}:${BUILD_TYPE}" \ --build-arg=vdk_package="${VDK_PACKAGE}" \ --build-arg=vdk_version="${VDK_VERSION}" \ --build-arg=pip_extra_index_url="${PIP_EXTRA_INDEX_URL}" \ - --build-arg=vdk_base_python_image="${VDK_BASE_PYTHON_IMAGE}" + --build-arg=vdk_base_python_image="${VDK_BASE_PYTHON_IMAGE}" \ + --cache=false diff --git a/projects/vdk-core/src/vdk/api/plugin/plugin_input.py b/projects/vdk-core/src/vdk/api/plugin/plugin_input.py index 699b1caa97..651c67a8b9 100644 --- a/projects/vdk-core/src/vdk/api/plugin/plugin_input.py +++ b/projects/vdk-core/src/vdk/api/plugin/plugin_input.py @@ -68,7 +68,7 @@ def set_properties_factory_method( """ Register properties implementation backend. Properties API enable keeping state of a data job. - Default implementation is in-memory so it's strongly recommended to install vdk-properties plugin + Default implementation is in-memory, so it's strongly recommended to install vdk-properties plugin which provides API based properties implementation IPropertiesServiceClient is used as provides logic of how properties are persisted diff --git a/projects/vdk-plugins/.plugin-common.yml b/projects/vdk-plugins/.plugin-common.yml index c5cda3e6ac..0e9f70a8e5 100644 --- a/projects/vdk-plugins/.plugin-common.yml +++ b/projects/vdk-plugins/.plugin-common.yml @@ -21,7 +21,7 @@ retry: !reference [.retry, retry_options] rules: # we want to trigger build jobs if there are changes to this plugin, # but not if there are changes to other plugins or the main directory - - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"' + - if: '$CI_COMMIT_BRANCH == "main"' changes: - "projects/vdk-plugins/$PLUGIN_NAME/**/*" artifacts: @@ -38,7 +38,7 @@ USE_VDKCORE_DEV_VERSION: "yes" extends: .build-plugin-dind rules: - - if: '$CI_COMMIT_BRANCH == "main" || $CI_PIPELINE_SOURCE == "external_pull_request_event"' + - if: '$CI_COMMIT_BRANCH == "main"' changes: - "projects/vdk-core/*" - "projects/vdk-core/src/**/*" @@ -74,6 +74,7 @@ - if: '$CI_COMMIT_BRANCH == "main"' changes: - "projects/vdk-plugins/$PLUGIN_NAME/**/*" +# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"' .release-vdk-image: @@ -102,3 +103,4 @@ - if: '$CI_COMMIT_BRANCH == "main"' changes: - "projects/vdk-plugins/$PLUGIN_NAME/**/*" +# - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"' diff --git a/projects/vdk-plugins/quickstart-vdk/.plugin-ci.yml b/projects/vdk-plugins/quickstart-vdk/.plugin-ci.yml index 3a07886c75..ef7886f270 100644 --- a/projects/vdk-plugins/quickstart-vdk/.plugin-ci.yml +++ b/projects/vdk-plugins/quickstart-vdk/.plugin-ci.yml @@ -87,8 +87,9 @@ release-quickstart-vdk: variables: PLUGIN_NAME: quickstart-vdk rules: - - if: '$CI_COMMIT_BRANCH == "main"' - changes: *test_quickstart_vdk_locations +# - if: '$CI_COMMIT_BRANCH == "main"' +# changes: *test_quickstart_vdk_locations + - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"' extends: .release-plugin release-vdk-image-quickstart-vdk: @@ -96,7 +97,8 @@ release-vdk-image-quickstart-vdk: PLUGIN_NAME: quickstart-vdk extends: .release-vdk-image rules: - - if: '$CI_COMMIT_BRANCH == "main"' - changes: *test_quickstart_vdk_locations - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: never +# - if: '$CI_COMMIT_BRANCH == "main"' +# changes: *test_quickstart_vdk_locations +# - if: '$CI_PIPELINE_SOURCE == "schedule"' +# when: never + - if: '$CI_PIPELINE_SOURCE == "external_pull_request_event"' From aaca376d6adb8e28a9faa9b80a454571acbf09e0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 06:56:28 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- projects/vdk-core/cicd/Dockerfile-vdk-base | 2 -- 1 file changed, 2 deletions(-) diff --git a/projects/vdk-core/cicd/Dockerfile-vdk-base b/projects/vdk-core/cicd/Dockerfile-vdk-base index 4ba8e5b8db..1ff840f4b8 100644 --- a/projects/vdk-core/cicd/Dockerfile-vdk-base +++ b/projects/vdk-core/cicd/Dockerfile-vdk-base @@ -28,5 +28,3 @@ RUN echo "Forcing snapshot" RUN pip install --extra-index-url $pip_extra_index_url $vdk_package==$vdk_version - -