Open juberti opened 9 years ago
Code snippet to get the deploy date from App Engine. Credentials can probably be obtained directly from our env var rather than using ServiceAccountCredentials
.
from googleapiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
credentials = ServiceAccountCredentials.from_json_keyfile_name(
'path/to/service-account-key.json',
['https://www.googleapis.com/auth/cloud-platform'])
appengine = build('appengine', 'v1', credentials=credentials)
project_id = 'your-project-id'
version_id = 'your-version-id'
version = appengine.apps().services().versions().get(
appsId=project_id,
servicesId='default',
versionsId=version_id).execute()
create_time = version.get('createTime')
print('Deployment time:', create_time)
Possibly a 1.1.0, or maybe the build date, e.g. 20150925