From 0b23cb89de8b7b8465b536921e21b056190801b6 Mon Sep 17 00:00:00 2001 From: Vishal Tak Date: Tue, 9 May 2023 15:47:33 +0530 Subject: [PATCH] chore: Add devfile for workspaces Adding a devfile allows us to create a workspaces in GitLab --- .devfile.yaml | 15 +++++++++++++++ package.json | 8 ++++---- 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .devfile.yaml diff --git a/.devfile.yaml b/.devfile.yaml new file mode 100644 index 0000000000..43c5d753cf --- /dev/null +++ b/.devfile.yaml @@ -0,0 +1,15 @@ +schemaVersion: 2.2.0 +components: + - name: gitlab-ui + attributes: + gl/inject-editor: true + container: + image: registry.gitlab.com/gitlab-org/remote-development/gitlab-remote-development-docs/debian-bullseye-ruby-3.2.patched-golang-1.20-rust-1.65-node-18.16-postgresql-15@sha256:216b9bf0555349f4225cd16ea37d7a627f2dad24b7e85aa68f4d364319832754 + env: + - name: STORYBOOK_HOST + value: "0.0.0.0" + endpoints: + - name: storybook + targetPort: 9001 + secure: true + protocol: http diff --git a/package.json b/package.json index 7a941a0ba9..fc785bfff7 100644 --- a/package.json +++ b/package.json @@ -30,13 +30,13 @@ "cy:edge": "cypress run --browser edge", "cy:run": "cypress run --browser firefox", "start": "yarn storybook", - "storybook": "yarn storybook-prep && storybook dev --ci --host localhost --port 9001 -c .storybook", - "storybook-vue3": "yarn storybook-prep && VUE_VERSION=3 storybook dev --ci --host localhost --port 9001 -c .storybook", + "storybook": "yarn storybook-prep && storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook", + "storybook-vue3": "yarn storybook-prep && VUE_VERSION=3 storybook dev --ci --host ${STORYBOOK_HOST:-localhost} --port 9001 -c .storybook", "storybook-prep": "run-s generate-utilities build-scss-variables copy-fonts", "storybook-static": "yarn storybook-prep && storybook build -c .storybook -o storybook", "pretest:unit": "yarn build-scss-variables", "test": "run-s test:unit test:visual", - "test:integration": "NODE_ENV=test start-server-and-test start http://localhost:9001/iframe.html cy:run", + "test:integration": "NODE_ENV=test start-server-and-test start http://${STORYBOOK_HOST:-localhost}:9001/iframe.html cy:run", "test:unit": "NODE_ENV=test jest --testPathIgnorePatterns storyshots.spec.js", "test:unit:watch": "yarn test:unit --watch", "test:unit:debug": "NODE_ENV=test node --inspect node_modules/.bin/jest --testPathIgnorePatterns storyshot.spec.js --watch --runInBand", @@ -46,7 +46,7 @@ "test:visual": "./bin/run-visual-tests.sh 'jest ./tests/storyshots.spec.js'", "test:visual:minimal": "node ./bin/run_minimal_visual_tests.js", "test:visual:update": "./bin/run-visual-tests.sh 'JEST_IMAGE_SNAPSHOT_TRACK_OBSOLETE=1 jest ./tests/storyshots.spec.js --updateSnapshot'", - "test:visual:internal": "NODE_ENV=test IS_VISUAL_TEST=true start-test http-get://localhost:9001/iframe.html", + "test:visual:internal": "NODE_ENV=test IS_VISUAL_TEST=true start-test http-get://${STORYBOOK_HOST:-localhost}:9001/iframe.html", "prettier": "prettier --check '**/*.{js,vue}'", "prettier:fix": "prettier --write '**/*.{js,vue}'", "eslint": "eslint --max-warnings 0 --ext .js,.vue .", -- GitLab