16 Commits

Author SHA1 Message Date
Bo-Yi Wu a7c6b81621 feat: support parameter handling for dynamic URL paths (#35)
- Comment out unused form data encoding in `post` method
- Remove redundant error logging in `post` method
- Add conditional URL path selection in `trigger` method based on parameters
- Add `parameter` flag to CLI options in `main.go`
- Include `parameter` in the `run` function configuration
- Import `net/url` package in `plugin.go`
- Add `Parameter` field to `plugin.go` struct
- Parse and add parameters to URL values in `Exec` method
- Pass parsed parameters to `trigger` method in `Exec` function

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-10-05 20:25:01 +08:00
Bo-Yi Wu 1bb020b22d feat: add support for insecure TLS connections (#34)
- Add `crypto/tls` import in `jenkins.go`
- Add `Client` field to `Jenkins` struct
- Modify `NewJenkins` function to accept an `insecure` parameter and configure HTTP client accordingly
- Update `sendRequest` method to use the `Client` field from the `Jenkins` struct
- Update tests in `jenkins_test.go` to include the `insecure` parameter in `NewJenkins` calls
- Add `insecure` flag to CLI options in `main.go`
- Add `Insecure` field to `Plugin` struct
- Update `Plugin.Exec` method to pass `Insecure` field to `NewJenkins`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-10-05 08:41:53 +08:00
appleboy b370179bda refactor: refactor codebase for improved compatibility and efficiency
- Replace `ioutil.ReadAll` with `io.ReadAll` in `jenkins.go`
- Ignore the return value of `godotenv.Load` in `main.go`
- Ignore the return value of `godotenv.Overload` in `main.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-10-04 15:34:57 +08:00
Bo-Yi Wu daf0401e30 chore: load env from /run/drone/env path 2020-07-18 09:46:57 +08:00
Bo-Yi Wu ee6e15d448 chore: support github actions 2019-09-30 07:45:18 +08:00
Bo-Yi Wu beee0b43a6 chore: mirror changes 2019-03-02 10:53:03 +08:00
Bo-Yi Wu 96b11d47cd feat: check return err. 2018-11-11 11:38:23 +08:00
Bo-Yi Wu 18b163fd7b add fmt check command (#18)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-05-07 12:52:57 +08:00
Bo-Yi Wu 1898550d88 feat: support build binary (#10) 2017-01-16 14:07:17 +08:00
Bo-Yi Wu 788418c56f refactor: remove unnecessary config. (#5) 2017-01-16 10:42:55 +08:00
Bo-Yi Wu 226713ff24 Support load configuration from files.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-21 11:16:28 +08:00
Bo-Yi Wu 186ee76d3c update Version comment.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-19 22:36:05 +08:00
Bo-Yi Wu b0308b95cb remove telegram package.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-18 10:11:29 +08:00
Bo-Yi Wu 5257dc754c update plugin.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 21:48:09 +08:00
Bo-Yi Wu 44d62cead6 add main config.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 19:12:29 +08:00
Bo-Yi Wu 74735d5fa4 initial file
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 13:30:34 +08:00