From 350b884067f155f8903a8a4336c2789205fd021e Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 5 Jul 2022 17:56:05 +0200 Subject: [PATCH] Copy new pipeline stuff from main branch Synced to commit 25883519d971d3670f1e188b608da0d13a5e4a84. --- .dockerignore | 2 + .gitmodules | 6 + bootstrap_sdk_container | 79 +++ build_library/build_image_util.sh | 38 +- build_library/dev_container_util.sh | 16 +- build_library/modify_image_util.sh | 16 +- build_library/prod_image_util.sh | 14 +- build_library/release_util.sh | 121 ++++- build_library/toolchain_util.sh | 4 + build_library/vm_image_util.sh | 65 +-- build_packages | 2 +- build_sdk_container_image | 251 ++++++++++ checkout | 178 +++++++ ci-automation/README.md | 165 +++++++ ci-automation/ci-config.env | 131 +++++ ci-automation/ci_automation_common.sh | 456 ++++++++++++++++++ ci-automation/garbage_collect.sh | 156 ++++++ ci-automation/garbage_collect_cloud.sh | 19 + ci-automation/gpg_setup.sh | 31 ++ ci-automation/image.sh | 113 +++++ ci-automation/image_changes.sh | 122 +++++ ci-automation/packages-tag.sh | 120 +++++ ci-automation/packages.sh | 136 ++++++ ci-automation/push_pkgs.sh | 99 ++++ ci-automation/python-bin/python3 | 6 + ci-automation/release.sh | 405 ++++++++++++++++ ci-automation/sdk_bootstrap.sh | 152 ++++++ ci-automation/sdk_container.sh | 79 +++ ci-automation/tapfile_helper_lib.sh | 308 ++++++++++++ ci-automation/test.sh | 252 ++++++++++ ci-automation/test_update_reruns.sh | 26 + ci-automation/util/Dockerfile.pigz | 4 + ci-automation/util/fetch_image.sh | 73 +++ ci-automation/vendor-testing/aws.sh | 82 ++++ ci-automation/vendor-testing/azure.sh | 90 ++++ ci-automation/vendor-testing/digitalocean.sh | 57 +++ ci-automation/vendor-testing/equinix_metal.sh | 65 +++ ci-automation/vendor-testing/gce.sh | 82 ++++ ci-automation/vendor-testing/qemu.sh | 58 +++ ci-automation/vendor-testing/qemu_uefi.sh | 1 + ci-automation/vendor-testing/qemu_update.sh | 64 +++ ci-automation/vendor-testing/vmware.sh | 68 +++ ci-automation/vendor_test.sh | 391 +++++++++++++++ ci-automation/vms.sh | 139 ++++++ retag-for-jenkins | 40 ++ run_sdk_container | 150 ++++++ .../.repo/manifests/mantle-container | 1 + sdk_container/.repo/manifests/os-release | 6 + sdk_container/.repo/manifests/version.txt | 4 + .../git-override/.git-coreos-overlay | 1 + .../git-override/.git-portage-stable | 1 + sdk_container/git-override/README.md | 5 + sdk_container/src/third_party/coreos-overlay | 1 + sdk_container/src/third_party/portage-stable | 1 + sdk_lib/90_env_keep | 9 + sdk_lib/Dockerfile.lean-arch | 29 ++ sdk_lib/Dockerfile.sdk-build | 17 + sdk_lib/Dockerfile.sdk-import | 58 +++ sdk_lib/Dockerfile.sdk-update | 21 + sdk_lib/sdk_container_common.sh | 291 +++++++++++ sdk_lib/sdk_entry.sh | 73 +++ sdk_lib/sdk_init_selfcontained.sh | 36 ++ settings.env | 8 + update_sdk_container_image | 100 ++++ 64 files changed, 5542 insertions(+), 52 deletions(-) create mode 100644 .dockerignore create mode 100644 .gitmodules create mode 100755 bootstrap_sdk_container create mode 100755 build_sdk_container_image create mode 100755 checkout create mode 100644 ci-automation/README.md create mode 100644 ci-automation/ci-config.env create mode 100644 ci-automation/ci_automation_common.sh create mode 100644 ci-automation/garbage_collect.sh create mode 100755 ci-automation/garbage_collect_cloud.sh create mode 100644 ci-automation/gpg_setup.sh create mode 100644 ci-automation/image.sh create mode 100644 ci-automation/image_changes.sh create mode 100644 ci-automation/packages-tag.sh create mode 100644 ci-automation/packages.sh create mode 100644 ci-automation/push_pkgs.sh create mode 100755 ci-automation/python-bin/python3 create mode 100644 ci-automation/release.sh create mode 100644 ci-automation/sdk_bootstrap.sh create mode 100644 ci-automation/sdk_container.sh create mode 100644 ci-automation/tapfile_helper_lib.sh create mode 100644 ci-automation/test.sh create mode 100755 ci-automation/test_update_reruns.sh create mode 100644 ci-automation/util/Dockerfile.pigz create mode 100755 ci-automation/util/fetch_image.sh create mode 100755 ci-automation/vendor-testing/aws.sh create mode 100755 ci-automation/vendor-testing/azure.sh create mode 100755 ci-automation/vendor-testing/digitalocean.sh create mode 100755 ci-automation/vendor-testing/equinix_metal.sh create mode 100755 ci-automation/vendor-testing/gce.sh create mode 100755 ci-automation/vendor-testing/qemu.sh create mode 120000 ci-automation/vendor-testing/qemu_uefi.sh create mode 100755 ci-automation/vendor-testing/qemu_update.sh create mode 100755 ci-automation/vendor-testing/vmware.sh create mode 100644 ci-automation/vendor_test.sh create mode 100644 ci-automation/vms.sh create mode 100755 retag-for-jenkins create mode 100755 run_sdk_container create mode 100644 sdk_container/.repo/manifests/mantle-container create mode 100644 sdk_container/.repo/manifests/os-release create mode 100644 sdk_container/.repo/manifests/version.txt create mode 100644 sdk_container/git-override/.git-coreos-overlay create mode 100644 sdk_container/git-override/.git-portage-stable create mode 100644 sdk_container/git-override/README.md create mode 160000 sdk_container/src/third_party/coreos-overlay create mode 160000 sdk_container/src/third_party/portage-stable create mode 100644 sdk_lib/90_env_keep create mode 100644 sdk_lib/Dockerfile.lean-arch create mode 100644 sdk_lib/Dockerfile.sdk-build create mode 100644 sdk_lib/Dockerfile.sdk-import create mode 100644 sdk_lib/Dockerfile.sdk-update create mode 100644 sdk_lib/sdk_container_common.sh create mode 100755 sdk_lib/sdk_entry.sh create mode 100755 sdk_lib/sdk_init_selfcontained.sh create mode 100644 settings.env create mode 100755 update_sdk_container_image diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..d7d526ae8e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +__build__ +sdk_container/.cache diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..e026cc5d93 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "sdk_container/src/third_party/coreos-overlay"] + path = sdk_container/src/third_party/coreos-overlay + url = https://github.com/flatcar/coreos-overlay.git +[submodule "sdk_container/src/third_party/portage-stable"] + path = sdk_container/src/third_party/portage-stable + url = https://github.com/flatcar/portage-stable.git diff --git a/bootstrap_sdk_container b/bootstrap_sdk_container new file mode 100755 index 0000000000..6384e69e49 --- /dev/null +++ b/bootstrap_sdk_container @@ -0,0 +1,79 @@ +#!/bin/bash +# +# Copyright (c) 2021 The Flatcar Maintainers. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -eu + +cd $(dirname "$0") +source sdk_lib/sdk_container_common.sh + +seed_version="" +target_version="" + +declare -a cleanup + +# -- + +usage() { + echo " Usage:" + echo " $0 [-x ]" + echo + echo " This script will bootstrap a new SDK tarball using an SDK container." + echo " '$sdk_container_common_versionfile' will be updated to the target version." + echo + echo " - SDK version number (e.g. '3005.0.0') to use for bootstrapping." + echo " The SDK container will be pulled and the tarball" + echo " downloaded if necessary." + echo " - SDK version number (e.g. '3027.0.0') of the new SDK." + echo " -x - For each resource generated during build (container etc.)" + echo " add a cleanup line to