Skip to content

Commit

Permalink
Fixes after testing.
Browse files Browse the repository at this point in the history
Signed-off-by: Revital Sur <eres@il.ibm.com>
  • Loading branch information
revit13 committed Jul 2, 2024
1 parent 47d778e commit c3fbbee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ jobs:
make -C transforms/code DOCKER=docker venv test-src
- name: Save images
# if: ${{ github.event_name != 'pull_request' }}
run: make USE_LATEST_TAG=1 -C transforms -C kfp-kfp_ray_componenets docker-save-image
run: |
make -C transforms docker-save-image
make -C kfp/kfp_ray_components docker-save-image
- name: Upload images
# if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -169,7 +171,7 @@ jobs:
header_text "Running ${transforms[$index]} workflow test"
make -C ${transforms[$index]} workflow-test
header_text "Run ${transforms[$index]} completed"
push_images:
push-images:
name: Push images with latest tag
runs-on: ubuntu-latest
env:
Expand All @@ -182,9 +184,12 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v3
with:
path: artifacts/*
name: images
- name: Load images
run: make -C transforms -C kfp-kfp_ray_componenets docker-load-image
run: |
make -C transforms docker-load-image
make -C kfp-kfp_ray_componenets docker-load-image
- id: version
name: Infer version
run: |
Expand All @@ -196,8 +201,6 @@ jobs:
echo ::set-output name=publish_images::$publish_images
- name: Publish images
if: ${{ steps.version.outputs.publish_images == 'true' }}
env:
USE_LATEST_TAG: 1
# run: make -C transforms -C kfp-kfp_ray_componenets publish
run: echo "make -C transforms -C kfp-kfp_ray_componenets publish"

12 changes: 1 addition & 11 deletions .make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ DOCKER_REGISTRY_KEY?=$(DPK_DOCKER_REGISTRY_KEY)
DOCKER_REGISTRY_ENDPOINT?=$(DOCKER_HOSTNAME)/$(DOCKER_NAMESPACE)
DOCKER_LOCAL_IMAGE=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)
DOCKER_REMOTE_IMAGE=$(DOCKER_REGISTRY_ENDPOINT)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)
DOCKER_REMOTE_IMAGE_LATEST=$(DOCKER_REGISTRY_ENDPOINT)/$(DOCKER_IMAGE_NAME):latest
DOCKER_SPARK_BASE_IMAGE_NAME=data-prep-kit-spark-3.5.1
DOCKER_SPARK_BASE_IMAGE=$(DOCKER_SPARK_BASE_IMAGE_NAME):$(DPK_LIB_VERSION)
# Deprecated in favor of DOCKER_REMOTE_IMAGE
DOCKER_IMAGE?=$(DOCKER_REMOTE_IMAGE)
KIND_CLUSTER_NAME=dataprep
ARTIFACTS_DIR?=$(REPOROOT)/artifacts
USE_LATEST_TAG?=0

DPK_PYTHON_LIB_DIR=$(REPOROOT)/data-processing-lib/python
DPK_RAY_LIB_DIR=$(REPOROOT)/data-processing-lib/ray
Expand Down Expand Up @@ -186,9 +184,6 @@ __check_defined = \

.PHONY: .defaults.docker-save-image
.defaults.docker-save-image:
ifeq ($(USE_LATEST_TAG),1)
docker tag $(DOCKER_REMOTE_IMAGE) $(DOCKER_REMOTE_IMAGE_LATEST)
endif
docker save -o ${ARTIFACTS_DIR}/${DOCKER_IMAGE_NAME}.tar $(DOCKER_REMOTE_IMAGE)

.PHONY: .defaults.docker-load-image
Expand Down Expand Up @@ -407,12 +402,7 @@ endif
@# Help: Publish the $(DOCKER_LOCAL_IMAGE) to $(DOCKER_HOSTNAME) container registry
-$(DOCKER) logout $(DOCKER_HOSTNAME)
$(DOCKER) login $(DOCKER_HOSTNAME) -u '$(DOCKER_REGISTRY_USER)' -p '$(DOCKER_REGISTRY_KEY)'
ifeq ($(USE_LATEST_TAG),1)
$(DOCKER) push $(DOCKER_REMOTE_IMAGE_LATEST);
else
$(DOCKER) push $(DOCKER_REMOTE_IMAGE);
endif

$(DOCKER) push $(DOCKER_REMOTE_IMAGE);

# Create the local virtual environment, assuming python is already installed and available
# We upgrade pip as that seems to be required by watson_nlp
Expand Down

0 comments on commit c3fbbee

Please sign in to comment.