• Home
  • Raw
  • Download

Lines Matching +full:dry +full:- +full:run

3 # Use of this source code is governed by a BSD-style license that can be
5 set -e
7 readonly GERRIT_URL=https://chromium-review.googlesource.com
10 readonly MIN_COMMIT_COUNT=${MIN_COMMIT_COUNT:-5}
14 # See: https://gerrit-review.googlesource.com/Documentation/dev-rest-api.html
16 curl --silent "$url" | tail -n +2
24 if [[ -z "${cookie_file}" ]]; then
29 curl --silent \
30 --cookie "${cookie_file}" \
31 -X POST \
32 -d "${body}" \
33 -H "Content-Type: application/json" \
35 tail -n +2
40 # See: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change
46 # See: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes
53 …# See: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-related-chan…
58 # Query all open merge commits previously made by crosvm-bot. May be null if
64 owner:crosvm-bot@crosvm-packages.iam.gserviceaccount.com
65 -hashtag:dryrun
69 jq --raw-output 'sort_by(.created)[-1].id'
81 jq --raw-output "[.changes[] | select(.status == \"NEW\")][0].change_id")
99 jq --raw-output -e ".revisions[.current_revision].ref")
100 git fetch -q origin "${change_ref}"
104 # Query all dry run changes. They are identified by the hashtag:dryrun when
111 owner:crosvm-bot@crosvm-packages.iam.gserviceaccount.com
114 jq --raw-output '.[].id'
118 # Abandon all pending dry run commits
128 # See: go/gob-gce
129 if [[ -z $(git config http.cookiefile) ]]; then
130 git clone https://gerrit.googlesource.com/gcompute-tools \
131 "${KOKORO_ARTIFACTS_DIR}/gcompute-tools"
132 "${KOKORO_ARTIFACTS_DIR}/gcompute-tools/git-cookie-authdaemon" --no-fork
136 git config user.email crosvm-bot@crosvm-packages.iam.gserviceaccount.com
143 git fetch -q origin
145 # Set up gerrit Change-Id hook.
146 mkdir -p .git/hooks
147 curl -Lo .git/hooks/commit-msg \
148 https://gerrit-review.googlesource.com/tools/hooks/commit-msg
149 chmod +x .git/hooks/commit-msg
154 "HEAD:refs/for/chromeos%r=crosvm-uprev@google.com,$1"
179 git clean -f -d -x
180 git checkout -f
189 # The oncall may have uploaded a custom merge or cherry-pick on top
199 git checkout -b chromeos "${parent_commit}"
200 git branch --set-upstream-to origin/chromeos chromeos
202 local merge_count=$(git log --oneline --decorate=no --no-color \
203 "${parent_commit}..origin/main" | wc -l)
204 if [ "${merge_count}" -ge "$MIN_COMMIT_COUNT" ]; then
212 echo "Abandoning previous dry runs"
215 echo "Creating dry run merge"
216 git checkout -b dryrun --track origin/chromeos
218 "${KOKORO_ARTIFACTS_DIR}/create_merge" --dry-run-only "origin/main"
219 upload_with_retries "hashtag=dryrun,l=Commit-Queue+1,l=Bot-Commit+1"