From 20b9d76adf8d29c8d023edc3454ec7c4e7fded5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Mon, 28 Oct 2024 15:52:04 +0200 Subject: [PATCH] Default qtqa branch to dev if no matching branch found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes tqtc/ branches to use the public branches. Amends 2a0e89981a52633c497f62bad0c7d26c466493cb Task-number: QTBUG-124453 Task-number: QTBUG-125211 Task-number: QTBUG-125569 Task-number: QTQAINFRA-3935 Change-Id: I1098165c3122befabc503d38c46d476920d835a2 Reviewed-by: Alexandru Croitor Reviewed-by: Simo Fält (cherry picked from commit 701f688d9909c45f37d497746a6d6d893be4a5f6) Reviewed-by: Qt Cherry-pick Bot --- coin/instructions/run_license_check.yaml | 25 +++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/coin/instructions/run_license_check.yaml b/coin/instructions/run_license_check.yaml index cd0e48b9314..c7bae237aa7 100644 --- a/coin/instructions/run_license_check.yaml +++ b/coin/instructions/run_license_check.yaml @@ -2,14 +2,29 @@ type: Group instructions: - type: ChangeDirectory directory: "{{.AgentWorkingDir}}" - - type: InstallSourceArchive + - type: EnvironmentVariable + variableName: QTQA_LICHECK_BRANCH + variableValue: "{{ slice .Env.TESTED_MODULE_BRANCH_COIN 5 }}" + enable_if: + condition: runtime + env_var: TESTED_MODULE_BRANCH_COIN + contains_value: "tqtc/" + - type: EnvironmentVariable + variableName: QTQA_LICHECK_BRANCH + variableValue: "{{ .Env.TESTED_MODULE_BRANCH_COIN }}" + disable_if: + condition: runtime + env_var: TESTED_MODULE_BRANCH_COIN + contains_value: "tqtc/" + + # The command must not have whitespace directly after any piping, + # as whitespace directly after pipes will be interpreted as part of the command. + - type: ExecuteCommand + command: ["bash", "-c", "git clone --depth=1 -b {{ .Env.QTQA_LICHECK_BRANCH }} git://{{.Env.QT_COIN_GIT_DAEMON}}/qt-project/qt/qtqa qt/qtqa-latest ||git clone --depth=1 -b dev git://{{.Env.QT_COIN_GIT_DAEMON}}/qt-project/qt/qtqa qt/qtqa-latest"] maxTimeInSeconds: 600 maxTimeBetweenOutput: 600 - project: qt/qtqa - ref: "CURRENT_BRANCH" - directory: qt/qtqa-latest userMessageOnFailure: > - Could not install qtqa source archive. Please investigate why. + Failed to clone qtqa sources. Please investigate why. - type: EnvironmentVariable variableName: QT_MODULE_TO_TEST variableValue: "{{.SourceDir}}"