otiai10 / too Goto Github PK
View Code? Open in Web Editor NEWMix multiple commands stream, keep all foreground and kill all in one Ctrl+C
License: MIT License
Mix multiple commands stream, keep all foreground and kill all in one Ctrl+C
License: MIT License
version: 0
runtime:
runs_on: local
prerequisite:
command:
- gcloud
- go
- npm
- curl
num_cpu:
min: 2
# max: 4
memory_gb:
min: 4
# max: 8
include:
- secrets.local.yaml
- too.local.extends.yaml
# must_include:
# - xxx
# - yyy
env:
PROJECT_ID: triax-football
DATASTORE_PROJECT_ID: triax-football
DATASTORE_DATASET: triax-football
DATASTORE_EMULATOR_HOST: localhost:8081
DATASTORE_EMULATOR_HOST_PATH: localhost:8081/datastore
DATASTORE_HOST: http://localhost:8081
variable:
DATE:
use: bash
value: $(date '+%Y-%m%d-%H%M%S')
collect: stdout
prep:
steps:
- name: devdataのディレクトリをつくっておく
run: mkdir -p ./devdata
- name: Datastore から Google Cloud Storage に、実データをエクスポート
run: |
gcloud datastore export \
gs://${PROJECT_ID}.appspot.com/datastore-export/${DATE} \
--project=${PROJECT_ID}
- name: ねんのために5秒待つ
run: sleep 5
- name: Google Cloud Storage からデータをダウンロード
run: |
gcloud storage cp -r \
gs://${PROJECT_ID}.appspot.com/datastore-export/${DATE} \
./devdata \
--project=${PROJECT_ID}
execute:
jobs:
- name: Datastore エミュレータを起動
label: datastore
run: gcloud beta emulators datastore start --data-dir=./devdata/${DATE} --project=${PROJECT_ID}
- name: しょうがないのでAPIで突っ込む
label: import
run: |
curl -X POST http://${DATASTORE_EMULATOR_HOST}/v1/projects/${PROJECT_ID}:import \
-H 'Content-Type: application/json' \
-d "{\"input_url\": \"${PWD}/devdata/${DATE}/${DATE}.overall_export_metadata\"}"
- name: APIサーバ起動
label: api
run: go run main.go
- name: フロントエンドdevサーバ起動
label: frontend
run: npm run dev
post:
steps:
- name: Clean up process
run: pkill datastore
ignore_error: true
% too -cmd="./node_modules/.bin/webpack --config ./client/webpack.config.js --watch --progress" -cmd="goapp serve app"
[0] ./node_modules/.bin/webpack
[0] ./node_modules/.bin/webpack Webpack is watching the files…
[0] ./node_modules/.bin/webpack
# <-- should build here!
[1] goapp INFO 2017-08-01 04:43:55,293 devappserver2.py:116] Skipping SDK update check.
[1] goapp INFO 2017-08-01 04:43:55,328 api_server.py:297] Starting API server at: http://localhost:54037
[1] goapp INFO 2017-08-01 04:43:55,334 dispatcher.py:209] Starting module "default" running at: http://localhost:8080
[1] goapp INFO 2017-08-01 04:43:55,337 admin_server.py:116] Starting admin server at: http://localhost:8000
% too -cmd="npm start" -cmd="goapp serve app"
[0] npm
[0] npm > [email protected] prestart /Users/otiai10/proj/go/src/github.com/otiai10/chant
[0] npm > yarn install
[0] npm
[0] npm yarn install v0.21.3
[0] npm [1/4] Resolving packages...
[0] npm success Already up-to-date.
[0] npm Done in 0.42s.
[1] goapp INFO 2017-08-01 04:42:06,948 devappserver2.py:116] Skipping SDK update check.
[0] npm
[0] npm > [email protected] start /Users/otiai10/proj/go/src/github.com/otiai10/chant
[0] npm > webpack --config ./client/webpack.config.js --watch --progress
[0] npm
[1] goapp INFO 2017-08-01 04:42:06,979 api_server.py:297] Starting API server at: http://localhost:53982
[1] goapp INFO 2017-08-01 04:42:06,982 dispatcher.py:209] Starting module "default" running at: http://localhost:8080
[1] goapp INFO 2017-08-01 04:42:06,984 admin_server.py:116] Starting admin server at: http://localhost:8000
[0] npm
[0] npm Webpack is watching the files…
[0] npm
# <-- should build here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.