Revert "stop deploying from admin script, straight from CI"
This reverts commit 237d07eab2
.
This commit is contained in:
parent
237d07eab2
commit
5c32b8eb19
58
.github/workflows/ci.yml
vendored
58
.github/workflows/ci.yml
vendored
@ -163,7 +163,7 @@ jobs:
|
|||||||
|
|
||||||
# DEPLOY for setting up cloud API
|
# DEPLOY for setting up cloud API
|
||||||
- name: Set up Cloud SDK
|
- name: Set up Cloud SDK
|
||||||
uses: google-github-actions/auth@v1.0.0
|
uses: google-github-actions/auth@v0.7.3
|
||||||
with:
|
with:
|
||||||
credentials_json: '${{ secrets.GCP_SA_KEY }}'
|
credentials_json: '${{ secrets.GCP_SA_KEY }}'
|
||||||
export_environment_variables: true
|
export_environment_variables: true
|
||||||
@ -178,81 +178,29 @@ jobs:
|
|||||||
run: gcloud app deploy dispatch.yaml --quiet
|
run: gcloud app deploy dispatch.yaml --quiet
|
||||||
|
|
||||||
# DEPLOY app engine service, -nb for skipping compile
|
# DEPLOY app engine service, -nb for skipping compile
|
||||||
- name: Copy Engine Main
|
- name: Deploy App Engine Service
|
||||||
run: python admin.py app -nb
|
run: python admin.py app -nb
|
||||||
- name: Deploy App Engine
|
|
||||||
uses: google-github-actions/deploy-appengine@v0.8.0
|
|
||||||
|
|
||||||
### MAIN FUNCTIONS
|
### MAIN FUNCTIONS
|
||||||
|
|
||||||
# DEPLOY update_tag function
|
# DEPLOY update_tag function
|
||||||
- name: Prepare update_tag Function
|
|
||||||
run: python admin.py tag
|
|
||||||
- name: Deploy update_tag Function
|
- name: Deploy update_tag Function
|
||||||
uses: google-github-actions/deploy-cloud-functions@v0.10.1
|
run: python admin.py tag
|
||||||
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
|
|
||||||
|
|
||||||
# DEPLOY run_user_playlist function
|
# DEPLOY run_user_playlist function
|
||||||
- name: Deploy run_user_playlist Function
|
- name: Deploy run_user_playlist Function
|
||||||
run: python admin.py playlist
|
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
|
### CRON FUNCTIONS
|
||||||
|
|
||||||
# DEPLOY run_all_playlists function
|
# DEPLOY run_all_playlists function
|
||||||
- name: Deploy run_all_playlists Function
|
- name: Deploy run_all_playlists Function
|
||||||
run: python admin.py playlist_cron
|
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
|
# DEPLOY run_all_playlist_stats function
|
||||||
- name: Deploy run_all_playlist_stats Function
|
- name: Deploy run_all_playlist_stats Function
|
||||||
run: python admin.py playlist_stats_cron
|
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
|
# DEPLOY run_all_tags function
|
||||||
- name: Deploy run_all_tags Function
|
- name: Deploy run_all_tags Function
|
||||||
run: python admin.py tags_cron
|
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
|
|
||||||
|
8
admin.py
8
admin.py
@ -141,8 +141,8 @@ class Admin(Cmd):
|
|||||||
self.compile_frontend()
|
self.compile_frontend()
|
||||||
self.copy_main_file('api')
|
self.copy_main_file('api')
|
||||||
|
|
||||||
# print('>> deploying app engine service')
|
print('>> deploying app engine service')
|
||||||
# subprocess.check_call('gcloud app deploy', shell=True)
|
subprocess.check_call('gcloud app deploy', shell=True)
|
||||||
|
|
||||||
def function_deploy(self, main, function_id):
|
def function_deploy(self, main, function_id):
|
||||||
"""Deploy Cloud Function, copy main file and initiate gcloud command
|
"""Deploy Cloud Function, copy main file and initiate gcloud command
|
||||||
@ -153,8 +153,8 @@ class Admin(Cmd):
|
|||||||
"""
|
"""
|
||||||
self.copy_main_file(main)
|
self.copy_main_file(main)
|
||||||
|
|
||||||
# print(f'>> deploying {function_id}')
|
print(f'>> deploying {function_id}')
|
||||||
# self.deploy_function(function_id)
|
self.deploy_function(function_id)
|
||||||
|
|
||||||
def do_tag(self, args):
|
def do_tag(self, args):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user