diff --git a/package.json b/package.json index 953470a69..ebce176fd 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "merge.ci": "cp zabapgit.abap ci/zabapgit_standalone.prog.abap && cd ci && abaplint && cd ..", "unit": "rm -rf output && abap_transpile && echo RUNNING && node output/index.js", "abaplint": "abaplint", - "eslint": "eslint src" + "eslint": "eslint src", + "docker-build": "docker-compose -f test/docker-compose.yml build", + "docker-up": "docker-compose -f test/docker-compose.yml up", + "docker-unit": "docker-compose -f test/docker-compose.yml run --workdir=\"/home/node/abapGit\" abapgit npm run-script unit", + "docker-down": "docker-compose -f test/docker-compose.yml down" }, "repository": { "type": "git", diff --git a/test/Dockerfile b/test/Dockerfile new file mode 100644 index 000000000..56e49837d --- /dev/null +++ b/test/Dockerfile @@ -0,0 +1,8 @@ +FROM node + +ARG TINI_VERSION=v0.19.0 + +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini +RUN chmod a+x /usr/local/bin/tini + +ENTRYPOINT ["/usr/local/bin/tini", "--"] \ No newline at end of file diff --git a/test/docker-compose.yml b/test/docker-compose.yml new file mode 100644 index 000000000..fa36e5e09 --- /dev/null +++ b/test/docker-compose.yml @@ -0,0 +1,21 @@ +version: '3.4' + +services: + abapgit: + image: abapgit + build: + context: . + dockerfile: ./Dockerfile + environment: + NODE_ENV: development + networks: + default: + volumes: + - ..:/home/node/abapGit + # links: + # - httpEndpoint:httpbin.com + # depends_on: + # - httpEndpoint + # httpEndpoint: + # image: hashicorp/http-echo + # command: -text="Hello World" -listen=:80 \ No newline at end of file