Skip to content

Commit

Permalink
Make devsetup/cifwm_prepare not fail when rerun
Browse files Browse the repository at this point in the history
Currently if one tries to rerun cifwm_prepare it fails
on git cloning attempt since the directory is already in place.

Example of failure:
> + make cifmw_prepare
> git clone https://github.com/openstack-k8s-operators/ci-framework ci-framework
> fatal: destination path 'ci-framework' already exists and is not an empty directory.
> make: *** [Makefile:180: cifmw_prepare] Error 128

As that is not expected from make target, make it so that
this target depends on the directory existing target,
which itself calls the git clone for its creation.
  • Loading branch information
queria committed Jun 1, 2023
1 parent 6dd770e commit e7d5b53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions devsetup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ edpm_deploy_instance: ## Spin a instance on edpm node
edpm_play_cleanup: ## Cleanup EDPM openstackansibleee resource
-oc delete openstackansibleee deploy-external-dataplane-compute

.PHONY: cifmw_prepare
cifmw_prepare: ## Clone the ci-framework repository in the ci-framework directory. That location is ignored from git.
./ci-framework:
git clone https://github.com/openstack-k8s-operators/ci-framework ci-framework

.PHONY: cifmw_prepare
cifmw_prepare: ./ci-framework ## Clone the ci-framework repository in the ci-framework directory. That location is ignored from git.

.PHONY: cifmw_cleanup
cifmw_cleanup: ## Clean ci-framework git clone
${CLEANUP_DIR_CMD} ci-framework
Expand Down

0 comments on commit e7d5b53

Please sign in to comment.