mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 11:51:02 +00:00
Remove deprecated API paths (#2639)
This commit is contained in:
parent
c344cbb0fc
commit
5045f1e431
5 changed files with 70 additions and 57 deletions
|
@ -743,45 +743,6 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/logs/{repo_id}/{pipeline}/{stepID}": {
|
|
||||||
"get": {
|
|
||||||
"produces": [
|
|
||||||
"text/plain"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"Pipeline logs"
|
|
||||||
],
|
|
||||||
"summary": "Log stream",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "the repository id",
|
|
||||||
"name": "repo_id",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "the number of the pipeline",
|
|
||||||
"name": "pipeline",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "the step id",
|
|
||||||
"name": "stepID",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "OK"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/org/lookup/{org_full_name}": {
|
"/org/lookup/{org_full_name}": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
|
@ -1968,7 +1929,7 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/repos/{repo_id}/logs/{number}": {
|
"/repos/{repo_id}/logs/{number}": {
|
||||||
"post": {
|
"delete": {
|
||||||
"produces": [
|
"produces": [
|
||||||
"text/plain"
|
"text/plain"
|
||||||
],
|
],
|
||||||
|
@ -3274,6 +3235,62 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/stream/events": {
|
||||||
|
"get": {
|
||||||
|
"description": "event source streaming for compatibility with quic and http2",
|
||||||
|
"produces": [
|
||||||
|
"text/plain"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Events"
|
||||||
|
],
|
||||||
|
"summary": "Event stream",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/stream/logs/{repo_id}/{pipeline}/{stepID}": {
|
||||||
|
"get": {
|
||||||
|
"produces": [
|
||||||
|
"text/plain"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"Pipeline logs"
|
||||||
|
],
|
||||||
|
"summary": "Log stream",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "the repository id",
|
||||||
|
"name": "repo_id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "the number of the pipeline",
|
||||||
|
"name": "pipeline",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "the step id",
|
||||||
|
"name": "stepID",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/user": {
|
"/user": {
|
||||||
"get": {
|
"get": {
|
||||||
"produces": [
|
"produces": [
|
||||||
|
|
|
@ -10,11 +10,12 @@ Some versions need some changes to the server configuration or the pipeline conf
|
||||||
- Deprecated `platform:` filter in favor of `labels:`, [read more](./20-usage/20-workflow-syntax.md#filter-by-platform)
|
- Deprecated `platform:` filter in favor of `labels:`, [read more](./20-usage/20-workflow-syntax.md#filter-by-platform)
|
||||||
- Removed `build` alias for `pipeline` command in CLI
|
- Removed `build` alias for `pipeline` command in CLI
|
||||||
- Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend.
|
- Removed `ssh` backend. Use an agent directly on the SSH machine using the `local` backend.
|
||||||
|
- Removed `/hook` and `/stream` API paths in favor of `/api/(hook|stream)`. You may need to use the "Repair repository" button in the repo settings or "Repair all" in the admin settings to recreate the forge hook.
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
- The signature used to verify extensions calls (like those used for the [config-extension](./30-administration/100-external-configuration-api.md)) done by the Woodpecker server switched from using a shared-secret HMac to an ed25519 key-pair. Read more about it at the [config-extensions](./30-administration/100-external-configuration-api.md) documentation.
|
- The signature used to verify extension calls (like those used for the [config-extension](./30-administration/100-external-configuration-api.md)) done by the Woodpecker server switched from using a shared-secret HMac to an ed25519 key-pair. Read more about it at the [config-extensions](./30-administration/100-external-configuration-api.md) documentation.
|
||||||
- Refactored support of old agent filter labels and expression. Learn how to use the new [filter](./20-usage/20-workflow-syntax.md#labels)
|
- Refactored support for old agent filter labels and expressions. Learn how to use the new [filter](./20-usage/20-workflow-syntax.md#labels)
|
||||||
- Renamed step environment variable `CI_SYSTEM_ARCH` to `CI_SYSTEM_PLATFORM`. Same applies for the cli exec variable.
|
- Renamed step environment variable `CI_SYSTEM_ARCH` to `CI_SYSTEM_PLATFORM`. Same applies for the cli exec variable.
|
||||||
- Renamed environment variables `CI_BUILD_*` and `CI_PREV_BUILD_*` to `CI_PIPELINE_*` and `CI_PREV_PIPELINE_*`, old ones are still available but deprecated
|
- Renamed environment variables `CI_BUILD_*` and `CI_PREV_BUILD_*` to `CI_PIPELINE_*` and `CI_PREV_PIPELINE_*`, old ones are still available but deprecated
|
||||||
- Renamed environment variables `CI_JOB_*` to `CI_STEP_*`, old ones are still available but deprecated
|
- Renamed environment variables `CI_JOB_*` to `CI_STEP_*`, old ones are still available but deprecated
|
||||||
|
|
|
@ -453,7 +453,7 @@ func PostPipeline(c *gin.Context) {
|
||||||
// DeletePipelineLogs
|
// DeletePipelineLogs
|
||||||
//
|
//
|
||||||
// @Summary Deletes log
|
// @Summary Deletes log
|
||||||
// @Router /repos/{repo_id}/logs/{number} [post]
|
// @Router /repos/{repo_id}/logs/{number} [delete]
|
||||||
// @Produce plain
|
// @Produce plain
|
||||||
// @Success 204
|
// @Success 204
|
||||||
// @Tags Pipeline logs
|
// @Tags Pipeline logs
|
||||||
|
|
|
@ -34,10 +34,14 @@ import (
|
||||||
"github.com/woodpecker-ci/woodpecker/server/store"
|
"github.com/woodpecker-ci/woodpecker/server/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// EventStreamSSE
|
||||||
//
|
//
|
||||||
// event source streaming for compatibility with quic and http2
|
// @Summary Event stream
|
||||||
//
|
// @Description event source streaming for compatibility with quic and http2
|
||||||
|
// @Router /stream/events [get]
|
||||||
|
// @Produce plain
|
||||||
|
// @Success 200
|
||||||
|
// @Tags Events
|
||||||
func EventStreamSSE(c *gin.Context) {
|
func EventStreamSSE(c *gin.Context) {
|
||||||
c.Header("Content-Type", "text/event-stream")
|
c.Header("Content-Type", "text/event-stream")
|
||||||
c.Header("Cache-Control", "no-cache")
|
c.Header("Cache-Control", "no-cache")
|
||||||
|
@ -118,10 +122,10 @@ func EventStreamSSE(c *gin.Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LogStream
|
// LogStreamSSE
|
||||||
//
|
//
|
||||||
// @Summary Log stream
|
// @Summary Log stream
|
||||||
// @Router /logs/{repo_id}/{pipeline}/{stepID} [get]
|
// @Router /stream/logs/{repo_id}/{pipeline}/{stepID} [get]
|
||||||
// @Produce plain
|
// @Produce plain
|
||||||
// @Success 200
|
// @Success 200
|
||||||
// @Tags Pipeline logs
|
// @Tags Pipeline logs
|
||||||
|
|
|
@ -224,13 +224,4 @@ func apiRoutes(e *gin.RouterGroup) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove /hook in favor of /api/hook
|
|
||||||
e.POST("/hook", api.PostHook)
|
|
||||||
|
|
||||||
// TODO: move to /api/stream
|
|
||||||
sse := e.Group("/stream")
|
|
||||||
{
|
|
||||||
sse.GET("/events", api.EventStreamSSE)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue