forked from datacommonsorg/website
-
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.
Merge branch 'datacommonsorg:master' into master
- Loading branch information
Showing
802 changed files
with
42,414 additions
and
320,755 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
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,40 @@ | ||
name: Release branch checks | ||
|
||
on: | ||
pull_request: | ||
branches: [ "customdc_stable" ] | ||
|
||
jobs: | ||
verify_all_commits_are_already_in_master: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# Fetch all history for accurate comparison | ||
fetch-depth: 0 | ||
# Check out the PR branch | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
|
||
- name: Verify that all commits are already in the master branch | ||
run: | | ||
git remote add dc https://github.com/datacommonsorg/website.git | ||
git fetch dc | ||
MASTER_BRANCH="dc/master" | ||
# Get the list of commits in the source branch that are not in the master branch | ||
MISSING_COMMITS=$(git log --pretty="%H - %s" $MASTER_BRANCH..HEAD --) | ||
if [[ -n "$MISSING_COMMITS" ]]; then | ||
echo "" | ||
echo "ERROR: The following commits are not present in $MASTER_BRANCH:" | ||
echo "" | ||
echo "$MISSING_COMMITS" | ||
echo "" | ||
echo "PRs to release branches should only contain commits that are already in master." | ||
echo "To fix this PR, reset its branch locally to a commit at or behind https://github.com/datacommonsorg/website/commits/master/ and then force-push it." | ||
echo "Note that a release branch PR should be based on master and not the previous version of the release branch, which contains merge commits." | ||
exit 1 | ||
fi | ||
echo "All commits are present in $MASTER_BRANCH" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Updates stable-tagged Docker images for custom DC. | ||
# Assumes the stable branch is already checked out, which it should be | ||
# if this is triggered on push to branch for the stable branch. | ||
|
||
steps: | ||
# Step 0: Initialize submods | ||
- id: init-submods | ||
name: gcr.io/cloud-builders/git | ||
entrypoint: bash | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
git submodule update --init --recursive | ||
waitFor: ["-"] | ||
|
||
# Step 1: Get a label that combines commit hashes. | ||
- id: get-label | ||
name: gcr.io/cloud-builders/git | ||
entrypoint: bash | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
./scripts/get_commits_label.sh | tail -1 >"$_IMAGE_LABEL_PATH" | ||
waitFor: ["init-submods"] | ||
|
||
# Step 1: Services container | ||
- id: build-and-tag-stable-services | ||
name: gcr.io/datcom-ci/deploy-tool | ||
entrypoint: bash | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
image_label=$(cat "$_IMAGE_LABEL_PATH") | ||
./scripts/build_cdc_services_and_tag_stable.sh $image_label | ||
waitFor: ["get-label"] | ||
|
||
# Step 2: Data management container | ||
- id: build-and-tag-stable-data | ||
name: gcr.io/datcom-ci/deploy-tool | ||
entrypoint: bash | ||
args: | ||
- -c | ||
- | | ||
set -e | ||
image_label=$(cat "$_IMAGE_LABEL_PATH") | ||
./scripts/build_cdc_data_and_tag_stable.sh $image_label | ||
waitFor: ["get-label"] | ||
|
||
substitutions: | ||
_IMAGE_LABEL_PATH: "/workspace/tmp_cdc_stable_image_label.txt" | ||
|
||
options: | ||
machineType: "E2_HIGHCPU_32" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
steps: | ||
- id: website_sanity | ||
name: gcr.io/datcom-ci/webdriver-chrome:2024-06-05 | ||
entrypoint: /bin/bash | ||
args: | ||
- -c | ||
- | | ||
./run_website_sanity.sh $_WEBSITE_DOMAIN | ||
substitutions: | ||
_WEBSITE_DOMAIN: datacommons.org | ||
|
||
timeout: 14400s | ||
|
||
options: | ||
machineType: "E2_HIGHCPU_32" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ if [[ $NODEJS_API_ROOT != "" ]]; then | |
failure_email="failure_email.json" | ||
python3 differ.py -m diff -e "$TESTING_ENV" -t "$date_str" -g "$TESTING_ENV/$date_str/nodejs_query" -f "$failure_email" | ||
if [[ -e "$failure_email" ]]; then | ||
python3 send_email.py --recipient="datacommons+[email protected]" --email_content="$failure_email" | ||
python3 send_email.py --recipient="datacommons-alerts+tests@google.com" --email_content="$failure_email" | ||
fi | ||
echo "Finished the nodejs Test." | ||
echo "=====================================================================================" | ||
|
@@ -54,14 +54,14 @@ fi | |
|
||
# Run sanity tests if ENABLE_SANITY is "true" | ||
if [[ $ENABLE_SANITY == "true" ]]; then | ||
echo "=====================================================================================" | ||
echo "Starting sanity tests" | ||
echo "=====================================================================================" | ||
python3 sanity.py --mode=home --url="$WEB_API_ROOT" | ||
gsutil cp ./output/*.csv gs://datcom-website-periodic-testing/$TESTING_ENV/$date_str/sanity/ | ||
rm ./output/*.csv | ||
echo "Finished the sanity tests." | ||
echo "=====================================================================================" | ||
echo "=====================================================================================" | ||
echo "Starting sanity tests" | ||
echo "=====================================================================================" | ||
python3 sanity.py --mode=home --url="$WEB_API_ROOT" | ||
gsutil cp ./output/*.csv gs://datcom-website-periodic-testing/$TESTING_ENV/$date_str/sanity/ | ||
rm ./output/*.csv | ||
echo "Finished the sanity tests." | ||
echo "=====================================================================================" | ||
else | ||
echo "=====================================================================================" | ||
echo "Sanity tests disabled." | ||
|
@@ -92,8 +92,7 @@ if [[ $ENABLE_ADVERSARIAL == "true" ]]; then | |
mkdir -p input | ||
gsutil cp gs://datcom-website-adversarial/input/frequent/* input/ | ||
dc_list=("main" "sdg") | ||
for dc in "${dc_list[@]}" | ||
do | ||
for dc in "${dc_list[@]}"; do | ||
echo "=====================================================================================" | ||
echo "Executing the Adversarial Test against the $dc index, detection and fulfillment." | ||
python3 adversarial.py --mode=run_all --dc="$dc" --base_url="$WEB_API_ROOT" | ||
|
Oops, something went wrong.