diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..45f4a7b3d6bcc987f2b90e4d1b460e6708bc724d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,71 @@ +stages: +- build_app +- test_app +- publish_app +- build_image +- publish_image + +variables: + npm_config_registry: https://docker.ub.intern.uni-leipzig.de/npm + +npm_install: + stage: build_app + image: node:8-alpine + script: + - npm install + - npm run build + cache: + key: "${CI_COMMIT_SHA}" + paths: + - node_modules + - dist + - public + tags: + - docker + +npm_ci: + stage: test_app + image: node:8-alpine + script: + - npm run ci + cache: + key: "${CI_COMMIT_SHA}" + paths: + - node_modules + - dist + - public + tags: + - docker + +npm_publish: + stage: publish_app + only: + - master + image: node:8-alpine + script: + - echo "//docker.ub.intern.uni-leipzig.de/:_authToken=${NPM_TOKEN}" > ~/.npmrc + - npm publish + cache: + key: "${CI_COMMIT_SHA}" + paths: + - node_modules + - dist + - public + tags: + - docker + +docker_build: + stage: build_image + only: + - master + image: docker:latest + services: + - docker:dind + script: + - docker login --username '${DOCKER_USER}' --password '${DOCKER_PASSWORD}' + - docker build --no-cache --pull -t ubleipzig/dacap:latest . + - docker tag ubleipzig/dacap:latest ubleipzig/dacap:${CI_PIPELINE_ID} + - docker push ubleipzig/dacap:${CI_PIPELINE_ID} + - docker push ubleipzig/dacap:latest + tags: + - docker diff --git a/docs/Readme.md b/docs/Readme.md index 9c36af5967cebdbdc3c8deee7a93859c5355f57b..1406608e94090a67a78961c29dcf107f5815ee96 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -2,6 +2,9 @@ *Dynamic And Compressing Api Proxy* is a service which lets you proxy arbitrary API-Endpoints which are by themself to slow to be used in production environments. All cached Responses are held in memory, so be sure to provide enough. +[](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/commits/master) +[](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/commits/master) + ## Requirements * node >= v8.2.1 diff --git a/package.json b/package.json index 5d52d46bbb6e3eee818b3c2b1a442cd2f589720a..c1f92542c045226d7ba8c5c544f3248c2acc0718 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dacap", - "version": "1.0.7", + "version": "1.0.9", "description": "proxies,compresses and caches api-requests", "main": "bin/dacap", "bin": { @@ -16,7 +16,7 @@ "inspect-watch": "tsc-watch --onSuccess 'node --inspect=0.0.0.0:9229 bin/dacap'", "inspect-brk-watch": "tsc-watch --onSuccess 'node --inspect-brk=0.0.0.0:9229 bin/dacap'", "test": "mocha", - "ci": "istanbul cover _mocha -- --no-colors --timeout 10000 --reporter mocha-jenkins-reporter", + "ci": "istanbul cover _mocha -- --timeout 10000", "build": "rm -rf dist public && tsc --declaration && webpack --config webpack.prod.js" }, "author": "Ulf Seltmann <ulf.seltmann@uni-leipzig.de>",