Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func getIntegrationBuildParameters(
build *buildOptions,
buildOptions *BuildOptions,
) ([]*gitlab.PipelineVariableOptions, error) {
readHead := "pull/" + build.pr + "/merge"
readHead := "pull/" + build.pr + "/head"
var buildParameters []*gitlab.PipelineVariableOptions

runIntegrationTests := "true"
Expand Down
4 changes: 2 additions & 2 deletions main_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,13 @@ func parseBuildOptions(commentBody string) (*BuildOptions, error) {
case 2: // we can have both deviceauth/1 and mender/3.1.x syntax
// repo/<pr_number> syntax
if _, err := strconv.Atoi(userInputParts[1]); err == nil {
revision = "pull/" + userInputParts[1] + "/merge"
revision = "pull/" + userInputParts[1] + "/head"
} else {
// feature branch
revision = userInputParts[1]
}
case 3: // deviceconnect/pull/12 syntax
revision = strings.Join(userInputParts[1:], "/") + "/merge"
revision = strings.Join(userInputParts[1:], "/") + "/head"
case 4: // deviceauth/pull/1/head syntax
revision = strings.Join(userInputParts[1:], "/")
default:
Expand Down
8 changes: 4 additions & 4 deletions main_comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ func TestParseBuildOptions(t *testing.T) {
StartPipelineComment: "start client pipeline --pr mender-connect/pull/88 --pr deviceconnect/pull/12 --pr mender/3.1.x --pr deviceauth/feature-branch",
BuildOptions: &BuildOptions{
PullRequests: map[string]string{
"mender-connect": "pull/88/merge",
"deviceconnect": "pull/12/merge",
"mender-connect": "pull/88/head",
"deviceconnect": "pull/12/head",
"mender": "3.1.x",
"deviceauth": "feature-branch",
},
Expand All @@ -559,8 +559,8 @@ func TestParseBuildOptions(t *testing.T) {
StartPipelineComment: "start client pipeline --pr mender-connect/88 --pr deviceconnect/12 --pr mender/3.1.x",
BuildOptions: &BuildOptions{
PullRequests: map[string]string{
"mender-connect": "pull/88/merge",
"deviceconnect": "pull/12/merge",
"mender-connect": "pull/88/head",
"deviceconnect": "pull/12/head",
"mender": "3.1.x",
},
},
Expand Down
4 changes: 2 additions & 2 deletions menderqa_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func getMenderClientBuildParameters(
build *buildOptions,
buildOptions *BuildOptions,
) ([]*gitlab.PipelineVariableOptions, error) {
readHead := "pull/" + build.pr + "/merge"
readHead := "pull/" + build.pr + "/head"
var buildParameters []*gitlab.PipelineVariableOptions

// Set component versions from the release JSON, deduplicated by source
Expand Down Expand Up @@ -377,7 +377,7 @@ func getMenderClientBuildParametersLegacy(
buildOptions *BuildOptions,
) ([]*gitlab.PipelineVariableOptions, error) {
var err error
readHead := "pull/" + build.pr + "/merge"
readHead := "pull/" + build.pr + "/head"
var buildParameters []*gitlab.PipelineVariableOptions

var versionedRepositories []string
Expand Down
2 changes: 1 addition & 1 deletion pullreq_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func syncBranch(
return fmt.Errorf("%v returned error: %s: %s", gitcmd.Args, out, err.Error())
}

gitcmd = git.Command("fetch", "github", "pull/"+prNum+"/merge:"+prBranchName)
gitcmd = git.Command("fetch", "github", "pull/"+prNum+"/head:"+prBranchName)
gitcmd.Dir = tmpdir
out, err = gitcmd.CombinedOutput()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions tests/tests/golden-files/test_issue_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ output:
BUILD_BEAGLEBONEBLACK:true, BUILD_CLIENT:true, BUILD_QEMUX86_64_BIOS_GRUB:true,
BUILD_QEMUX86_64_BIOS_GRUB_GPT:true, BUILD_QEMUX86_64_UEFI_GRUB:true, BUILD_VEXPRESS_QEMU:true,
BUILD_VEXPRESS_QEMU_FLASH:true, BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB:true, INTEGRATION_REV:master,
MENDER_BINARY_DELTA_REV:master, MENDER_CLIENT_SUBCOMPONENTS_REV:main, MENDER_CONFIGURE_MODULE_REV:pull/145/merge,
MENDER_BINARY_DELTA_REV:master, MENDER_CLIENT_SUBCOMPONENTS_REV:main, MENDER_CONFIGURE_MODULE_REV:pull/145/head,
MENDER_CONNECT_REV:master, MENDER_CONTAINER_MODULES_REV:main, MENDER_FLASH_REV:master,
MENDER_REV:master, MONITOR_CLIENT_REV:master, RUN_INTEGRATION_TESTS:true, TEST_QEMUX86_64_BIOS_GRUB:true,
TEST_QEMUX86_64_BIOS_GRUB_GPT:true, TEST_QEMUX86_64_UEFI_GRUB:true, TEST_VEXPRESS_QEMU:true,
TEST_VEXPRESS_QEMU_FLASH:true, TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB:true, '
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/mender-qa,options={"ref":"master","variables":[{"key":"BUILD_BEAGLEBONEBLACK","value":"true"},{"key":"BUILD_CLIENT","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"BUILD_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"BUILD_VEXPRESS_QEMU","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"},{"key":"INTEGRATION_REV","value":"master"},{"key":"MENDER_BINARY_DELTA_REV","value":"master"},{"key":"MENDER_CLIENT_SUBCOMPONENTS_REV","value":"main"},{"key":"MENDER_CONFIGURE_MODULE_REV","value":"pull/145/merge"},{"key":"MENDER_CONNECT_REV","value":"master"},{"key":"MENDER_CONTAINER_MODULES_REV","value":"main"},{"key":"MENDER_FLASH_REV","value":"master"},{"key":"MENDER_REV","value":"master"},{"key":"MONITOR_CLIENT_REV","value":"master"},{"key":"RUN_INTEGRATION_TESTS","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"TEST_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"TEST_VEXPRESS_QEMU","value":"true"},{"key":"TEST_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"}]}'
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/mender-qa,options={"ref":"master","variables":[{"key":"BUILD_BEAGLEBONEBLACK","value":"true"},{"key":"BUILD_CLIENT","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"BUILD_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"BUILD_VEXPRESS_QEMU","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"},{"key":"INTEGRATION_REV","value":"master"},{"key":"MENDER_BINARY_DELTA_REV","value":"master"},{"key":"MENDER_CLIENT_SUBCOMPONENTS_REV","value":"main"},{"key":"MENDER_CONFIGURE_MODULE_REV","value":"pull/145/head"},{"key":"MENDER_CONNECT_REV","value":"master"},{"key":"MENDER_CONTAINER_MODULES_REV","value":"main"},{"key":"MENDER_FLASH_REV","value":"master"},{"key":"MENDER_REV","value":"master"},{"key":"MONITOR_CLIENT_REV","value":"master"},{"key":"RUN_INTEGRATION_TESTS","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"TEST_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"TEST_VEXPRESS_QEMU","value":"true"},{"key":"TEST_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"}]}'
- 'info:Created pipeline: '
- 'github.CreateComment: org=mendersoftware,repo=mender-configure-module,number=145,comment={"body":"\nHello
:smiley_cat: I created a pipeline for you here: [Pipeline-0]()\n\n\u003cdetails\u003e\n \u003csummary\u003eBuild
Expand All @@ -47,7 +47,7 @@ output:
| true |\n| BUILD_VEXPRESS_QEMU | true |\n| BUILD_VEXPRESS_QEMU_FLASH | true |\n|
BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB | true |\n| INTEGRATION_REV | master |\n| MENDER_BINARY_DELTA_REV
| master |\n| MENDER_CLIENT_SUBCOMPONENTS_REV | main |\n| MENDER_CONFIGURE_MODULE_REV
| pull/145/merge |\n| MENDER_CONNECT_REV | master |\n| MENDER_CONTAINER_MODULES_REV
| pull/145/head |\n| MENDER_CONNECT_REV | master |\n| MENDER_CONTAINER_MODULES_REV
| main |\n| MENDER_FLASH_REV | master |\n| MENDER_REV | master |\n| MONITOR_CLIENT_REV
| master |\n| RUN_INTEGRATION_TESTS | true |\n| TEST_QEMUX86_64_BIOS_GRUB | true
|\n| TEST_QEMUX86_64_BIOS_GRUB_GPT | true |\n| TEST_QEMUX86_64_UEFI_GRUB | true
Expand Down
8 changes: 4 additions & 4 deletions tests/tests/golden-files/test_issue_comment___pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ output:
BUILD_BEAGLEBONEBLACK:true, BUILD_CLIENT:true, BUILD_QEMUX86_64_BIOS_GRUB:true,
BUILD_QEMUX86_64_BIOS_GRUB_GPT:true, BUILD_QEMUX86_64_UEFI_GRUB:true, BUILD_VEXPRESS_QEMU:true,
BUILD_VEXPRESS_QEMU_FLASH:true, BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB:true, INTEGRATION_REV:pull/1900/head,
MENDER_BINARY_DELTA_REV:master, MENDER_CLIENT_SUBCOMPONENTS_REV:main, MENDER_CONFIGURE_MODULE_REV:pull/145/merge,
MENDER_CONNECT_REV:pull/4/merge, MENDER_CONTAINER_MODULES_REV:main, MENDER_FLASH_REV:master,
MENDER_BINARY_DELTA_REV:master, MENDER_CLIENT_SUBCOMPONENTS_REV:main, MENDER_CONFIGURE_MODULE_REV:pull/145/head,
MENDER_CONNECT_REV:pull/4/head, MENDER_CONTAINER_MODULES_REV:main, MENDER_FLASH_REV:master,
MENDER_REV:3.1.x, META_MENDER_REV:pull/1/head, MONITOR_CLIENT_REV:master, RUN_INTEGRATION_TESTS:true,
TEST_QEMUX86_64_BIOS_GRUB:true, TEST_QEMUX86_64_BIOS_GRUB_GPT:true, TEST_QEMUX86_64_UEFI_GRUB:true,
TEST_VEXPRESS_QEMU:true, TEST_VEXPRESS_QEMU_FLASH:true, TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB:true, '
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/mender-qa,options={"ref":"master","variables":[{"key":"BUILD_BEAGLEBONEBLACK","value":"true"},{"key":"BUILD_CLIENT","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"BUILD_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"BUILD_VEXPRESS_QEMU","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"},{"key":"INTEGRATION_REV","value":"pull/1900/head"},{"key":"MENDER_BINARY_DELTA_REV","value":"master"},{"key":"MENDER_CLIENT_SUBCOMPONENTS_REV","value":"main"},{"key":"MENDER_CONFIGURE_MODULE_REV","value":"pull/145/merge"},{"key":"MENDER_CONNECT_REV","value":"pull/4/merge"},{"key":"MENDER_CONTAINER_MODULES_REV","value":"main"},{"key":"MENDER_FLASH_REV","value":"master"},{"key":"MENDER_REV","value":"3.1.x"},{"key":"META_MENDER_REV","value":"pull/1/head"},{"key":"MONITOR_CLIENT_REV","value":"master"},{"key":"RUN_INTEGRATION_TESTS","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"TEST_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"TEST_VEXPRESS_QEMU","value":"true"},{"key":"TEST_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"}]}'
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/mender-qa,options={"ref":"master","variables":[{"key":"BUILD_BEAGLEBONEBLACK","value":"true"},{"key":"BUILD_CLIENT","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"BUILD_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"BUILD_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"BUILD_VEXPRESS_QEMU","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"},{"key":"INTEGRATION_REV","value":"pull/1900/head"},{"key":"MENDER_BINARY_DELTA_REV","value":"master"},{"key":"MENDER_CLIENT_SUBCOMPONENTS_REV","value":"main"},{"key":"MENDER_CONFIGURE_MODULE_REV","value":"pull/145/head"},{"key":"MENDER_CONNECT_REV","value":"pull/4/head"},{"key":"MENDER_CONTAINER_MODULES_REV","value":"main"},{"key":"MENDER_FLASH_REV","value":"master"},{"key":"MENDER_REV","value":"3.1.x"},{"key":"META_MENDER_REV","value":"pull/1/head"},{"key":"MONITOR_CLIENT_REV","value":"master"},{"key":"RUN_INTEGRATION_TESTS","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB","value":"true"},{"key":"TEST_QEMUX86_64_BIOS_GRUB_GPT","value":"true"},{"key":"TEST_QEMUX86_64_UEFI_GRUB","value":"true"},{"key":"TEST_VEXPRESS_QEMU","value":"true"},{"key":"TEST_VEXPRESS_QEMU_FLASH","value":"true"},{"key":"TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB","value":"true"}]}'
- 'info:Created pipeline: '
- 'github.CreateComment: org=mendersoftware,repo=mender-configure-module,number=145,comment={"body":"\nHello
:smiley_cat: I created a pipeline for you here: [Pipeline-0]()\n\n\u003cdetails\u003e\n \u003csummary\u003eBuild
Expand All @@ -45,7 +45,7 @@ output:
| true |\n| BUILD_VEXPRESS_QEMU | true |\n| BUILD_VEXPRESS_QEMU_FLASH | true |\n|
BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB | true |\n| INTEGRATION_REV | pull/1900/head
|\n| MENDER_BINARY_DELTA_REV | master |\n| MENDER_CLIENT_SUBCOMPONENTS_REV | main
|\n| MENDER_CONFIGURE_MODULE_REV | pull/145/merge |\n| MENDER_CONNECT_REV | pull/4/merge
|\n| MENDER_CONFIGURE_MODULE_REV | pull/145/head |\n| MENDER_CONNECT_REV | pull/4/head
|\n| MENDER_CONTAINER_MODULES_REV | main |\n| MENDER_FLASH_REV | master |\n| MENDER_REV
| 3.1.x |\n| META_MENDER_REV | pull/1/head |\n| MONITOR_CLIENT_REV | master |\n|
RUN_INTEGRATION_TESTS | true |\n| TEST_QEMUX86_64_BIOS_GRUB | true |\n| TEST_QEMUX86_64_BIOS_GRUB_GPT
Expand Down
8 changes: 4 additions & 4 deletions tests/tests/golden-files/test_issue_comment_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output:
- 'git.Run: /usr/bin/git init .'
- 'git.Run: /usr/bin/git remote add github git@github.com:/mendersoftware/integration.git'
- 'git.Run: /usr/bin/git remote add gitlab git@gitlab.com:Northern.tech/Mender/integration'
- 'git.Run: /usr/bin/git fetch github pull/2725/merge:pr_2725_protected'
- 'git.Run: /usr/bin/git fetch github pull/2725/head:pr_2725_protected'
- 'git.Run: /usr/bin/git push -f -o ci.skip --set-upstream gitlab pr_2725_protected'
- 'info:Created branch: integration:pr_2725_protected'
- 'gitlab.ProtectedBranch: path=Northern.tech/Mender/integration,options={"name":"pr_2725_protected","allow_force_push":false}'
Expand All @@ -14,11 +14,11 @@ output:
- 'gitlab.GetPipelineVariables: path=Northern.tech/Mender/mender-qa,id=1'
- 'gitlab.GetPipelineVariables: path=Northern.tech/Mender/mender-qa,id=1'
- 'info:Creating pipeline in project Northern.tech/Mender/integration:pr_2725_protected
with variables: INTEGRATION_REV:pull/2725/merge, RUN_TESTS_FULL_INTEGRATION:true, '
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/integration,options={"ref":"pr_2725_protected","variables":[{"key":"INTEGRATION_REV","value":"pull/2725/merge"},{"key":"RUN_TESTS_FULL_INTEGRATION","value":"true"}]}'
with variables: INTEGRATION_REV:pull/2725/head, RUN_TESTS_FULL_INTEGRATION:true, '
- 'gitlab.CreatePipeline: path=Northern.tech/Mender/integration,options={"ref":"pr_2725_protected","variables":[{"key":"INTEGRATION_REV","value":"pull/2725/head"},{"key":"RUN_TESTS_FULL_INTEGRATION","value":"true"}]}'
- 'info:Created pipeline: '
- 'github.CreateComment: org=mendersoftware,repo=integration,number=2725,comment={"body":"\nHello
:smiley_cat: I created a pipeline for you here: [Pipeline-0]()\n\n\u003cdetails\u003e\n \u003csummary\u003eBuild
Configuration Matrix\u003c/summary\u003e\u003cp\u003e\n\n| Key | Value |\n| -----
| ----- |\n| INTEGRATION_REV | pull/2725/merge |\n| RUN_TESTS_FULL_INTEGRATION |
| ----- |\n| INTEGRATION_REV | pull/2725/head |\n| RUN_TESTS_FULL_INTEGRATION |
true |\n\n\n \u003c/p\u003e\u003c/details\u003e\n"}'
Loading