mirror of
https://github.com/appleboy/drone-jenkins.git
synced 2026-06-04 18:23:57 +08:00
ci: update build workflow and dependencies for Go 1.24 compatibility
- Update Go version requirement from 1.22 to 1.24.0 - Add github.com/appleboy/com as a dependency - Set GitHub Actions output with build result and URL after Jenkins build completion - Log a warning if setting GitHub output fails Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
module github.com/appleboy/drone-jenkins
|
module github.com/appleboy/drone-jenkins
|
||||||
|
|
||||||
go 1.22
|
go 1.24.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/appleboy/com v1.1.1
|
||||||
github.com/joho/godotenv v1.5.1
|
github.com/joho/godotenv v1.5.1
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
github.com/urfave/cli/v2 v2.27.5
|
github.com/urfave/cli/v2 v2.27.5
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
github.com/appleboy/com v1.1.1 h1:iqu+BzrEcO3Towwi4E0GDRLSEeMBix3gf3LRjn9h8ow=
|
||||||
|
github.com/appleboy/com v1.1.1/go.mod h1:WKU8+CaWcyLkpm0NLhGA8Wl/yGi3KXfTIXsp7T2ceZc=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
|
github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/appleboy/com/gh"
|
||||||
"github.com/yassinebenaid/godump"
|
"github.com/yassinebenaid/godump"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -303,6 +304,14 @@ func (jenkins *Jenkins) waitForCompletion(
|
|||||||
log.Println("================================")
|
log.Println("================================")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set GitHub Actions output
|
||||||
|
if err := gh.SetOutput(map[string]string{
|
||||||
|
"result": buildInfo.Result,
|
||||||
|
"url": buildInfo.URL,
|
||||||
|
}); err != nil {
|
||||||
|
log.Printf("warning: failed to set GitHub output: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
return buildInfo, nil
|
return buildInfo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user