From 74b1e11412e122bc0a271cf55e3cf0cb76d90f49 Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Wed, 27 May 2026 16:13:45 +0530 Subject: [PATCH] ci: allow to override status-go reference --- ci/Jenkinsfile.android | 12 ++++++++++++ ci/Jenkinsfile.ios | 12 ++++++++++++ ci/Jenkinsfile.linux | 13 ++++++++++++- ci/Jenkinsfile.macos | 13 ++++++++++++- ci/Jenkinsfile.windows | 13 ++++++++++++- scripts/override-status-go-ref.sh | 12 ++++++++++++ 6 files changed, 72 insertions(+), 3 deletions(-) create mode 100755 scripts/override-status-go-ref.sh diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 911296a8b3..166f19b877 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -34,6 +34,11 @@ pipeline { description: 'Level of verbosity based on nimbus-build-system setup.', choices: ['0','1','2','3'] ) + string( + name: 'STATUS_GO_REF', + description: 'Override vendor/status-go submodule to this SHA/ref.', + defaultValue: '' + ) } options { @@ -101,6 +106,13 @@ pipeline { } } + stage('Override status-go ref') { + when { expression { params.STATUS_GO_REF?.trim() } } + steps { + sh "./scripts/override-status-go-ref.sh ${params.STATUS_GO_REF}" + } + } + stage('QML Lint Mobile') { steps { sh 'make qml-lint-mobile QTDIR=/opt/qt/${QT_VERSION}/gcc_64 QT_MOBILE_DIR=/opt/qt/${QT_VERSION}/android_arm64_v8a' diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index bd02a42c34..e6aaa73c4a 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -31,6 +31,11 @@ pipeline { description: 'TestFlight build polling interval in seconds.', defaultValue: '30' ) + string( + name: 'STATUS_GO_REF', + description: 'Override vendor/status-go submodule to this SHA/ref.', + defaultValue: '' + ) } options { @@ -106,6 +111,13 @@ pipeline { } } + stage('Override status-go ref') { + when { expression { params.STATUS_GO_REF?.trim() } } + steps { + sh "./scripts/override-status-go-ref.sh ${params.STATUS_GO_REF}" + } + } + stage('status-go') { steps { sh 'make status-go' diff --git a/ci/Jenkinsfile.linux b/ci/Jenkinsfile.linux index 203f6d2d3c..b95cfd083c 100644 --- a/ci/Jenkinsfile.linux +++ b/ci/Jenkinsfile.linux @@ -49,6 +49,11 @@ pipeline { description: 'Build with the simulated (jcardsim) keycard backend (used by keycard e2e tests).', defaultValue: false ) + string( + name: 'STATUS_GO_REF', + description: 'Override vendor/status-go submodule to this SHA/ref.', + defaultValue: '' + ) } options { @@ -93,7 +98,7 @@ pipeline { RELEASE = "${params.RELEASE}" INCLUDE_DEBUG_SYMBOLS = "${params.INCLUDE_DEBUG_SYMBOLS}" VERBOSE = "${params.VERBOSE}" - USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" + USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" /* FIXME: figure out why NIMFLAGS are not respected */ XDG_CACHE_HOME = "${env.WORKSPACE_TMP}" /* Ensure nimcache is not shared between builds. */ @@ -111,6 +116,12 @@ pipeline { sh 'git submodule update --init --recursive' } } + stage('Override status-go ref') { + when { expression { params.STATUS_GO_REF?.trim() } } + steps { + sh "./scripts/override-status-go-ref.sh ${params.STATUS_GO_REF}" + } + } stage('Deps') { steps { sh 'make update' diff --git a/ci/Jenkinsfile.macos b/ci/Jenkinsfile.macos index 1c618781e9..d8b5da7e4f 100644 --- a/ci/Jenkinsfile.macos +++ b/ci/Jenkinsfile.macos @@ -43,6 +43,11 @@ pipeline { description: 'Extra Nim flags. Examples: --verbosity:2 --passL:"-v" --passC:"-v"', defaultValue: '' ) + string( + name: 'STATUS_GO_REF', + description: 'Override vendor/status-go submodule to this SHA/ref.', + defaultValue: '' + ) } options { @@ -94,7 +99,7 @@ pipeline { RELEASE = "${params.RELEASE}" INCLUDE_DEBUG_SYMBOLS = "${params.INCLUDE_DEBUG_SYMBOLS}" VERBOSE = "${params.VERBOSE}" - USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" + USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" /* FIXME: figure out why NIMFLAGS are not respected */ XDG_CACHE_HOME = "${env.WORKSPACE_TMP}/.cache" /* Ensure nimcache is not shared between builds. */ @@ -115,6 +120,12 @@ pipeline { sh 'git submodule update --init --recursive' } } + stage('Override status-go ref') { + when { expression { params.STATUS_GO_REF?.trim() } } + steps { + sh "./scripts/override-status-go-ref.sh ${params.STATUS_GO_REF}" + } + } stage('Deps') { steps { sh 'make update' diff --git a/ci/Jenkinsfile.windows b/ci/Jenkinsfile.windows index 2460d3f19f..6afe0dd05d 100644 --- a/ci/Jenkinsfile.windows +++ b/ci/Jenkinsfile.windows @@ -46,6 +46,11 @@ pipeline { 'https://freetsa.org', ] ) + string( + name: 'STATUS_GO_REF', + description: 'Override vendor/status-go submodule to this SHA/ref.', + defaultValue: '' + ) } options { @@ -96,7 +101,7 @@ pipeline { RELEASE = "${params.RELEASE}" INCLUDE_DEBUG_SYMBOLS = "${params.INCLUDE_DEBUG_SYMBOLS}" VERBOSE = "${params.VERBOSE}" - USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" + USE_SIMULATED_KEYCARD = "${params.USE_SIMULATED_KEYCARD}" /* FIXME: figure out why NIMFLAGS are not respected */ XDG_CACHE_HOME = "${env.WORKSPACE_TMP}/.cache" /* Nim build on Windows puts nimcache in user HOME. */ @@ -118,6 +123,12 @@ pipeline { sh 'git submodule update --init --recursive' } } + stage('Override status-go ref') { + when { expression { params.STATUS_GO_REF?.trim() } } + steps { + sh "./scripts/override-status-go-ref.sh ${params.STATUS_GO_REF}" + } + } stage('Deps') { steps { sh 'make update' diff --git a/scripts/override-status-go-ref.sh b/scripts/override-status-go-ref.sh new file mode 100755 index 0000000000..7c9bff5cb1 --- /dev/null +++ b/scripts/override-status-go-ref.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +# Override vendor/status-go submodule to given ref (SHA, branch, or PR head). +set -euo pipefail + +REF="${1:?Usage: $(basename "$0") }" + +cd vendor/status-go +git fetch --no-tags origin \ + '+refs/heads/*:refs/remotes/origin/*' \ + '+refs/pull/*/head:refs/remotes/origin/pr/*' +git checkout --detach "${REF}" +git submodule update --init --recursive