Skip to content

Commit

Permalink
Merge pull request #333 from Kong/chore/luarocks-cache
Browse files Browse the repository at this point in the history
chore(cache) dont recycle the cache that includes luarocks as downgrading a luarock isnt possible
  • Loading branch information
hutchic authored Sep 23, 2020
2 parents 144d548 + 8edf9c5 commit f6715f7
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -247,24 +247,19 @@ kong-test-container:
ifneq ($(RESTY_IMAGE_BASE),src)
-rm -rf kong
-cp -R $(KONG_SOURCE_LOCATION) kong
$(CACHE_COMMAND) $(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX) || \
$(CACHE_COMMAND) $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX) || \
( $(MAKE) build-openresty && \
docker tag $(DOCKER_REPOSITORY):openresty-$(RESTY_IMAGE_BASE)-$(RESTY_IMAGE_TAG)-$(DOCKER_OPENRESTY_SUFFIX) \
$(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX) )

docker run -d --rm --name test $(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX) tail -f /dev/null
docker export test | docker import - $(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX)
docker stop test

$(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX) && \
$(DOCKER_COMMAND) -f test/Dockerfile.test \
--build-arg KONG_GO_PLUGINSERVER_VERSION=$(KONG_GO_PLUGINSERVER_VERSION) \
--build-arg DOCKER_REPOSITORY=$(DOCKER_REPOSITORY) \
--build-arg DOCKER_OPENRESTY_SUFFIX=$(DOCKER_OPENRESTY_SUFFIX) \
-t $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX) .
-t $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX) . )

docker tag $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX) $(DOCKER_REPOSITORY):test
docker tag $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX) $(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX)

-$(UPDATE_CACHE_COMMAND) $(DOCKER_REPOSITORY):test-$(DOCKER_OPENRESTY_SUFFIX)

-$(UPDATE_CACHE_COMMAND) $(DOCKER_REPOSITORY):test-$(DOCKER_TEST_SUFFIX)
endif

test-kong: kong-test-container
Expand Down

0 comments on commit f6715f7

Please sign in to comment.