kind: pipeline
type: docker
name: default
platform:
  arch: amd64
  os: linux
steps:
  - name: test
    image: node:16.2.0
    commands:
      - node -v
      - npm -v
      - yarn --version
      - yarn config set registry https://registry.npm.taobao.org
      - yarn install
      - yarn run test
  - name: publish
    image: plugins/docker:19.03.8
    environment:   
      PLUGIN_REGISTRY: 10.10.14.176:5000
      PLUGIN_REPO: 10.10.14.176:5000/node/example
    settings:
      insecure: true
      tags:
        - latest
        - ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}