1# Copyright (C) 2019 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15 16include $(shell python3 ../config.py makefile) 17 18.EXPORT_ALL_VARIABLES: 19GOOGLE_CLOUD_PROJECT=${PROJECT} 20 21test: config.py common_utils.py 22 gcloud auth application-default login --impersonate-service-account perfetto-ci@appspot.gserviceaccount.com 23 python3 `which dev_appserver.py` app.yaml --support_datastore_emulator=False --log_level ${LOGLEVEL} 24 25deploy: config.py common_utils.py 26 gcloud app deploy -q app.yaml cron.yaml \ 27 --project ${PROJECT} \ 28 -v ${GAE_VERSION} \ 29 --stop-previous-version 30 31stop: 32 gcloud app instances delete \ 33 $(shell gcloud app instances list --project ${PROJECT} -v ${GAE_VERSION} -s default | tail -n1 | awk '{print $$3}') \ 34 --project ${PROJECT} -v ${GAE_VERSION} -s default -q 35 36config.py: ../config.py 37 cp ../$@ $@ 38 39common_utils.py: ../common_utils.py 40 cp ../$@ $@ 41 42.PHONY: deploy test 43