diff --git a/services/webhook/sourcehut/builds_test.go b/services/webhook/sourcehut/builds_test.go index 9ab018df72..3818568f78 100644 --- a/services/webhook/sourcehut/builds_test.go +++ b/services/webhook/sourcehut/builds_test.go @@ -175,7 +175,7 @@ environment: p := &api.PushPayload{ Ref: "refs/heads/main", HeadCommit: &api.PayloadCommit{ - ID: "69b217caa89166a02b8cd368b64fb83a44720e14", + ID: "b0404943256a1f5a50c3726f4378756b4c1e5704", Message: "replace simple with complex", }, Repo: repo, @@ -187,15 +187,22 @@ environment: pl, err := pc.Push(p) require.NoError(t, err) - assert.Equal(t, buildsVariables{ - Manifest: `image: archlinux + assert.Equal(t, `image: archlinux packages: - nodejs - npm - rsync sources: - - http://localhost:3000/testdata/repo.git#69b217caa89166a02b8cd368b64fb83a44720e14 + - http://localhost:3000/testdata/repo.git#b0404943256a1f5a50c3726f4378756b4c1e5704 tasks: [] +triggers: + - condition: failure + action: email + to: Jim Jimson + # report back the status + - condition: always + action: webhook + url: https://hook.example.org environment: BUILD_SUBMITTER: forgejo BUILD_SUBMITTER_URL: https://example.forgejo.org/ @@ -203,7 +210,9 @@ environment: deploy: synapse@synapse-bt.org secrets: - 7ebab768-e5e4-4c9d-ba57-ec41a72c5665 -`, +`, pl.Variables.Manifest) + assert.Equal(t, buildsVariables{ + Manifest: pl.Variables.Manifest, // the manifest correctness is checked above, for nicer diff on error Note: "replace simple with complex", Tags: []string{"testdata/repo", "branch/main", "complex.yaml"}, Secrets: false, diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/01/16b5e2279b70e5f5b98240e8896331248f4463 b/services/webhook/sourcehut/testdata/repo.git/objects/01/16b5e2279b70e5f5b98240e8896331248f4463 deleted file mode 100644 index c06eb842be..0000000000 Binary files a/services/webhook/sourcehut/testdata/repo.git/objects/01/16b5e2279b70e5f5b98240e8896331248f4463 and /dev/null differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/56/f276169b9766f805e5198fe7fb6698153fdb03 b/services/webhook/sourcehut/testdata/repo.git/objects/56/f276169b9766f805e5198fe7fb6698153fdb03 deleted file mode 100644 index dca1d23ce9..0000000000 --- a/services/webhook/sourcehut/testdata/repo.git/objects/56/f276169b9766f805e5198fe7fb6698153fdb03 +++ /dev/null @@ -1 +0,0 @@ -xNKj0ZxBɶzQ[FQ?"=A3Ѳmk#*@L3&)'D$#Β 搊Ѽ,#/8OvzIN<u'[;J~{#'e;.x輋#[K[kyASq\DAkƵ؝~PkVO \ No newline at end of file diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/99/fb389b232e5497f0dcdb1c1065eac1d10d3794 b/services/webhook/sourcehut/testdata/repo.git/objects/99/fb389b232e5497f0dcdb1c1065eac1d10d3794 new file mode 100644 index 0000000000..43dd885510 Binary files /dev/null and b/services/webhook/sourcehut/testdata/repo.git/objects/99/fb389b232e5497f0dcdb1c1065eac1d10d3794 differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/a5/4082fdb8e55055382725f10a81bb4dc2b13029 b/services/webhook/sourcehut/testdata/repo.git/objects/a5/4082fdb8e55055382725f10a81bb4dc2b13029 new file mode 100644 index 0000000000..071f79e851 --- /dev/null +++ b/services/webhook/sourcehut/testdata/repo.git/objects/a5/4082fdb8e55055382725f10a81bb4dc2b13029 @@ -0,0 +1,4 @@ +xUn0 wk +l4z0 %fm~@Dc<(ŝ% m]NjDR +A閌9Xxu{;Nȅ4(Gy:QO?/9 lh|0cΌl8*$?dԻ**>7ȖXomUJItmKqrh8>)ҺڋF,77,8 {:0zZfya) +5 ʴ狉7ΑLܯ)z yivoQ78J}臤 \ No newline at end of file diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/b0/404943256a1f5a50c3726f4378756b4c1e5704 b/services/webhook/sourcehut/testdata/repo.git/objects/b0/404943256a1f5a50c3726f4378756b4c1e5704 new file mode 100644 index 0000000000..a2cff639dc Binary files /dev/null and b/services/webhook/sourcehut/testdata/repo.git/objects/b0/404943256a1f5a50c3726f4378756b4c1e5704 differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/bd/d74dba3f34542e480d56c2a91c9e2463180d3c b/services/webhook/sourcehut/testdata/repo.git/objects/bd/d74dba3f34542e480d56c2a91c9e2463180d3c deleted file mode 100644 index 639f5c4784..0000000000 Binary files a/services/webhook/sourcehut/testdata/repo.git/objects/bd/d74dba3f34542e480d56c2a91c9e2463180d3c and /dev/null differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/c2/30778a03511f546f532e79c8c14917c260e750 b/services/webhook/sourcehut/testdata/repo.git/objects/c2/30778a03511f546f532e79c8c14917c260e750 deleted file mode 100644 index 4a952fb0b2..0000000000 Binary files a/services/webhook/sourcehut/testdata/repo.git/objects/c2/30778a03511f546f532e79c8c14917c260e750 and /dev/null differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/c9/fa8be8c6f230e9529f8e546a3e6a354cbaf313 b/services/webhook/sourcehut/testdata/repo.git/objects/c9/fa8be8c6f230e9529f8e546a3e6a354cbaf313 deleted file mode 100644 index 291f0a422c..0000000000 Binary files a/services/webhook/sourcehut/testdata/repo.git/objects/c9/fa8be8c6f230e9529f8e546a3e6a354cbaf313 and /dev/null differ diff --git a/services/webhook/sourcehut/testdata/repo.git/objects/cb/80b2628b69c86b6baea464e5f9fc28405fde4b b/services/webhook/sourcehut/testdata/repo.git/objects/cb/80b2628b69c86b6baea464e5f9fc28405fde4b deleted file mode 100644 index 891ace4651..0000000000 --- a/services/webhook/sourcehut/testdata/repo.git/objects/cb/80b2628b69c86b6baea464e5f9fc28405fde4b +++ /dev/null @@ -1 +0,0 @@ -x=Kn0 D)`k@Pd{P2-AQ] YIesmKoD)8p gg44lFQF9˜V,[UΤ`~[iVڕ 4+(0Y)$"ԠlZ-e5wԦʸNY?V4&tC9=a ,P \ No newline at end of file diff --git a/services/webhook/sourcehut/testdata/repo.git/refs/heads/main b/services/webhook/sourcehut/testdata/repo.git/refs/heads/main index 4e693a7464..a7ab41949f 100644 --- a/services/webhook/sourcehut/testdata/repo.git/refs/heads/main +++ b/services/webhook/sourcehut/testdata/repo.git/refs/heads/main @@ -1 +1 @@ -69b217caa89166a02b8cd368b64fb83a44720e14 +b0404943256a1f5a50c3726f4378756b4c1e5704