Skip to content

Commit 2260f12

Browse files
sofislgcf-owl-bot[bot]alexander-fenster
authored
chore!: migrate to Node 14 (#4443)
* feat: upgrade our libraries to node 14 * chore!: update libraries to Node 14 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update run_single_test.sh * retry with dev dep * retry * retry * Update run_single_test.sh * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * retry * retry * retry * retyr * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * retry * retry * retry * chore: update package.json * remove enable scripts * remove procurement * fix unsafe optional chaining * Update presubmit.yaml * Update continuous.yaml * Update presubmit.yaml * Update continuous.yaml * chore: bump versions * fix: recompile and gts fix everything * chore(deps): add gapic-tools dependency where it was missing * chore(deps): update c8 to 8.0.1 * test: fix samples test for channel * samples: fix sample for security center * fix: remove webpack dependencies --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <fenster@google.com>
1 parent 74d46d5 commit 2260f12

File tree

907 files changed

+650000
-31023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

907 files changed

+650000
-31023
lines changed

.github/sync-repo-settings.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ branchProtectionRules:
3434
- "samples-presubmit-node14-with-credentials (long-door-651)"
3535
- "samples-presubmit-node14 (long-door-651)"
3636
- "units (14)"
37-
- "units (12)"
3837
- "units (16)"
3938
- "units (18)"
39+
- "units (20)"
4040
# List of explicit permissions to add (additive only)
4141
permissionRules:
4242
# Team slug to add to repository permissions

.github/workflows/continuous.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
node: [14]
1212
steps:
1313
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: ${{ matrix.node }}
1417
- uses: pnpm/action-setup@v2
1518
with:
1619
version: 7.32.2
@@ -24,7 +27,7 @@ jobs:
2427
runs-on: ubuntu-latest
2528
strategy:
2629
matrix:
27-
node: [12, 14, 16, 18]
30+
node: [14, 16, 18, 20]
2831
steps:
2932
- uses: actions/checkout@v3
3033
- uses: pnpm/action-setup@v2

.github/workflows/presubmit.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ jobs:
99
node: [14]
1010
steps:
1111
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: ${{ matrix.node }}
1215
- uses: pnpm/action-setup@v2
1316
with:
1417
version: 7.32.2
@@ -22,7 +25,7 @@ jobs:
2225
runs-on: ubuntu-latest
2326
strategy:
2427
matrix:
25-
node: [12, 14, 16, 18]
28+
node: [14, 16, 18, 20]
2629
steps:
2730
- uses: actions/checkout@v3
2831
- uses: pnpm/action-setup@v2

.kokoro/release/docs.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ before_action {
1111
# doc publications use a Python image.
1212
env_vars: {
1313
key: "TRAMPOLINE_IMAGE"
14-
value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user"
14+
value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user"
1515
}
1616

1717
# Use the trampoline script to run in docker.

ci/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG NODE_VERSION=14
15+
ARG NODE_VERSION=16
1616
ARG FLAKYBOT_VERSION=1.1.0
1717

1818
FROM node:${NODE_VERSION}-alpine as build
@@ -46,4 +46,4 @@ COPY --from=build /root/.local/share/pnpm /root/.local/share/pnpm
4646
RUN apk add --no-cache git bash python3
4747

4848
ENV PNPM_HOME=/root/.local/share/pnpm
49-
ENV PATH=$PNPM_HOME:$PATH
49+
ENV PATH=$PNPM_HOME:/bin/flakybot:usr/local/gcloud/google-cloud-sdk/bin:$PATH

ci/cloudbuild.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ options:
1818
substitutions:
1919
_BUILD_TYPE: "presubmit"
2020
_TEST_TYPE: "system"
21-
_NODE_VERSION: "14"
21+
_NODE_VERSION: "16"
22+
_REPO_OWNER: "googleapis"
23+
_REPO_NAME: "google-cloud-node"
2224

2325
logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node/${_BUILD_TYPE}/${COMMIT_SHA}/${TRIGGER_NAME}'
2426
timeout: 32400s
@@ -47,3 +49,8 @@ steps:
4749
env:
4850
- 'BUILD_TYPE=${_BUILD_TYPE}'
4951
- 'TEST_TYPE=${_TEST_TYPE}'
52+
- 'BUILD_ID=$BUILD_ID'
53+
- 'PROJECT_ID=$PROJECT_ID'
54+
- 'REPO_OWNER=${_REPO_OWNER}'
55+
- 'REPO_NAME=${_REPO_NAME}'
56+
- 'COMMIT_SHA=$COMMIT_SHA'

ci/cloudbuild_with_credentials.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ options:
1818
substitutions:
1919
_BUILD_TYPE: "presubmit"
2020
_TEST_TYPE: "system"
21-
_NODE_VERSION: "14"
21+
_NODE_VERSION: "16"
2222

2323
logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node/${_BUILD_TYPE}/${COMMIT_SHA}/${TRIGGER_NAME}'
2424
timeout: 7200s
@@ -46,3 +46,8 @@ steps:
4646
- 'BUILD_TYPE=${_BUILD_TYPE}'
4747
- 'TEST_TYPE=${_TEST_TYPE}'
4848
- 'GOOGLE_APPLICATION_CREDENTIALS=/workspace/google_application_credentials.json'
49+
- 'BUILD_ID=$BUILD_ID'
50+
- 'PROJECT_ID=$PROJECT_ID'
51+
- 'REPO_OWNER=${_REPO_OWNER}'
52+
- 'REPO_NAME=${_REPO_NAME}'
53+
- 'COMMIT_SHA=$COMMIT_SHA'

ci/export_triggers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
set -eo pipefail
2222

2323
NODE_VERSIONS=(
24-
"14"
24+
"16"
2525
)
2626

2727
echo "change directory to the project root"

ci/import_triggers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
set -eo pipefail
2222

2323
NODE_VERSIONS=(
24-
"14"
24+
"16"
2525
)
2626

2727
echo "change directory to the project root"

ci/run_single_test.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ set -e
1919
export REGION_ID='uc'
2020
export PROJECT_ROOT=$(realpath $(dirname "${BASH_SOURCE[0]}")/..)
2121

22-
tests_without_node12="typeless-sample-bot gapic-node-templating node-bootstrap-container"
23-
2422
if [ -z "${BUILD_TYPE}" ]; then
2523
echo "missing BUILD_TYPE env var"
2624
exit 1
@@ -41,15 +39,9 @@ if [ ${BUILD_TYPE} != "presubmit" ]; then
4139
fi
4240

4341
# Install dependencies
44-
if [[ "${tests_without_node12[*]}" =~ "${PROJECT}" ]] && [[ ${NODE_VERSION} == "12.22.12" ]] && [[ ${TEST_TYPE} != "lint" ]]; then
45-
echo "not running tests for Node 12"
46-
elif [[ ${NODE_VERSION} == "12.22.12" ]]; then
47-
echo "npm install --unsafe-perm --ignore-scripts --engine-strict --only=prod; npm install --unsafe-perm"
48-
npm install --unsafe-perm --ignore-scripts --engine-strict --only=prod; npm install --unsafe-perm
49-
else
50-
echo "pnpm install --ignore-scripts --engine-strict --prod; pnpm install"
51-
pnpm install --ignore-scripts --engine-strict --prod; pnpm install
52-
fi
42+
echo "pnpm install --ignore-scripts --engine-strict --prod; pnpm install"
43+
pnpm install --ignore-scripts --engine-strict --prod; pnpm install
44+
5345

5446
retval=0
5547

@@ -69,11 +61,8 @@ system)
6961
retval=$?
7062
;;
7163
units)
72-
# Skipping Node 12 tests for projects outside of gapic autogenerated libraries that don't need to run on Node 12
73-
if ! [[ "${tests_without_node12[*]}" =~ "${PROJECT}" ]] || [[ ${NODE_VERSION} != "12.22.12" ]]; then
74-
pnpm test
75-
retval=$?
76-
fi
64+
pnpm test
65+
retval=$?
7766
;;
7867
*)
7968
;;

0 commit comments

Comments
 (0)