Revert "stop deploying from admin script, straight from CI"

This reverts commit 237d07eab2.
This commit is contained in:
Andy Pack 2022-11-11 07:06:17 +00:00
parent 237d07eab2
commit 5c32b8eb19
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7
2 changed files with 7 additions and 59 deletions

View File

@ -163,7 +163,7 @@ jobs:
# DEPLOY for setting up cloud API
- name: Set up Cloud SDK
uses: google-github-actions/auth@v1.0.0
uses: google-github-actions/auth@v0.7.3
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
export_environment_variables: true
@ -178,81 +178,29 @@ jobs:
run: gcloud app deploy dispatch.yaml --quiet
# DEPLOY app engine service, -nb for skipping compile
- name: Copy Engine Main
- name: Deploy App Engine Service
run: python admin.py app -nb
- name: Deploy App Engine
uses: google-github-actions/deploy-appengine@v0.8.0
### MAIN FUNCTIONS
# DEPLOY update_tag function
- name: Prepare update_tag Function
run: python admin.py tag
- name: Deploy update_tag Function
uses: google-github-actions/deploy-cloud-functions@v0.10.1
with:
name: update_tag
event_trigger_resource: projects/sarsooxyz/topics/update_tag
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
region: europe-west2
runtime: python310
timeout: 60
env_vars: DEPLOY_DESTINATION=PROD
run: python admin.py tag
# DEPLOY run_user_playlist function
- name: Deploy run_user_playlist Function
run: python admin.py playlist
- name: Deploy run_user_playlist Function
uses: google-github-actions/deploy-cloud-functions@v0.10.1
with:
name: run_user_playlist
event_trigger_resource: projects/sarsooxyz/topics/run_user_playlist
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
region: europe-west2
runtime: python310
timeout: 60
env_vars: DEPLOY_DESTINATION=PROD
### CRON FUNCTIONS
# DEPLOY run_all_playlists function
- name: Deploy run_all_playlists Function
run: python admin.py playlist_cron
- name: Deploy run_all_playlists Function
uses: google-github-actions/deploy-cloud-functions@v0.10.1
with:
name: run_all_playlists
event_trigger_resource: projects/sarsooxyz/topics/run_all_playlists
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
region: europe-west2
runtime: python310
timeout: 60
env_vars: DEPLOY_DESTINATION=PROD
# DEPLOY run_all_playlist_stats function
- name: Deploy run_all_playlist_stats Function
run: python admin.py playlist_stats_cron
- name: Deploy run_all_playlist_stats Function
uses: google-github-actions/deploy-cloud-functions@v0.10.1
with:
name: run_all_playlist_stats
event_trigger_resource: projects/sarsooxyz/topics/run_all_playlist_stats
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
region: europe-west2
runtime: python310
timeout: 60
env_vars: DEPLOY_DESTINATION=PROD
# DEPLOY run_all_tags function
- name: Deploy run_all_tags Function
run: python admin.py tags_cron
- name: Deploy run_all_tags Function
uses: google-github-actions/deploy-cloud-functions@v0.10.1
with:
name: run_all_tags
event_trigger_resource: projects/sarsooxyz/topics/run_all_tags
event_trigger_type: providers/cloud.pubsub/eventTypes/topic.publish
region: europe-west2
runtime: python310
timeout: 60
env_vars: DEPLOY_DESTINATION=PROD

View File

@ -141,8 +141,8 @@ class Admin(Cmd):
self.compile_frontend()
self.copy_main_file('api')
# print('>> deploying app engine service')
# subprocess.check_call('gcloud app deploy', shell=True)
print('>> deploying app engine service')
subprocess.check_call('gcloud app deploy', shell=True)
def function_deploy(self, main, function_id):
"""Deploy Cloud Function, copy main file and initiate gcloud command
@ -153,8 +153,8 @@ class Admin(Cmd):
"""
self.copy_main_file(main)
# print(f'>> deploying {function_id}')
# self.deploy_function(function_id)
print(f'>> deploying {function_id}')
self.deploy_function(function_id)
def do_tag(self, args):
"""