forked from specklesystems/speckle-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* yarn first go * fix frontend build cache loader * yarn workspaces built server Docker * build(yarn): add workspaces plugin config * chore(package defs): clean package*.json -s * chore(gitignore): ignore yarn error log * build(yarn): update yarn lock * build(preview-service webpack): add extra resolved path to preview service webpack config because of yarn package hoisting, there are no package level node_modules folder anymore. * build(docker): update dockerignore with yarn specific configs * build(docker): update Dockerfiles for yarn workspaces utilization * ci(circleci): update server test job to yarn * ci(circle): disable cache restore * ci(circleci): trying the node orb yarn-run * ci(circleci): yarn-run again * ci(circleci): disable node orb * ci(circleci): change base node image for tests * ci(circleci): add yarn cache * ci(circleci): remove node install step * ci(circleci): add server specific cache archives * ci(circleci): test build and publish * ci(circleci): change npm auth method to suit yarn * ci(circleci): trying new builder image * ci(circleci): another base image, maybe this works * ci(circleci): force a specific docker engine version * ci(circleci): add yarn version plugin and its changes * ci(circleci): cleanup and remove temp branch config * chore(package defs): moving from npm run to yarn * explicitly specifying webpack4 as a frontend dep * chore(package defs): replace npm with yarn everywhere * docs(root readme): update with some yarn specific docs * chore(root workspace): update dev scripts and package lock * ci(circleci): enable package publish step with yarn Co-authored-by: Fabians <[email protected]>
- Loading branch information
1 parent
fb5f49c
commit 638969c
Showing
42 changed files
with
26,856 additions
and
153,309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
node: circleci/[email protected] | ||
|
||
workflows: | ||
version: 2 | ||
|
||
|
@@ -20,6 +17,7 @@ workflows: | |
branches: | ||
only: | ||
- main | ||
|
||
- docker-build-and-publish-server: | ||
filters: *filters-build | ||
context: &docker-hub-context | ||
|
@@ -81,16 +79,16 @@ workflows: | |
- docker-build-and-publish-monitor-container | ||
- docker-build-and-publish-test-container | ||
|
||
# - publish-npm: | ||
# filters: | ||
# tags: | ||
# only: *filters-tag | ||
# branches: | ||
# ignore: /.*/ | ||
# context: | ||
# - npm-registry | ||
# requires: | ||
# - get-version | ||
- publish-npm: | ||
filters: | ||
tags: | ||
only: *filters-tag | ||
branches: | ||
ignore: /.*/ | ||
context: | ||
- npm-registry | ||
requires: | ||
- get-version | ||
|
||
jobs: | ||
get-version: | ||
|
@@ -115,7 +113,7 @@ jobs: | |
|
||
test-server: | ||
docker: | ||
- image: cimg/node:lts | ||
- image: cimg/node:16.15 | ||
- image: cimg/redis:6.2.6 | ||
- image: 'cimg/postgres:12.8' | ||
environment: | ||
|
@@ -132,16 +130,30 @@ jobs: | |
CANONICAL_URL: 'http://localhost:3000' | ||
steps: | ||
- checkout | ||
- node/install-packages: | ||
app-dir: ~/project/packages/server | ||
- restore_cache: | ||
name: Restore Yarn Package Cache | ||
keys: | ||
- yarn-packages-server-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install Dependencies | ||
command: yarn workspaces focus | ||
working_directory: 'packages/server' | ||
|
||
- save_cache: | ||
name: Save Yarn Package Cache | ||
key: yarn-packages-server-{{ checksum "yarn.lock" }} | ||
paths: | ||
- .yarn/cache | ||
- .yarn/unplugged | ||
|
||
- run: 'dockerize -wait tcp://localhost:5432 -timeout 1m' | ||
|
||
- run: | ||
command: touch .env.test | ||
working_directory: 'packages/server' | ||
|
||
- run: | ||
command: npm run test:report | ||
command: yarn test:report | ||
working_directory: 'packages/server' | ||
|
||
- run: | ||
|
@@ -157,14 +169,17 @@ jobs: | |
|
||
docker-build-and-publish: &docker-job | ||
docker: &docker-image | ||
- image: cimg/python:3.9-node | ||
- image: cimg/node:16.15 | ||
working_directory: *work-dir | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: /tmp/ci/workspace | ||
- run: cat workspace/env-vars >> $BASH_ENV | ||
- setup_remote_docker: | ||
# a weird issue with yarn installing packages throwing EPERM errors | ||
# this fixes it | ||
version: 20.10.12 | ||
docker_layer_caching: true | ||
- run: | ||
name: Build and Publish | ||
|
@@ -215,25 +230,50 @@ jobs: | |
- attach_workspace: | ||
at: /tmp/ci/workspace | ||
- run: cat workspace/env-vars >> $BASH_ENV | ||
|
||
- restore_cache: | ||
name: Restore Yarn Package Cache | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: restore packages | ||
command: | | ||
npm i | ||
npx lerna bootstrap | ||
# this has to be after lerna bootstrap | ||
# otherwise the auth workflow of lerna is borked... | ||
name: Install Dependencies | ||
command: yarn | ||
|
||
- save_cache: | ||
name: Save Yarn Package Cache | ||
key: yarn-packages-{{ checksum "yarn.lock" }} | ||
paths: | ||
- .yarn/cache | ||
- .yarn/unplugged | ||
|
||
- run: | ||
name: auth to npm as Speckle | ||
command: | | ||
echo "@speckle:registry=https://registry.npmjs.org" >> .npmrc | ||
echo "registry=http://registry.npmjs.org/" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc | ||
echo "npmRegistryServer: https://registry.npmjs.org/" >> .yarnrc.yml | ||
echo "npmAuthToken: ${NPM_TOKEN}" >> .yarnrc.yml | ||
- run: | ||
name: try login to npm | ||
command: npm whoami | ||
command: yarn npm whoami | ||
|
||
- run: | ||
name: build public packages | ||
command: yarn workspaces foreach -ptv --no-private run build | ||
- run: | ||
name: bump all versions | ||
# bump all versions in dependency tree order but not in parallel | ||
command: yarn workspaces foreach -tv version $IMAGE_VERSION_TAG | ||
|
||
- run: | ||
name: publish to npm | ||
command: npx lerna publish $IMAGE_VERSION_TAG -y --no-git-tag-version --no-push | ||
command: 'yarn workspaces foreach -pv --no-private npm publish --access public --tag next' | ||
|
||
# - run: | ||
# name: commit changes | ||
# command: | | ||
# yarn prettier:fix | ||
# git add . | ||
# git commit -m '[ci skip] bump version to $IMAGE_VERSION_TAG' | ||
# git push | ||
|
||
publish-helm-chart: | ||
docker: *docker-image | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
undecided: | ||
- '@speckle/fileimport-service' | ||
- '@speckle/frontend' | ||
- '@speckle/objectloader' | ||
- '@speckle/preview-service' | ||
- '@speckle/server' | ||
- '@speckle/viewer' | ||
- '@speckle/viewer-sandbox' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: '@yarnpkg/plugin-workspace-tools' | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: '@yarnpkg/plugin-version' | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.0.cjs |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.