From 9421ca07994a854c13f56418b5836b52cae94724 Mon Sep 17 00:00:00 2001 From: Jonas Termansen Date: Tue, 6 Jun 2023 14:26:45 +0000 Subject: [PATCH] Delete old debianpackage-linux builder. This has been replaced by debian-x64 via its own recipe. Bug: b/283763308 Change-Id: I1ae5950407ba7a4caae7467b1b1e7b6d3d6fb781 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304882 Commit-Queue: Jonas Termansen Reviewed-by: William Hesse --- tools/bots/test_matrix.json | 20 ------- .../upload_debian_packages.py | 58 ------------------- 2 files changed, 78 deletions(-) delete mode 100755 tools/linux_dist_support/upload_debian_packages.py diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index 07d605846ae..30e4a5c7c37 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -2746,26 +2746,6 @@ } ] }, - { - "builders": [ - "debianpackage-linux" - ], - "meta": { - "description": "This configuration is used by the debianpackage-builder." - }, - "steps": [ - { - "name": "build debian package", - "script": "tools/linux_dist_support/run_debian_build.sh", - "arguments": [] - }, - { - "name": "upload debian packages", - "script": "tools/linux_dist_support/upload_debian_packages.py", - "arguments": [] - } - ] - }, { "builders": [ "analyzer-linux-release", diff --git a/tools/linux_dist_support/upload_debian_packages.py b/tools/linux_dist_support/upload_debian_packages.py deleted file mode 100755 index 1c893f759b9..00000000000 --- a/tools/linux_dist_support/upload_debian_packages.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file -# for details. All rights reserved. Use of this source code is governed by a -# BSD-style license that can be found in the LICENSE file. - -import os -import sys -sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'bots')) -import bot_utils - -utils = bot_utils.GetUtils() - -HOST_OS = utils.GuessOS() - - -def ArchiveArtifacts(tarfile, builddir, channel, subdir): - namer = bot_utils.GCSNamer(channel=channel) - gsutil = bot_utils.GSUtil() - # Archive the src tar to the src dir - remote_tarfile = '/'.join( - [namer.src_directory(subdir), - os.path.basename(tarfile)]) - gsutil.upload(tarfile, remote_tarfile) - # Archive all files except the tar file to the linux packages dir - for entry in os.listdir(builddir): - full_path = os.path.join(builddir, entry) - # We expect a flat structure, not subdirectories - assert (os.path.isfile(full_path)) - if full_path != tarfile: - package_dir = namer.linux_packages_directory(subdir) - remote_file = '/'.join([package_dir, os.path.basename(entry)]) - gsutil.upload(full_path, remote_file) - - -if __name__ == '__main__': - bot_name = os.environ.get('BUILDBOT_BUILDERNAME') - channel = bot_utils.GetChannelFromName(bot_name) - if os.environ.get('DART_EXPERIMENTAL_BUILD') == '1': - print('Not uploading artifacts on experimental builds') - elif channel == bot_utils.Channel.TRY: - print('Not uploading artifacts on try builds') - elif channel == bot_utils.Channel.BLEEDING_EDGE: - print('Not uploading artifacts on bleeding edge') - else: - builddir = os.path.join(bot_utils.DART_DIR, utils.GetBuildDir(HOST_OS), - 'src_and_installation') - version = utils.GetVersion() - tarfilename = 'dart-%s.tar.gz' % version - tarfile = os.path.join(builddir, tarfilename) - commit = utils.GetGitRevision() - is_new_version = bot_utils.run( - ['git', 'diff', '--name-only', 'HEAD~1', 'tools/VERSION'])[0] != '' - subdirs = [f'hash/{commit}'] - if is_new_version: - subdirs.extend([version, 'latest']) - for subdir in subdirs: - ArchiveArtifacts(tarfile, builddir, channel, subdir)