Skip to content

Commit

Permalink
[FABG-742] Add docker-compose pull to devstable
Browse files Browse the repository at this point in the history
Change-Id: I600488d5ff876e3c2e4a853ae42076e5c79e48b3
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Aug 24, 2018
1 parent 0cd9893 commit 63f1c2b
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ export CORE_VM_ENDPOINT=http://chaincoded.example.com:9375
else
BASE_DOCKER_COMPOSE_FILES := -f ./docker-compose-std.yaml $(BASE_DOCKER_COMPOSE_FILES)
endif
DOCKER_COMPOSE_UP_FLAGS := --remove-orphans --force-recreate
DOCKER_COMPOSE_UP_TEST_FLAGS := $(DOCKER_COMPOSE_UP_FLAGS) --abort-on-container-exit
DOCKER_COMPOSE_UP_STANDALONE_FLAGS := $(DOCKER_COMPOSE_UP_FLAGS) -d
DOCKER_COMPOSE_PULL_FLAGS :=

# Global environment exported for scripts
export GO_CMD
Expand Down Expand Up @@ -287,7 +291,7 @@ integration-tests-stable: clean-tests depend-noforce populate-noforce
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-nopkcs11-test.yaml"

.PHONY: integration-tests-prev
Expand All @@ -297,7 +301,7 @@ integration-tests-prev: clean-tests depend-noforce populate-noforce populate-fix
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true E2E_ONLY="true" FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_PREV_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_PREV_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-nopkcs11-test.yaml"

.PHONY: integration-tests-prerelease
Expand All @@ -307,7 +311,7 @@ integration-tests-prerelease: clean-tests depend-noforce populate-noforce popula
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_PRERELEASE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_PRERELEASE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-nopkcs11-test.yaml"

.PHONY: integration-tests-devstable
Expand All @@ -316,9 +320,10 @@ integration-tests-devstable: clean-tests depend-noforce populate-noforce populat
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
$(FABRIC_DEV_REGISTRY_PRE_CMD) && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) pull $(DOCKER_COMPOSE_PULL_FLAGS) && \
TEST_CHANGED_ONLY=true FABRIC_FIXTURE_VERSION=v$(FABRIC_DEVSTABLE_VERSION_MINOR) FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-nopkcs11-test.yaml"

.PHONY: integration-tests-stable-negative
Expand All @@ -327,7 +332,7 @@ integration-tests-stable-negative: clean-tests depend-noforce populate-noforce
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-negative.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-negative.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-negative.yaml"

.PHONY: integration-tests-stable-pkcs11
Expand All @@ -337,7 +342,7 @@ integration-tests-stable-pkcs11: clean-tests depend-noforce populate-noforce
cd $(FIXTURE_DOCKERENV_PATH) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-pkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-pkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-pkcs11-test.yaml"

# Additional test cases that aren't currently run by the CI
Expand All @@ -348,9 +353,10 @@ integration-tests-devstable-nomutualtls: clean-tests depend-noforce populate-nof
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
$(FABRIC_DEV_REGISTRY_PRE_CMD) && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) pull $(DOCKER_COMPOSE_PULL_FLAGS) && \
TEST_CHANGED_ONLY=true FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up --force-recreate --abort-on-container-exit
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) -f docker-compose-nopkcs11-test.yaml up $(DOCKER_COMPOSE_UP_TEST_FLAGS)
@cd $(FIXTURE_DOCKERENV_PATH) && FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(FIXTURE_SCRIPTS_PATH)/check_status.sh "$(BASE_DOCKER_COMPOSE_FILES) -f ./docker-compose-nopkcs11-test.yaml"

.PHONY: integration-tests
Expand Down Expand Up @@ -403,7 +409,7 @@ integration-tests-stable-local: clean-tests-temp depend-noforce populate-noforce
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up -d --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)
FABRIC_CRYPTOCONFIG_VERSION=$(FABRIC_CRYPTOCONFIG_VER) FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_CODELEVEL_TAG) TEST_LOCAL=true $(TEST_SCRIPTS_PATH)/integration.sh
@cd $(FIXTURE_DOCKERENV_PATH) && $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) down

Expand All @@ -413,9 +419,10 @@ integration-tests-devstable-local: clean-tests-temp depend-noforce populate-nofo
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
$(FABRIC_DEV_REGISTRY_PRE_CMD) && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) pull $(DOCKER_COMPOSE_PULL_FLAGS) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up -d --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)
FABRIC_FIXTURE_VERSION=v$(FABRIC_DEVSTABLE_VERSION_MINOR) FABRIC_CRYPTOCONFIG_VERSION=$(FABRIC_CRYPTOCONFIG_VER) FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) TEST_LOCAL=true $(TEST_SCRIPTS_PATH)/integration.sh
@cd $(FIXTURE_DOCKERENV_PATH) && $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) down

Expand All @@ -426,31 +433,32 @@ dockerenv-prev-up: clean-tests populate-fixtures-prev-noforce
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_PREV_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_PREV_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
GO_TESTFLAGS="$(GO_TESTFLAGS_INTEGRATION)" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)

.PHONY: dockerenv-stable-up
dockerenv-stable-up: clean-tests populate-fixtures-stable-noforce
@. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_STABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_STABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)

.PHONY: dockerenv-prerelease-up
dockerenv-prerelease-up: clean-tests populate-fixtures-prerelease-noforce
@. $(FIXTURE_DOCKERENV_PATH)/prerelease-env.sh && \
$(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_PRERELEASE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_PRERELEASE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_RELEASE_REGISTRY) \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)

.PHONY: dockerenv-devstable-up
dockerenv-devstable-up: clean-tests populate-fixtures-devstable-noforce
@. $(FIXTURE_DOCKERENV_PATH)/devstable-env.sh && \
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
$(FABRIC_DEV_REGISTRY_PRE_CMD) && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up --force-recreate
FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) $(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) pull $(DOCKER_COMPOSE_PULL_FLAGS) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY=$(FABRIC_DEV_REGISTRY) \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)

.PHONY: dockerenv-latest-up
dockerenv-latest-up: clean-tests populate-fixtures-devstable-noforce
Expand All @@ -459,7 +467,7 @@ dockerenv-latest-up: clean-tests populate-fixtures-devstable-noforce
. $(FIXTURE_CRYPTOCONFIG_PATH)/env.sh && \
cd $(FIXTURE_DOCKERENV_PATH) && \
FABRIC_SDKGO_CODELEVEL_VER=$(FABRIC_DEVSTABLE_CODELEVEL_VER) FABRIC_SDKGO_CODELEVEL_TAG=$(FABRIC_DEVSTABLE_CODELEVEL_TAG) FABRIC_DOCKER_REGISTRY="" \
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up --force-recreate
$(DOCKER_COMPOSE_CMD) $(BASE_DOCKER_COMPOSE_FILES) up $(DOCKER_COMPOSE_UP_STANDALONE_FLAGS)

.PHONY: mock-gen
mock-gen:
Expand Down

0 comments on commit 63f1c2b

Please sign in to comment.