mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 00:37:23 +03:00
ci: self-service compat test start (#11853)
It should now be possible for anyone to trigger the daily compat build by adding a `run-full-compat: true` trailer to their commit message. CHANGELOG_BEGIN CHANGELOG_END run-full-compat: true
This commit is contained in:
parent
de8d15fb1e
commit
b8937ad81b
@ -211,9 +211,11 @@ jobs:
|
|||||||
branch: $[ dependencies.compat_versions_pr.outputs['out.branch'] ]
|
branch: $[ dependencies.compat_versions_pr.outputs['out.branch'] ]
|
||||||
steps:
|
steps:
|
||||||
- checkout: none
|
- checkout: none
|
||||||
|
- template: bash-lib.yml
|
||||||
|
parameters:
|
||||||
|
var_name: bash-lib
|
||||||
- bash: |
|
- bash: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
az extension add --name azure-devops
|
source $(bash-lib)
|
||||||
echo "$(System.AccessToken)" | az devops login --org "https://dev.azure.com/digitalasset"
|
trigger_azure $(System.AccessToken) --branch $(branch) PRs
|
||||||
az pipelines build queue --branch $(branch) --definition-name "digital-asset.daml-daily-compat" --org "https://dev.azure.com/digitalasset" --project daml
|
trigger_azure $(System.AccessToken) --branch $(branch) digital-asset.daml-daily-compat
|
||||||
az pipelines build queue --branch $(branch) --definition-name "PRs" --org "https://dev.azure.com/digitalasset" --project daml
|
|
||||||
|
@ -158,6 +158,21 @@ steps:
|
|||||||
next_in_rotation_github() {
|
next_in_rotation_github() {
|
||||||
next_in_rotation | awk '{print $2}'
|
next_in_rotation | awk '{print $2}'
|
||||||
}
|
}
|
||||||
|
trigger_azure() (
|
||||||
|
token=$1
|
||||||
|
option=$2
|
||||||
|
target=$3
|
||||||
|
build=$4
|
||||||
|
az extension add --name azure-devops
|
||||||
|
trap 'az devops logout' EXIT
|
||||||
|
echo $token \
|
||||||
|
| az devops login --org "https://dev.azure.com/digitalasset"
|
||||||
|
az pipelines build queue \
|
||||||
|
$option $target \
|
||||||
|
--definition-name $build \
|
||||||
|
--org "https://dev.azure.com/digitalasset" \
|
||||||
|
--project daml
|
||||||
|
)
|
||||||
|
|
||||||
END
|
END
|
||||||
echo "##vso[task.setvariable variable=${{parameters.var_name}}]$TMP"
|
echo "##vso[task.setvariable variable=${{parameters.var_name}}]$TMP"
|
||||||
|
19
ci/prs.yml
19
ci/prs.yml
@ -170,3 +170,22 @@ jobs:
|
|||||||
tell_slack "<@${user}> <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|Build $(Build.BuildId)> for <https://github.com/digital-asset/daml/pull/$(pr.num)|PR $(pr.num)> has completed with status $(build_status) (changelog: $(changelog_status))." \
|
tell_slack "<@${user}> <https://dev.azure.com/digitalasset/daml/_build/results?buildId=$(Build.BuildId)|Build $(Build.BuildId)> for <https://github.com/digital-asset/daml/pull/$(pr.num)|PR $(pr.num)> has completed with status $(build_status) (changelog: $(changelog_status))." \
|
||||||
"$(Slack.team-daml-ci)"
|
"$(Slack.team-daml-ci)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- job: self_service_compat_test
|
||||||
|
pool:
|
||||||
|
vmImage: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- checkout: self
|
||||||
|
- template: bash-lib.yml
|
||||||
|
parameters:
|
||||||
|
var_name: bash-lib
|
||||||
|
- bash: |
|
||||||
|
set -euo pipefail
|
||||||
|
source $(bash-lib)
|
||||||
|
COMMIT=$(git rev-parse HEAD^2)
|
||||||
|
REQUEST=$(git log -n1 --format="%(trailers:key=run-full-compat,valueonly)" $COMMIT)
|
||||||
|
if [ $REQUEST == true ]; then
|
||||||
|
trigger_azure $AZURE_TOKEN --commit-id $COMMIT digital-asset.daml-daily-compat
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
AZURE_TOKEN: $(System.AccessToken)
|
||||||
|
Loading…
Reference in New Issue
Block a user