image: registry.gitlab.com/openstapps/projectmanagement/node cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules before_script: - npm install stages: - build - test - audit - deploy build: stage: build script: - npm run build artifacts: paths: - lib test: tags: - docker stage: test script: - npm test audit: stage: audit script: - npm audit allow_failure: true except: - schedules scheduled-audit: stage: audit script: - npm audit only: - schedules routes: dependencies: - build stage: test script: - npm install @openstapps/core - node lib/cli.js routes node_modules/@openstapps/core/lib routes.md - NUMBER_OF_LINES=$(cat routes.md | wc -l) - if [ "$NUMBER_OF_LINES" -lt 100 ]; then exit 1; fi artifacts: paths: - routes.md mapping: dependencies: - build stage: test services: - name: registry.gitlab.com/openstapps/database:master alias: elasticsearch script: - npm install @openstapps/core - node lib/cli.js put-es-templates ./node_modules/@openstapps/core/src http://elasticsearch:9200/ "pattern,see,minlength,tjs-format" package: dependencies: - build tags: - secrecy stage: deploy script: - echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc - npm publish only: - /^v[0-9]+.[0-9]+.[0-9]+$/ artifacts: paths: - lib uml: dependencies: - build stage: test services: - name: registry.gitlab.com/openstapps/core-tools:latest alias: plantuml script: - node lib/cli.js plantuml test/model http://plantuml:8080 --showProperties --showOptionalProperties --showInheritedProperties --showEnumValues --showAssociations --showInheritance --excludeExternals pages: stage: deploy script: - npm run documentation - mv docs public only: - /^v[0-9]+\.[0-9]+\.[0-9]+$/ artifacts: paths: - public