diff --git a/aio/BUILD.bazel b/aio/BUILD.bazel index 19a4cdfc1a8..8b264305733 100644 --- a/aio/BUILD.bazel +++ b/aio/BUILD.bazel @@ -184,7 +184,7 @@ copy_to_bin( ) architect( - name = "build", + name = "build-app", args = [ "site:build:stable", "--output-path=build", @@ -217,11 +217,13 @@ npm_package_bin( tool = "//aio/scripts:build-404-page", ) +# Prepare the final build artifact which substitutes a generated 404 page +# into the architect output. copy_to_directory( - name = "build-with-404", + name = "build", srcs = [ ":404-page", - ":build", + ":build-app", ], replace_prefixes = { "build": "", diff --git a/aio/package.json b/aio/package.json index 3c18eec3a8d..719657ffb6f 100644 --- a/aio/package.json +++ b/aio/package.json @@ -10,7 +10,6 @@ "start": "yarn check-env && ng serve", "prebuild": "yarn setup", "build": "bazel build //aio:build", - "build:bazel": "bazelisk build //aio:build", "prebuild-local": "yarn setup-local", "build-local": "yarn build --config=aio_local_deps", "prebuild-local-ci": "yarn setup-local-ci", @@ -24,7 +23,7 @@ "e2e": "bazel test //aio:e2e", "e2e-local": "yarn e2e --config=aio_local_deps", "setup": "yarn --cwd .. install && yarn install --frozen-lockfile && yarn ~~check-env", - "set-opensearch-url": "node --eval \"const sh = require('shelljs'); sh.set('-e'); sh.sed('-i', /PLACEHOLDER_URL/g, process.argv[1], 'dist/assets/opensearch.xml');\"", + "set-opensearch-url": "node --eval \"const sh = require('shelljs'); sh.set('-e'); sh.sed('-i', /PLACEHOLDER_URL/g, process.argv[1], '../dist/bin/aio/build/assets/opensearch.xml');\"", "presmoke-tests": "yarn update-webdriver", "smoke-tests": "protractor tests/deployment/e2e/protractor.conf.js --suite smoke --baseUrl", "test-a11y-score": "bazel run //aio/scripts:test-aio-a11y", diff --git a/aio/scripts/build-artifacts.sh b/aio/scripts/build-artifacts.sh index dda39009660..ea711326da7 100755 --- a/aio/scripts/build-artifacts.sh +++ b/aio/scripts/build-artifacts.sh @@ -5,7 +5,7 @@ set -eu -o pipefail readonly relativeOutputPath=$1 readonly prNumber=$2 readonly prLastSha=$3 -readonly inputDir=dist/ +readonly inputDir=../dist/bin/aio/build readonly outputFile=$PROJECT_ROOT/$relativeOutputPath readonly deployedUrl=https://pr${prNumber}-${prLastSha:0:7}.ngbuilds.io/ @@ -13,7 +13,7 @@ readonly deployedUrl=https://pr${prNumber}-${prLastSha:0:7}.ngbuilds.io/ cd $PROJECT_ROOT/aio # Build and store the app - yarn build --progress=false + yarn build # Set deployedUrl as parameter in the opensearch description # deployedUrl must end with /