stages:
  - install
  - build
  - deploy
  - upload

install_job:
  stage: install
  script:
    - echo '123'
  tags:
    - imgker

build_job:
  stage: build
  variables:
    GIT_STRATEGY: none
  script:
    - npm run build 
  tags:
    - imgker

deploy_job:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - APPID=$(NODE_ENV=$(git log --pretty=format:\"%an-%h-%s-%H\" -1) node ./gitlab-ci/init.js)
    - echo $APPID > appid.txt
  tags:
    - imgker

upload_job:
  stage: upload
  variables:
    GIT_STRATEGY: none
  script:
    - mkdir dist_new
    - mv ./dist ./dist_new 
    # - mv ./dist_new /home
    - APPID=$(cat appid.txt)
    - ossutil64 cp -r ./dist_new oss://jsonote/$APPID > lll.txt
  tags:
    - imgker
