diff --git a/.circleci/config.yml b/.circleci/config.yml index 52b66ab5a7..df5a0471e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -236,7 +236,9 @@ jobs: command: npx ngcc - run: name: Generate examples for the demo application - command: npm run examples-tools + command: | + npm run examples-tools + npm run barista-tools - run: yarn nx affected:build ${AFFECTED_ARGS} --configuration=production --parallel --exclude=examples-tools - persist_to_workspace: root: ~/barista diff --git a/.github/workflows/barista-preview.yml b/.github/workflows/barista-preview.yml index b2164705ee..af39e45ea1 100644 --- a/.github/workflows/barista-preview.yml +++ b/.github/workflows/barista-preview.yml @@ -8,33 +8,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + container: designops/workspace-base:latest env: - CI: true + WORKSPACE_DIR: /dynatrace steps: - uses: actions/checkout@v2 - - name: Cache node modules - uses: actions/cache@v1 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Use node 12.x - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - - name: Install dependencies - run: npm ci + - name: Link the node_modules and the builders in the current working directory + run : | + cp -R "$WORKSPACE_DIR/dist/tmp/workspace" "$WORKSPACE_DIR/node_modules/@dynatrace/workspace" + ln -s "$WORKSPACE_DIR/node_modules" "$PWD/node_modules" - name: Build Barista Design System run: | npm run examples-tools npm run barista-tools - npm run ng build workspace - npm run ng run barista-design-system:render:production + + npm run ng run barista-design-system:build:production - name: ZEIT Now Deployment id: now-deployment diff --git a/angular.json b/angular.json index f2fd639801..ea4f141d54 100644 --- a/angular.json +++ b/angular.json @@ -405,6 +405,19 @@ "projectType": "application", "architect": { "build": { + "builder": "@dynatrace/workspace:build-barista", + "options": { + "devServerTarget": "barista-design-system:serve-ssr", + "outputPath": "dist/apps/barista-design-system/browser", + "routesFile": "dist/barista-data/routes.txt" + }, + "configurations": { + "production": { + "devServerTarget": "barista-design-system:serve-ssr:production" + } + } + }, + "build-frontend": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/apps/barista-design-system/browser", @@ -539,23 +552,23 @@ "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "barista-design-system:build" + "browserTarget": "barista-design-system:build-frontend" }, "configurations": { "production": { - "browserTarget": "barista-design-system:build:production" + "browserTarget": "barista-design-system:build-frontend:production" } } }, "serve-ssr": { "builder": "@nguniversal/builders:ssr-dev-server", "options": { - "browserTarget": "barista-design-system:build", + "browserTarget": "barista-design-system:build-frontend", "serverTarget": "barista-design-system:build-server" }, "configurations": { "production": { - "browserTarget": "barista-design-system:build:production", + "browserTarget": "barista-design-system:build-frontend:production", "serverTarget": "barista-design-system:build-server:production" } } @@ -587,19 +600,6 @@ "setupFile": "apps/barista-design-system/src/test-setup.ts", "passWithNoTests": true } - }, - "render": { - "builder": "@dynatrace/workspace:build-barista", - "options": { - "devServerTarget": "barista-design-system:serve-ssr", - "outputPath": "dist/apps/barista-design-system/browser", - "routesFile": "dist/barista-data/routes.txt" - }, - "configurations": { - "production": { - "devServerTarget": "barista-design-system:serve-ssr:production" - } - } } } },