From fe353a8abfbb0c354067cc32ba229a6dfe8d46cb Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 17 Sep 2024 08:59:07 +0200 Subject: [PATCH 1/4] fix debian branch name logic --- buildkite/scripts/export-git-env-vars.sh | 8 ++++++-- scripts/export-git-env-vars.sh | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/buildkite/scripts/export-git-env-vars.sh b/buildkite/scripts/export-git-env-vars.sh index dfe4e0dd9fdd..08f601d5b178 100755 --- a/buildkite/scripts/export-git-env-vars.sh +++ b/buildkite/scripts/export-git-env-vars.sh @@ -24,8 +24,12 @@ export BUILD_NUM=${BUILDKITE_BUILD_NUM} export BUILD_URL=${BUILDKITE_BUILD_URL} set -u -export MINA_DEB_CODENAME=${MINA_DEB_CODENAME:=bullseye} -[[ -n "$BUILDKITE_BRANCH" ]] && export GITBRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's!/!-!g; s!_!-!g; s!#!-!g') || export GITBRANCH=$(git name-rev --name-only $GITHASH | sed "s/remotes\/origin\///g" | sed 's!/!-!g; s!_!-!g; s!#!-!g' ) +if [[ -n "$BUILDKITE_BRANCH" ]]; then + export GITBRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's!/!-!g; s!_!-!g; s!#!-!g') +else + export GITBRANCH=$(git name-rev --name-only $GITHASH | sed "s/remotes\/origin\///g" | sed 's!/!-!g; s!_!-!g; s!#!-!g' ) +fi + export RELEASE=unstable diff --git a/scripts/export-git-env-vars.sh b/scripts/export-git-env-vars.sh index 373e2c57d5a6..c9f09e101e50 100755 --- a/scripts/export-git-env-vars.sh +++ b/scripts/export-git-env-vars.sh @@ -22,7 +22,11 @@ function find_most_recent_numeric_tag() { export GITHASH=$(git rev-parse --short=7 HEAD) export THIS_COMMIT_TAG=$(git tag --points-at HEAD) -[[ -n "$BRANCH_NAME" ]] && export GITBRANCH=$(echo "$BRANCH_NAME" | sed 's!/!-!g; s!_!-!g; s!#!-!g') || export GITBRANCH=$(git name-rev --name-only $GITHASH | sed "s/remotes\/origin\///g" | sed 's!/!-!g; s!_!-!g; s!#!-!g' ) +if [[ -n "$BRANCH_NAME" ]]; then + export GITBRANCH=$(echo "$BRANCH_NAME" | sed 's!/!-!g; s!_!-!g; s!#!-!g') +else + export GITBRANCH=$(git name-rev --name-only $GITHASH | sed "s/remotes\/origin\///g" | sed 's!/!-!g; s!_!-!g; s!#!-!g' ) +fi export GITTAG=$(find_most_recent_numeric_tag HEAD) From b326ecdbaeb9a373c7033f4d58ba20f14c6c01e5 Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 17 Sep 2024 10:28:05 +0200 Subject: [PATCH 2/4] correct BatchTxn deps and revert removal of MINA_DEB_CODENAME --- buildkite/scripts/export-git-env-vars.sh | 1 + buildkite/src/Command/MinaArtifact.dhall | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/buildkite/scripts/export-git-env-vars.sh b/buildkite/scripts/export-git-env-vars.sh index 08f601d5b178..cdbcf3695327 100755 --- a/buildkite/scripts/export-git-env-vars.sh +++ b/buildkite/scripts/export-git-env-vars.sh @@ -24,6 +24,7 @@ export BUILD_NUM=${BUILDKITE_BUILD_NUM} export BUILD_URL=${BUILDKITE_BUILD_URL} set -u +export MINA_DEB_CODENAME=${MINA_DEB_CODENAME:=bullseye} if [[ -n "$BUILDKITE_BRANCH" ]]; then export GITBRANCH=$(echo "$BUILDKITE_BRANCH" | sed 's!/!-!g; s!_!-!g; s!#!-!g') else diff --git a/buildkite/src/Command/MinaArtifact.dhall b/buildkite/src/Command/MinaArtifact.dhall index 176e8380ae83..1af0da3f8658 100644 --- a/buildkite/src/Command/MinaArtifact.dhall +++ b/buildkite/src/Command/MinaArtifact.dhall @@ -180,7 +180,7 @@ let docker_step [ DockerImage.ReleaseSpec::{ , deps = deps , service = Artifacts.Type.BatchTxn - , network = Network.lowerName Network.Type.Devnet + , network = Network.lowerName spec.network , deb_codename = spec.debVersion , deb_profile = spec.profile , build_flags = spec.buildFlags From eb9b3b185e721539cd9176758cef4aa76f37db68 Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 17 Sep 2024 12:44:00 +0200 Subject: [PATCH 3/4] rm /etc/apt/sources.list.d/hashicorp.list before creating it once again --- buildkite/scripts/run-test-executive-local.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildkite/scripts/run-test-executive-local.sh b/buildkite/scripts/run-test-executive-local.sh index 087ad7cc1e28..2d99b95c39ca 100755 --- a/buildkite/scripts/run-test-executive-local.sh +++ b/buildkite/scripts/run-test-executive-local.sh @@ -37,6 +37,8 @@ fi # Don't prompt for answers during apt-get install export DEBIAN_FRONTEND=noninteractive +rm /etc/apt/sources.list.d/hashicorp.list + apt-get update apt-get install -y git apt-transport-https ca-certificates tzdata curl From 3322ebbe7d163e90dcce9715b552db867081f537 Mon Sep 17 00:00:00 2001 From: dkijania Date: Tue, 17 Sep 2024 19:03:40 +0200 Subject: [PATCH 4/4] do not bother checking if hashicorp.list file exists --- buildkite/scripts/run-test-executive-local.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildkite/scripts/run-test-executive-local.sh b/buildkite/scripts/run-test-executive-local.sh index 2d99b95c39ca..8512b93df0fb 100755 --- a/buildkite/scripts/run-test-executive-local.sh +++ b/buildkite/scripts/run-test-executive-local.sh @@ -37,7 +37,7 @@ fi # Don't prompt for answers during apt-get install export DEBIAN_FRONTEND=noninteractive -rm /etc/apt/sources.list.d/hashicorp.list +rm -f /etc/apt/sources.list.d/hashicorp.list apt-get update apt-get install -y git apt-transport-https ca-certificates tzdata curl