Skip to content

Commit

Permalink
[Makefile] Fix xargs warnings (nuclio#2836)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg committed Feb 20, 2023
1 parent dcb4bd2 commit 29fe0e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ env:
DOCKER_BUILDKIT: 1

jobs:

lint:
name: Lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -130,6 +129,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.CACHE_REPO }}
username: ${{ env.CACHE_REPO_NAME }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Freeing up disk space
run: "${GITHUB_WORKSPACE}/hack/scripts/ci/free-space.sh"

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ docker-images: $(DOCKER_IMAGES_RULES)

.PHONY: pull-docker-images-cache
pull-docker-images-cache:
@printf '%s\n' $(DOCKER_IMAGES_CACHE) | xargs -n 1 -P 5 -I{} docker pull {}
@printf '%s\n' $(DOCKER_IMAGES_CACHE) | xargs -n 1 -P 5 docker pull

.PHONY: push-docker-images-cache
push-docker-images-cache:
@printf '%s\n' $(DOCKER_IMAGES_CACHE) | xargs -n 1 -P 5 -I{} docker push {}
@printf '%s\n' $(DOCKER_IMAGES_CACHE) | xargs -n 1 -P 5 docker push

.PHONY: tools
tools: ensure-gopath nuctl
Expand Down Expand Up @@ -197,7 +197,7 @@ retag-docker-images: print-docker-images
$(eval NUCLIO_NEW_LABEL ?= retagged)
$(eval NUCLIO_NEW_LABEL = ${NUCLIO_NEW_LABEL}-${NUCLIO_ARCH})
@echo "Retagging Nuclio docker images with ${NUCLIO_NEW_LABEL}"
echo $(IMAGES_TO_PUSH) | xargs -n 1 -P 5 -I{} sh -c 'image="{}"; docker tag $$image $$(echo $$image | cut -d : -f 1):$(NUCLIO_NEW_LABEL)'
echo $(IMAGES_TO_PUSH) | xargs -P 5 -I{} sh -c 'image="{}"; docker tag $$image $$(echo $$image | cut -d : -f 1):$(NUCLIO_NEW_LABEL)'
@echo "Done"

.PHONY: print-docker-images
Expand Down

0 comments on commit 29fe0e0

Please sign in to comment.