diff --git a/.gitignore b/.gitignore index d276a9ef5e223541490968824063d4dc47f0c2d2..8b47a5d75bb2bb772116e5d16b85aa03c4e90d19 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ client_secret .env +uhepp_org/uhepp_vault/static/uhepp-js/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67a4da559ccc7ccedd3493485f17797a27681b0f..342479a114550cb8afed47fef6e20fbc7c72e2b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - test + - jsbuild - build - deploy @@ -22,11 +23,23 @@ jstest: - npm i - npm run-script test +jsbuild: + stage: jsbuild + when: manual + image: node:12 + + script: + - cd uhepp-js + - npm i + - npm run-script build + + artifacts: + expire_in: 1 week + paths: + - uhepp_org/uhepp_vault/static/uhepp-js/main.js* + build: stage: build - # Build a docker image, tag it with the current git commit and push it to the - # gitlab registry. - when: manual image: name: docker/compose:1.24.0 entrypoint: ["/bin/sh", "-c"] @@ -37,6 +50,9 @@ build: - name: docker:18.09.7-dind alias: docker-in-docker + dependencies: + - jsbuild + tags: # Use docker-machine (virtualbox) runner to run containers in priviliged # mode diff --git a/uhepp-js/webpack.config.js b/uhepp-js/webpack.config.js index eaea0e6c2d7dc12fb382325e598f4087f75b6a09..f55ca34f2b92386a672fa4b2faef0fb4243fb7a6 100644 --- a/uhepp-js/webpack.config.js +++ b/uhepp-js/webpack.config.js @@ -27,7 +27,7 @@ module.exports = { output: { filename: '[name].js', library: 'uhepp', - path: path.resolve(__dirname, 'dist') + path: path.resolve(__dirname, '../uhepp_org/uhepp_vault/static/uhepp-js') }, module: { rules: [ diff --git a/uhepp_org/uhepp_vault/static/uhepp-js b/uhepp_org/uhepp_vault/static/uhepp-js deleted file mode 120000 index ad8fdfb886de59022d57f15e2d6e73ff86fa0dd0..0000000000000000000000000000000000000000 --- a/uhepp_org/uhepp_vault/static/uhepp-js +++ /dev/null @@ -1 +0,0 @@ -../../../uhepp-js/dist/ \ No newline at end of file