12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- kind: pipeline
- name: default
-
- steps:
- - name: restore cache
- image: drillster/drone-volume-cache
- settings:
- restore: true
- mount:
- - ./node_modules
- volumes:
- - name: cache
- path: /cache
-
- - name: npm install
- image: node:12
- commands:
- - npm install
-
- - name: npm run build
- image: node:12
- commands:
- - npm run build
-
- - name: rebuild cache
- image: drillster/drone-volume-cache
- settings:
- rebuild: true
- mount:
- - ./node_modules
- volumes:
- - name: cache
- path: /cache
-
- - name: show tag
- image: alpine
- commands:
- - echo ${DRONE_BUILD_CREATED}
-
- - name: npm run test
- image: node:12
- commands:
- - npm run test
-
- - name: npm run docs
- image: node:12
- commands:
- - npm run docs
-
- - name: git checkin docs
- image: node:12
- commands:
- - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
- - git config --global user.name "${DRONE_COMMIT_AUTHOR}"
- - git clone https://gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git
- - rm -rf ./${DRONE_REPO_NAME}/docs/*
- - cp -r ./docs ./${DRONE_REPO_NAME}/docs
- - ls ./${DRONE_REPO_NAME}
- - cd ./${DRONE_REPO_NAME}
- - git add -f docs
- - git commit --allow-empty -m "drone tagged as version ${DRONE_BUILD_CREATED}"
- - git tag ${DRONE_BUILD_CREATED}
- - git status
- - git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fw-vendor/${DRONE_REPO_NAME}.git master ${DRONE_BUILD_CREATED}
- environment:
- GIT_USER:
- from_secret: git_user
- GIT_PASSWORD:
- from_secret: git_password
-
- - name: npm publish
- image: plugins/npm
- settings:
- username: frontwork
- password:
- from_secret: npm_password
- email: frontwork.me@gmail.com
-
- volumes:
- - name: cache
- host:
- path: /tmp
|