mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-05-23 18:58:14 +00:00
Compare commits
8 commits
9e4b409d7c
...
cfb4a125ea
Author | SHA1 | Date | |
---|---|---|---|
cfb4a125ea | |||
ad477b2b61 | |||
a688ae4c7e | |||
c6b2cd8a48 | |||
325b1b5e57 | |||
4b1ff6d1a7 | |||
2c3cd83402 | |||
a230e88c3a |
|
@ -3,7 +3,7 @@ when:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &golang_image 'docker.io/golang:1.22.2'
|
- &golang_image 'docker.io/golang:1.22.2'
|
||||||
- &node_image 'docker.io/node:21-alpine'
|
- &node_image 'docker.io/node:22-alpine'
|
||||||
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.22.1'
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.22.1'
|
||||||
- &xgo_version 'go-1.21.2'
|
- &xgo_version 'go-1.21.2'
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
variables:
|
variables:
|
||||||
- &golang_image 'docker.io/golang:1.22.2'
|
- &golang_image 'docker.io/golang:1.22.2'
|
||||||
- &node_image 'docker.io/node:21-alpine'
|
- &node_image 'docker.io/node:22-alpine'
|
||||||
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.22.1'
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.22.1'
|
||||||
- &xgo_version 'go-1.21.2'
|
- &xgo_version 'go-1.21.2'
|
||||||
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:3.2.1'
|
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:3.2.1'
|
||||||
|
|
|
@ -13,7 +13,7 @@ steps:
|
||||||
branch: renovate/*
|
branch: renovate/*
|
||||||
|
|
||||||
- name: spellcheck
|
- name: spellcheck
|
||||||
image: docker.io/node:21-alpine
|
image: docker.io/node:22-alpine
|
||||||
depends_on: []
|
depends_on: []
|
||||||
commands:
|
commands:
|
||||||
- corepack enable
|
- corepack enable
|
||||||
|
|
|
@ -6,7 +6,7 @@ when:
|
||||||
- renovate/*
|
- renovate/*
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &node_image 'docker.io/node:21-alpine'
|
- &node_image 'docker.io/node:22-alpine'
|
||||||
- &when
|
- &when
|
||||||
path:
|
path:
|
||||||
# related config files
|
# related config files
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
|
||||||
FROM docker.io/golang:1.22-alpine3.19 as golang_image
|
FROM docker.io/golang:1.22-alpine3.19 as golang_image
|
||||||
FROM docker.io/node:21-alpine3.19
|
FROM docker.io/node:22-alpine3.19
|
||||||
|
|
||||||
# renovate: datasource=repology depName=alpine_3_19/make versioning=loose
|
# renovate: datasource=repology depName=alpine_3_19/make versioning=loose
|
||||||
ENV MAKE_VERSION="4.4.1-r2"
|
ENV MAKE_VERSION="4.4.1-r2"
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"trim": "^0.0.3",
|
"trim": "^1.0.0",
|
||||||
"got": "^11.8.5"
|
"got": "^14.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
1045
docs/pnpm-lock.yaml
1045
docs/pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -67,9 +67,9 @@ var Flags = []cli.Flag{
|
||||||
Value: cli.NewStringSlice("regcred"),
|
Value: cli.NewStringSlice("regcred"),
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
&cli.BoolFlag{
|
||||||
EnvVars: []string{"WOODPECKER_BACKEND_K8S_NATIVE_SECRETS_ALLOW_FROM_STEP"},
|
EnvVars: []string{"WOODPECKER_BACKEND_K8S_ALLOW_NATIVE_SECRETS"},
|
||||||
Name: "backend-k8s-native-secrets-allow-from-step",
|
Name: "backend-k8s-allow-native-secrets",
|
||||||
Usage: "whether to allow existing Kubernetes secrets to be referenced from step",
|
Usage: "whether to allow existing Kubernetes secrets to be referenced from steps",
|
||||||
Value: false,
|
Value: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ func configFromCliContext(ctx context.Context) (*config, error) {
|
||||||
SecurityContext: SecurityContextConfig{
|
SecurityContext: SecurityContextConfig{
|
||||||
RunAsNonRoot: c.Bool("backend-k8s-secctx-nonroot"),
|
RunAsNonRoot: c.Bool("backend-k8s-secctx-nonroot"),
|
||||||
},
|
},
|
||||||
NativeSecretsAllowFromStep: c.Bool("backend-k8s-native-secrets-allow-from-step"),
|
NativeSecretsAllowFromStep: c.Bool("backend-k8s-allow-native-secrets"),
|
||||||
}
|
}
|
||||||
// TODO: remove in next major
|
// TODO: remove in next major
|
||||||
if len(config.ImagePullSecretNames) == 1 && config.ImagePullSecretNames[0] == "regcred" {
|
if len(config.ImagePullSecretNames) == 1 && config.ImagePullSecretNames[0] == "regcred" {
|
||||||
|
|
|
@ -59,11 +59,11 @@ func (s storage) GetPipelineList(repo *model.Repo, p *model.ListOptions, f *mode
|
||||||
|
|
||||||
if f != nil {
|
if f != nil {
|
||||||
if f.After != 0 {
|
if f.After != 0 {
|
||||||
cond = cond.And(builder.Gt{"pipeline_started": f.After})
|
cond = cond.And(builder.Gt{"pipeline_created": f.After})
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.Before != 0 {
|
if f.Before != 0 {
|
||||||
cond = cond.And(builder.Lt{"pipeline_started": f.Before})
|
cond = cond.And(builder.Lt{"pipeline_created": f.Before})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -231,21 +231,19 @@ func TestPipelines(t *testing.T) {
|
||||||
})
|
})
|
||||||
|
|
||||||
g.It("Should get filtered pipelines", func() {
|
g.It("Should get filtered pipelines", func() {
|
||||||
dt1, _ := time.Parse(time.RFC3339, "2023-01-15T15:00:00Z")
|
|
||||||
pipeline1 := &model.Pipeline{
|
pipeline1 := &model.Pipeline{
|
||||||
RepoID: repo.ID,
|
RepoID: repo.ID,
|
||||||
Started: dt1.Unix(),
|
|
||||||
}
|
}
|
||||||
dt2, _ := time.Parse(time.RFC3339, "2023-01-15T16:30:00Z")
|
|
||||||
pipeline2 := &model.Pipeline{
|
pipeline2 := &model.Pipeline{
|
||||||
RepoID: repo.ID,
|
RepoID: repo.ID,
|
||||||
Started: dt2.Unix(),
|
|
||||||
}
|
}
|
||||||
err1 := store.CreatePipeline(pipeline1, []*model.Step{}...)
|
err1 := store.CreatePipeline(pipeline1, []*model.Step{}...)
|
||||||
g.Assert(err1).IsNil()
|
g.Assert(err1).IsNil()
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
before := time.Now().Unix()
|
||||||
err2 := store.CreatePipeline(pipeline2, []*model.Step{}...)
|
err2 := store.CreatePipeline(pipeline2, []*model.Step{}...)
|
||||||
g.Assert(err2).IsNil()
|
g.Assert(err2).IsNil()
|
||||||
pipelines, err3 := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptions{Page: 1, PerPage: 50}, &model.PipelineFilter{Before: dt2.Unix()})
|
pipelines, err3 := store.GetPipelineList(&model.Repo{ID: 1}, &model.ListOptions{Page: 1, PerPage: 50}, &model.PipelineFilter{Before: before})
|
||||||
g.Assert(err3).IsNil()
|
g.Assert(err3).IsNil()
|
||||||
g.Assert(len(pipelines)).Equal(1)
|
g.Assert(len(pipelines)).Equal(1)
|
||||||
g.Assert(pipelines[0].ID).Equal(pipeline1.ID)
|
g.Assert(pipelines[0].ID).Equal(pipeline1.ID)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue