Giter Club home page Giter Club logo

too's Issues

Workflow Definition for local development

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

[bug] npm watcher process not detecting file changes

% 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.