-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/pip/server/flask-cors-5.0.0
- Loading branch information
Showing
1,085 changed files
with
101,690 additions
and
325,046 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,50 @@ | ||
name: Release branch checks | ||
|
||
on: | ||
pull_request: | ||
branches: [ "customdc_stable" ] | ||
# Required for merge queue to work: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions | ||
merge_group: | ||
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. | ||
# Exclude merge commits only if this is the final run in the merge queue. | ||
# This way the only merge commits that end up in the final commit history | ||
# are the ones added by GitHub when merging PRs. | ||
if [[ ${{ github.event_name }} == 'merge_group' ]]; then | ||
MISSING_COMMITS=$(git log --pretty="%H - %s" --no-merges $MASTER_BRANCH..HEAD --) | ||
else | ||
MISSING_COMMITS=$(git log --pretty="%H - %s" $MASTER_BRANCH..HEAD --) | ||
fi | ||
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
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,79 @@ | ||
# 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. | ||
|
||
################################################################################ | ||
|
||
# NOTE: Logs-based metrics for this build are dependent on step numbers. | ||
# For this reason, please either add new steps at the end of the file OR | ||
# update ALL metrics when adding/removing steps. | ||
|
||
################################################################################ | ||
|
||
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 | ||
set -o pipefail | ||
./scripts/get_commits_label.sh | tail -1 >"$_IMAGE_LABEL_PATH" | ||
waitFor: ["init-submods"] | ||
|
||
# Step 2: 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 3: 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" |
Oops, something went wrong.