From 726760e617100b72c07b50cd8569515d48ed0d73 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Thu, 17 Jul 2025 12:58:11 +0200 Subject: [PATCH 1/2] packages: remove duplicate upgrade test debian --- .gitlab/ci/pipelines/before_merging.yml | 1 - .../ci/pipelines/debian_repository_full.yml | 28 ----- .../pipelines/debian_repository_partial.yml | 14 --- .../debian_repository_partial_auto.yml | 14 --- .gitlab/ci/pipelines/merge_train.yml | 1 - ci/bin/common.ml | 1 - ci/bin/debian_repository.ml | 24 ---- docs/introduction/upgrade-bin-deb.sh | 116 ------------------ 8 files changed, 199 deletions(-) delete mode 100755 docs/introduction/upgrade-bin-deb.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index a92f42454f7b..a01cd0cd231f 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -1538,7 +1538,6 @@ trigger:debian_repository_partial_auto: - .gitlab/ci/pipelines/debian_repository_partial_auto.yml - debian-deps-build.Dockerfile - docs/introduction/install-bin-deb.sh - - docs/introduction/upgrade-bin-deb.sh - manifest/**/*.ml* - scripts/ci/build-debian-packages.sh - scripts/ci/build-debian-packages_current.sh diff --git a/.gitlab/ci/pipelines/debian_repository_full.yml b/.gitlab/ci/pipelines/debian_repository_full.yml index fa42be1724ad..44f2fe4e84ac 100644 --- a/.gitlab/ci/pipelines/debian_repository_full.yml +++ b/.gitlab/ci/pipelines/debian_repository_full.yml @@ -388,20 +388,6 @@ oc.install_bin_debian_bookworm: - stuck_or_timeout_failure - runner_system_failure -oc.upgrade_bin_debian_bookworm: - image: debian:bookworm - stage: publishing_tests - tags: - - gcp - needs: - - apt_repo_debian - dependencies: [] - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - script: - - ./docs/introduction/upgrade-bin-deb.sh debian bookworm - oc.install_bin_debian_bookworm_systemd_test: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 stage: publishing_tests @@ -598,20 +584,6 @@ oc.install_bin_ubunty_noble: - stuck_or_timeout_failure - runner_system_failure -oc.upgrade_bin_ubuntu_jammy: - image: public.ecr.aws/lts/ubuntu:22.04_stable - stage: publishing_tests - tags: - - gcp - needs: - - apt_repo_ubuntu - dependencies: [] - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - script: - - ./docs/introduction/upgrade-bin-deb.sh ubuntu jammy - oc.install_bin_ubuntu_noble_systemd: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 stage: publishing_tests diff --git a/.gitlab/ci/pipelines/debian_repository_partial.yml b/.gitlab/ci/pipelines/debian_repository_partial.yml index b16defd2a3bc..649d3fda47b5 100644 --- a/.gitlab/ci/pipelines/debian_repository_partial.yml +++ b/.gitlab/ci/pipelines/debian_repository_partial.yml @@ -235,20 +235,6 @@ oc.install_bin_debian_bookworm: - stuck_or_timeout_failure - runner_system_failure -oc.upgrade_bin_debian_bookworm: - image: debian:bookworm - stage: publishing_tests - tags: - - gcp - needs: - - apt_repo_debian - dependencies: [] - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - script: - - ./docs/introduction/upgrade-bin-deb.sh debian bookworm - oc.install_bin_debian_bookworm_systemd_test: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 stage: publishing_tests diff --git a/.gitlab/ci/pipelines/debian_repository_partial_auto.yml b/.gitlab/ci/pipelines/debian_repository_partial_auto.yml index b16defd2a3bc..649d3fda47b5 100644 --- a/.gitlab/ci/pipelines/debian_repository_partial_auto.yml +++ b/.gitlab/ci/pipelines/debian_repository_partial_auto.yml @@ -235,20 +235,6 @@ oc.install_bin_debian_bookworm: - stuck_or_timeout_failure - runner_system_failure -oc.upgrade_bin_debian_bookworm: - image: debian:bookworm - stage: publishing_tests - tags: - - gcp - needs: - - apt_repo_debian - dependencies: [] - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - script: - - ./docs/introduction/upgrade-bin-deb.sh debian bookworm - oc.install_bin_debian_bookworm_systemd_test: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 stage: publishing_tests diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index 6c8f289aeb2e..f0939aecabf2 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -1537,7 +1537,6 @@ trigger:debian_repository_partial_auto: - .gitlab/ci/pipelines/debian_repository_partial_auto.yml - debian-deps-build.Dockerfile - docs/introduction/install-bin-deb.sh - - docs/introduction/upgrade-bin-deb.sh - manifest/**/*.ml* - scripts/ci/build-debian-packages.sh - scripts/ci/build-debian-packages_current.sh diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 06775085b5ad..3ae44388297b 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -360,7 +360,6 @@ let changeset_debian_packages = "scripts/ci/prepare-apt-repo.sh"; "scripts/ci/create_debian_repo.sh"; "docs/introduction/install-bin-deb.sh"; - "docs/introduction/upgrade-bin-deb.sh"; "scripts/version.sh"; "manifest/**/*.ml*"; ]) diff --git a/ci/bin/debian_repository.ml b/ci/bin/debian_repository.ml index acb9e1949f56..37627d04dee5 100644 --- a/ci/bin/debian_repository.ml +++ b/ci/bin/debian_repository.ml @@ -334,18 +334,6 @@ let jobs pipeline_type = ]) script in - (* These test the upgrade from previous released version *) - let job_upgrade_bin ~__POS__ ~name ~dependencies ~image ?allow_failure script - = - job - ?allow_failure - ~__POS__ - ~name - ~image - ~dependencies - ~stage:Stages.publishing_tests - script - in let test_ubuntu_packages_jobs = (* in merge pipelines we tests only debian. ubuntu packages are built and tested in the scheduled pipelines*) @@ -370,12 +358,6 @@ let jobs pipeline_type = ~variables:[("PREFIX", "")] ~image:Images.ubuntu_noble ["./docs/introduction/install-bin-deb.sh ubuntu noble"]; - job_upgrade_bin - ~__POS__ - ~name:"oc.upgrade_bin_ubuntu_jammy" - ~dependencies:(Dependent [Job job_apt_repo_ubuntu]) - ~image:Images.ubuntu_jammy - ["./docs/introduction/upgrade-bin-deb.sh ubuntu jammy"]; job_install_systemd_bin ~__POS__ ~name:"oc.install_bin_ubuntu_noble_systemd" @@ -431,12 +413,6 @@ let jobs pipeline_type = ~variables:[("PREFIX", "")] ~image:Images.debian_bookworm ["./docs/introduction/install-bin-deb.sh debian bookworm"]; - job_upgrade_bin - ~__POS__ - ~name:"oc.upgrade_bin_debian_bookworm" - ~dependencies:(Dependent [Job job_apt_repo_debian]) - ~image:Images.debian_bookworm - ["./docs/introduction/upgrade-bin-deb.sh debian bookworm"]; job_install_systemd_bin ~__POS__ ~name:"oc.install_bin_debian_bookworm_systemd_test" diff --git a/docs/introduction/upgrade-bin-deb.sh b/docs/introduction/upgrade-bin-deb.sh deleted file mode 100755 index 9ac54a66ea7f..000000000000 --- a/docs/introduction/upgrade-bin-deb.sh +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh - -distribution=$1 -distroname=$1 -release=$2 - -# check if it's a real or a fake release or we are testing -# the packages in a branch -if [ -n "${CI_COMMIT_TAG:-}" ]; then - # shellcheck source=./scripts/ci/octez-release.sh - . ./scripts/ci/octez-release.sh -fi - -# If it's a protected branch the value of $bucket will -# be set accordingly but the CI. -bucket="$GCP_LINUX_PACKAGES_BUCKET" - -# This logic must be kept in sync with the script in -# ./scripts/ci/create_debian_repo.sh - -# if it's a release tag, then it can be a release candidate -# or a final release. This can be on a protected branch or not. -if [ -n "${gitlab_release_no_v:-}" ]; then - # It a release tag, this can be either final or release - # candidate - if [ -n "${gitlab_release_rc_version}" ]; then - # Release candidate - distribution="RC/$distribution" - fi - # else we just that $distribution as it is -else - # Not a release tag. This is strictly for testing. - if [ "${CI_COMMIT_REF_PROTECTED:-false}" = true ]; then - # this is not a release, but it's a protected branch. - # We allow this only for the master branch. - if [ "$CI_COMMIT_REF_NAME" = "master" ]; then - distribution="master/$distribution" - else - if [ -n "${CI_COMMIT_TAG}" ]; then - distribution="${CI_COMMIT_TAG}/$distribution" - else - echo "Cannot test a repository for a protected branch that is not associated to a tag or master" - exit 1 - fi - fi - else - # Not a release, not a protected branch - if [ "$CI_COMMIT_REF_NAME" = "RC" ]; then - echo "Cannot test a repository for a branch named 'RC'" - exit 1 - else - distribution="$CI_COMMIT_REF_NAME/$distribution" - fi - fi -fi - -# For the upgrade script in the CI, we do not want debconf to ask questions -export DEBIAN_FRONTEND=noninteractive - -set -e -set -x - -# [install prerequisites] -apt-get update -apt-get install -y sudo gpg curl apt-utils debconf-utils jq - -# [preseed debconf] -echo "debconf debconf/frontend select Noninteractive" | sudo debconf-set-selections - -# [add current repository] -curl "https://packages.nomadic-labs.com/$distroname/octez.asc" | sudo gpg --dearmor -o /etc/apt/keyrings/octez.gpg - -REPO="deb [signed-by=/etc/apt/keyrings/octez.gpg] https://packages.nomadic-labs.com/$distroname $release main" -echo "$REPO" | sudo tee /etc/apt/sources.list.d/octez-current.list -sudo apt-get update - -# [ preeseed octez ] -# preseed octez-node for debconf. Notice we set purge_warning to yes, -# to make the `autopurge` pass and remove all the node data at the end of this -# script. -cat << EOF > preseed.cfg -octez-node octez-node/configure boolean true -octez-node octez-node/history-mode string full -octez-node octez-node/network string mainnet -octez-node octez-node/purge_warning boolean true -octez-node octez-node/snapshot-import boolean false -octez-node octez-node/snapshot-no-check boolean true -debconf debconf/frontend select Noninteractive -EOF -# preseed the package -sudo debconf-set-selections preseed.cfg - -# check the package configuration -sudo debconf-get-selections | grep octez - -# [install tezos] -sudo apt-get install -y octez-baker - -# [add next repository] -REPO="deb [signed-by=/etc/apt/keyrings/octez-dev.gpg] https://$bucket.storage.googleapis.com/$distribution $release main" -curl "https://$bucket.storage.googleapis.com/$distroname/octez.asc" | sudo gpg --dearmor -o /etc/apt/keyrings/octez-dev.gpg -echo "$REPO" | sudo tee /etc/apt/sources.list.d/octez-next.list -sudo apt-get update - -# [upgrade octez] -sudo apt-get upgrade -y octez-node -sudo apt-get upgrade -y octez-client octez-baker - -# [ check configuration after the upgrade ] -# we check the debconf parameters -sudo debconf-get-selections | grep octez -# we check if the configuration of octez did not change -sudo su tezos -c "octez-node config show" - -# [check executables version] -dpkg -l octez-\* -- GitLab From 403be79f82039499f3b936e6a03a7273c693b351 Mon Sep 17 00:00:00 2001 From: Pietro Abate Date: Mon, 21 Jul 2025 13:45:39 +0200 Subject: [PATCH 2/2] packages: add upgrade systemd test for jammy --- .../ci/pipelines/debian_repository_full.yml | 33 +++++++++++++++++++ ci/bin/debian_repository.ml | 19 +++++++++++ 2 files changed, 52 insertions(+) diff --git a/.gitlab/ci/pipelines/debian_repository_full.yml b/.gitlab/ci/pipelines/debian_repository_full.yml index 44f2fe4e84ac..bc307e504a8e 100644 --- a/.gitlab/ci/pipelines/debian_repository_full.yml +++ b/.gitlab/ci/pipelines/debian_repository_full.yml @@ -617,6 +617,39 @@ oc.install_bin_ubuntu_noble_systemd: - stuck_or_timeout_failure - runner_system_failure +oc.upgrade_bin_ubuntu_jammy_systemd_test: + image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 + stage: publishing_tests + tags: + - gcp + needs: + - oc.docker-systemd_tests_ubuntu + - apt_repo_ubuntu + dependencies: [] + allow_failure: true + timeout: 60 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/docker_initialize.sh + script: + - ./scripts/ci/systemd-packages-test.sh scripts/packaging/tests/deb/upgrade-systemd-test.sh + images/packages/debian-systemd-tests.Dockerfile + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_VERSION: 24.0.7 + FLAVOUR: systemd-tests + DEP_IMAGE: ${GCP_REGISTRY}/$CI_PROJECT_NAMESPACE/tezos/$FLAVOUR-$DISTRIBUTION-$RELEASE + DEP_IMAGE_PROTECTED: ${GCP_PROTECTED_REGISTRY}/tezos/tezos/$FLAVOUR-$DISTRIBUTION-$RELEASE + PREFIX: "" + DISTRIBUTION: ubuntu + RELEASE: jammy + retry: + max: 2 + when: + - stuck_or_timeout_failure + - runner_system_failure + oc.upgrade_bin_ubuntu_noble_systemd_test: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.13.0 stage: publishing_tests diff --git a/ci/bin/debian_repository.ml b/ci/bin/debian_repository.ml index 37627d04dee5..61e367e997ba 100644 --- a/ci/bin/debian_repository.ml +++ b/ci/bin/debian_repository.ml @@ -377,6 +377,25 @@ let jobs pipeline_type = scripts/packaging/tests/deb/install-bin-deb.sh \ images/packages/debian-systemd-tests.Dockerfile"; ]; + job_install_systemd_bin + ~__POS__ + ~name:"oc.upgrade_bin_ubuntu_jammy_systemd_test" + ~allow_failure:Yes + ~dependencies: + (Dependent + [ + Job job_docker_systemd_test_ubuntu_dependencies; + Job job_apt_repo_ubuntu; + ]) + ~variables: + (variables + ~kind:"systemd-tests" + [("PREFIX", ""); ("DISTRIBUTION", "ubuntu"); ("RELEASE", "jammy")]) + [ + "./scripts/ci/systemd-packages-test.sh \ + scripts/packaging/tests/deb/upgrade-systemd-test.sh \ + images/packages/debian-systemd-tests.Dockerfile"; + ]; job_install_systemd_bin ~__POS__ ~name:"oc.upgrade_bin_ubuntu_noble_systemd_test" -- GitLab