-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update jenkins configs, upstream modules (#51)
* fix: update jenkins configs, upstream modules * fix dependency for k8s provider * add test * add contrib guide
- Loading branch information
1 parent
914fda3
commit 96dc183
Showing
16 changed files
with
1,323 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Make will use bash instead of sh | ||
SHELL := /usr/bin/env bash | ||
|
||
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 1.0 | ||
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools | ||
REGISTRY_URL := gcr.io/cloud-foundation-cicd | ||
|
||
# Enter docker container for local development | ||
.PHONY: docker_run | ||
docker_run: | ||
docker run --rm -it \ | ||
-e SERVICE_ACCOUNT_JSON \ | ||
-v $(CURDIR):/workspace \ | ||
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \ | ||
/bin/bash | ||
|
||
# Execute prepare tests within the docker container | ||
.PHONY: docker_test_prepare | ||
docker_test_prepare: | ||
docker run --rm -it \ | ||
-e SERVICE_ACCOUNT_JSON \ | ||
-e TF_VAR_org_id \ | ||
-e TF_VAR_folder_id \ | ||
-e TF_VAR_billing_account \ | ||
-v $(CURDIR):/workspace \ | ||
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \ | ||
/usr/local/bin/execute_with_credentials.sh prepare_environment | ||
|
||
# Clean up test environment within the docker container | ||
.PHONY: docker_test_cleanup | ||
docker_test_cleanup: | ||
docker run --rm -it \ | ||
-e SERVICE_ACCOUNT_JSON \ | ||
-e TF_VAR_org_id \ | ||
-e TF_VAR_folder_id \ | ||
-e TF_VAR_billing_account \ | ||
-v $(CURDIR):/workspace \ | ||
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \ | ||
/usr/local/bin/execute_with_credentials.sh cleanup_environment | ||
|
||
# Execute integration tests within the docker container | ||
.PHONY: docker_test_integration | ||
docker_test_integration: | ||
docker run --rm -it \ | ||
-e SERVICE_ACCOUNT_JSON \ | ||
-v $(CURDIR):/workspace \ | ||
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \ | ||
/bin/bash -c 'source /usr/local/bin/task_helper_functions.sh && init_credentials && cd test/integration && go test -v -timeout 0 -p 1' | ||
|
||
# Execute lint tests within the docker container | ||
.PHONY: docker_test_lint | ||
docker_test_lint: | ||
docker run --rm -it \ | ||
-v $(CURDIR):/workspace \ | ||
$(REGISTRY_URL)/${DOCKER_IMAGE_DEVELOPER_TOOLS}:${DOCKER_TAG_VERSION_DEVELOPER_TOOLS} \ | ||
/usr/local/bin/test_lint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.