build(bazel): adjust aio opensearch substitution with bazel paths

Now points to the bazel dist folder.
This commit is contained in:
Derek Cormier
2022-09-06 13:32:31 -07:00
committed by Joey Perrott
parent 4cafb67e82
commit 7c12ebb50d
3 changed files with 8 additions and 7 deletions
+5 -3
View File
@@ -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": "",
+1 -2
View File
@@ -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",
+2 -2
View File
@@ -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 /