1# Copyright (C) 2017 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 15PROJECT="perfetto-aosp-to-github-bot" 16VM_NAME="perfetto-aosp-to-github-bot" 17ZONE="us-central1-c" 18 19ssh: 20 gcloud --account $(USER)@google.com \ 21 compute --project $(PROJECT) ssh --zone $(ZONE) gitbot@$(VM_NAME) 22 23stop: 24 gcloud compute \ 25 --project $(PROJECT) \ 26 instances delete $(VM_NAME) \ 27 --zone $(ZONE) 28 29start: 30 gcloud compute \ 31 --project $(PROJECT) \ 32 instances create $(VM_NAME) \ 33 --zone $(ZONE) \ 34 --machine-type "n1-standard-2" \ 35 --subnet "default" \ 36 --maintenance-policy "MIGRATE" \ 37 --image "debian-9-drawfork-v20191004" \ 38 --image-project "eip-images" \ 39 --boot-disk-size "10" \ 40 --boot-disk-type "pd-standard" \ 41 --boot-disk-device-name "perfetto-ci-git-mirror-bot" \ 42 --metadata-from-file=startup-script=startup-script.sh,main=mirror_aosp_to_ghub_repo.py 43 44.PHONY: ssh stop start 45