Skip to content
This repository has been archived by the owner on Oct 6, 2021. It is now read-only.

Commit

Permalink
dev/#78: rm scripts/deploy_gcf.py and mod .circleci/config.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hkak03key committed Feb 29, 2020
1 parent 242dbfe commit ac68588
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 129 deletions.
39 changes: 0 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,33 +109,6 @@ jobs:
ls -la
terraform apply -auto-approve
gcf_deploy:
executor: gcloud
parameters:
cred_json:
type: string
project_id:
type: string
steps:
- checkout:
path: project
- create_gcp_credentials_file:
cred_json: << parameters.cred_json >>
cred_filepath: ~/.config/gcloud/application_default_credentials.json
- init_gcloud:
cred_json: << parameters.cred_json >>
project_id: << parameters.project_id >>
- run:
name: deploy
command: |
cd project
pip3 install pyyaml docopt google-auth
find google_cloud_functions/ -maxdepth 1 -mindepth 1 -type d | xargs -I {} basename {} | uniq \
| xargs -L 1 -P 8 -I {} --no-run-if-empty bash -c 'echo "deploy {}..." && ./scripts/deploy_gcf.py -c google_cloud_functions/{}/config.yml -p google_cloud_functions/{}/policy.yml'
git diff HEAD^ --name-only --relative=google_cloud_functions --diff-filter=D -M100 | sed -r 's#/.*##g'| uniq | sort \
| join <(gcloud functions list | awk -F " " '{print $1, "--region", $4}' | tail -1 | sort) - \
| xargs -L 1 -P 8 -I {} --no-run-if-empty bash -c 'echo "delete {}..." && gcloud functions delete {}'
#----------------------------------------
workflows:
deploy_workflow:
Expand Down Expand Up @@ -167,12 +140,6 @@ workflows:
branches:
only:
- master
- gcf_deploy:
name: gcf_deploy_prod
cred_json: ${PROD_GCP_SERVICE_KEY}
project_id: hotate-project
requires:
- tf_deploy_prod

# ----------------------------------
- tf_plan:
Expand All @@ -186,10 +153,4 @@ workflows:
exec_directory: terraform/envs/stg
requires:
- tf_plan_stg
- gcf_deploy:
name: gcf_deploy_stg
cred_json: ${STG_GCP_SERVICE_KEY}
project_id: hotate-project-stg
requires:
- tf_deploy_stg

90 changes: 0 additions & 90 deletions scripts/deploy_gcf.py

This file was deleted.

0 comments on commit ac68588

Please sign in to comment.