OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to archive build results. Used by the buildbots. | 7 # Script to archive build results. Used by the buildbots. |
8 | 8 |
9 # --- BEGIN COMMON.SH BOILERPLATE --- | 9 # --- BEGIN COMMON.SH BOILERPLATE --- |
10 # Load common CrOS utilities. Inside the chroot this file is installed in | 10 # Load common CrOS utilities. Inside the chroot this file is installed in |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ | 272 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ |
273 --output_tag "${HWQUAL_NAME}" | 273 --output_tag "${HWQUAL_NAME}" |
274 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ | 274 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ |
275 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" | 275 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" |
276 fi | 276 fi |
277 | 277 |
278 | 278 |
279 if [ $FLAGS_prebuilt_upload -eq $FLAGS_TRUE ]; then | 279 if [ $FLAGS_prebuilt_upload -eq $FLAGS_TRUE ]; then |
280 # Construct prebuilt upload command. | 280 # Construct prebuilt upload command. |
281 # This will upload prebuilt packages to Google Storage. | 281 # This will upload prebuilt packages to Google Storage. |
282 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" | 282 prebuilt_cmd="${GCLIENT_ROOT}/chromite/buildbot/prebuilt.py" |
283 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" | 283 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" |
284 prebuilt_cmd="$prebuilt_cmd -p ${GCLIENT_ROOT} -b ${FLAGS_board}" | 284 prebuilt_cmd="$prebuilt_cmd -p ${GCLIENT_ROOT} -b ${FLAGS_board}" |
285 | 285 |
286 if [ "${FLAGS_board}" == "x86-generic" ] | 286 if [ "${FLAGS_board}" == "x86-generic" ] |
287 then | 287 then |
288 prebuilt_cmd="$prebuilt_cmd --sync-host" | 288 prebuilt_cmd="$prebuilt_cmd --sync-host" |
289 fi | 289 fi |
290 | 290 |
291 echo "Running $prebuilt_cmd" | 291 echo "Running $prebuilt_cmd" |
292 $prebuilt_cmd | 292 $prebuilt_cmd |
(...skipping 24 matching lines...) Expand all Loading... |
317 # Purge old builds if necessary | 317 # Purge old builds if necessary |
318 if [ $FLAGS_keep_max -gt 0 ]; then | 318 if [ $FLAGS_keep_max -gt 0 ]; then |
319 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 319 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
320 cd "$FLAGS_to" | 320 cd "$FLAGS_to" |
321 # +2 because line numbers start at 1 and need to skip LATEST file | 321 # +2 because line numbers start at 1 and need to skip LATEST file |
322 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 322 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
323 cd - | 323 cd - |
324 fi | 324 fi |
325 | 325 |
326 echo "Done." | 326 echo "Done." |
OLD | NEW |