Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kaufmo committed Nov 3, 2021
2 parents c07cbe4 + aaca1e2 commit a0554bd
Show file tree
Hide file tree
Showing 618 changed files with 47,278 additions and 23,987 deletions.
16 changes: 16 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/typescript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version: 16, 14, 12
ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# Install an additional version of node using nvm
ARG EXTRA_NODE_VERSION=14
RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# Install more global node packages
RUN su node -c "npm install -g [email protected]"
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/typescript-node
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 12, 14, 16
"args": {
"VARIANT": "14"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"#terminal.integrated.shell.linux#": "/bin/bash",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["dbaeumer.vscode-eslint", "jpoissonnier.vscode-styled-components", "esbenp.prettier-vscode", "alex-young.pm2-explorer"],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm set cache .npm && npm i && npm run clean && npm run build",
"postStartCommand": "npm start",
"shutdownAction": "stopContainer"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
storybook-static/
comet-admin-lang/
lang/
/.npm
65 changes: 65 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
stages:
- lint
- i18n
- release

before_script:
- npm ci --cache .npm --prefer-offline

cache:
paths:
- ./.npm/

.lint:
image: eu.gcr.io/vivid-planet/ubi/s2i-ubi8-nodejs14:limit7-19
stage: lint
interruptible: true
only:
- master
- next
- external_pull_requests
tags:
- docker

project-lint:
extends: .lint
script:
- npx prettier -c .

packages-lint:
extends: .lint
script:
- npm run lint

i18n:
stage: i18n
image: eu.gcr.io/vivid-planet/ubi/s2i-ubi8-nodejs14:limit7-19
only:
- master
tags:
- docker
script:
- npm run intl:extract
- git clone https://github.com/vivid-planet/comet-admin-lang.git
- cp -r lang/* comet-admin-lang/
- cd comet-admin-lang
- git config user.email "[email protected]"
- git add .
- if [[ `git status --porcelain` ]]; then git commit -m "add translatable strings for $CI_COMMIT_SHA" && git remote rm origin && git remote add origin https://vivid-planet-bot:${GH_TOKEN}@github.com/vivid-planet/comet-admin-lang.git && git push --set-upstream origin master; fi

canary:
image: eu.gcr.io/vivid-planet/ubi/s2i-ubi8-nodejs14:limit7-19
stage: release
tags:
- docker
only:
- main
- next
except:
variables:
- $CI_COMMIT_MESSAGE =~ /^chore\(release\)/
script:
- |
npm config set @comet:registry https://registry.npmjs.org/
npm config set -- '//registry.npmjs.org/:_authToken' $NPM_TOKEN
- npx lerna publish --yes --canary --preid canary --no-git-tag-version --no-push
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ package-lock.json
lang/
.watchmanconfig
lib/
lerna.json
storybook-static
Loading

0 comments on commit a0554bd

Please sign in to comment.