Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
run: |
make build
14 changes: 10 additions & 4 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ on:
jobs:
prerelease:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: setup
run: |
# setup git tag in Actions environment
Expand All @@ -33,7 +39,7 @@ jobs:
make build-static-ci

- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-server
cache: true
Expand All @@ -42,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: publish-alpine
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-server
cache: true
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
env:
GOOS: linux
Expand All @@ -27,15 +33,15 @@ jobs:
make build-static-ci

- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-server
cache: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: publish-alpine
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-server
cache: true
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ on:
jobs:
diff-review:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
Expand All @@ -27,7 +33,7 @@ jobs:
full-review:
runs-on: ubuntu-latest
container:
image: golang:1.17
image: golang:1.19
steps:
- name: clone
uses: actions/checkout@v3
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
schema:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: tags
run: |
git fetch --tags
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: test
run: |
go test -race -covermode=atomic -coverprofile=coverage.out ./...
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: tags
run: |
git fetch --tags
Expand All @@ -33,5 +39,5 @@ jobs:

- name: validate spec
run: |
make spec-install
sudo make spec-install
make spec
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ spec-install:
@apt-get update
@apt-get install -y jq moreutils
@echo "### Downloading and installing go-swagger"
@curl -o /usr/local/bin/swagger -L "https://github.com/go-swagger/go-swagger/releases/download/v0.27.0/swagger_linux_amd64"
@curl -o /usr/local/bin/swagger -L "https://github.com/go-swagger/go-swagger/releases/download/v0.30.2/swagger_linux_amd64"
@chmod +x /usr/local/bin/swagger

# The `spec-gen` target is intended to create an api-spec
Expand Down
2 changes: 1 addition & 1 deletion api/admin/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/api/admin"
// import "github.com/go-vela/server/api/admin"
package admin
2 changes: 1 addition & 1 deletion api/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/api"
// import "github.com/go-vela/server/api"
package api
2 changes: 1 addition & 1 deletion compiler/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/compiler"
// import "github.com/go-vela/server/compiler"
package compiler
18 changes: 9 additions & 9 deletions compiler/native/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2032,7 +2032,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from foo", m, ""),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_foo",
Pull: "not_present",
Number: 4,
Expand All @@ -2050,7 +2050,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from bar", m, ""),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_bar",
Pull: "not_present",
Number: 5,
Expand All @@ -2068,7 +2068,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from star", m, ""),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_star",
Pull: "not_present",
Number: 6,
Expand Down Expand Up @@ -2547,7 +2547,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from foo", m, constants.PipelineTypeGo),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_foo",
Pull: "not_present",
Number: 6,
Expand All @@ -2565,7 +2565,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from bar", m, constants.PipelineTypeGo),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_bar",
Pull: "not_present",
Number: 7,
Expand All @@ -2583,7 +2583,7 @@ func Test_Compile_Inline(t *testing.T) {
Directory: "/vela/src/foo//",
Entrypoint: []string{"/bin/sh", "-c"},
Environment: generateTestEnv("echo hello from star", m, constants.PipelineTypeGo),
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_star",
Pull: "not_present",
Number: 8,
Expand Down Expand Up @@ -2768,7 +2768,7 @@ func Test_CompileLite(t *testing.T) {
Steps: []*yaml.Step{
{
Commands: raw.StringSlice{"echo hello from foo"},
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_foo",
Pull: "not_present",
},
Expand All @@ -2780,7 +2780,7 @@ func Test_CompileLite(t *testing.T) {
Steps: []*yaml.Step{
{
Commands: raw.StringSlice{"echo hello from bar"},
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_bar",
Pull: "not_present",
},
Expand All @@ -2792,7 +2792,7 @@ func Test_CompileLite(t *testing.T) {
Steps: []*yaml.Step{
{
Commands: raw.StringSlice{"echo hello from star"},
Image: "golang:1.17",
Image: "golang:latest",
Name: "golang_star",
Pull: "not_present",
},
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/compiler/native"
// import "github.com/go-vela/server/compiler/native"
package native
2 changes: 1 addition & 1 deletion compiler/native/testdata/inline_with_golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ templates:
format: golang
type: github
vars:
image: golang:1.17
image: golang:latest
- name: starlark
source: github.example.com/github/octocat/starlark_inline_stages.star
format: starlark
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/testdata/inline_with_stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ templates:
format: golang
type: github
vars:
image: golang:1.17
image: golang:latest
- name: starlark
source: github.example.com/github/octocat/starlark_inline_stages.star
format: starlark
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/testdata/stage_inline_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ templates:
format: golang
type: github
vars:
image: golang:1.17
image: golang:latest

stages:
test:
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/testdata/step_inline_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ templates:
format: golang
type: github
vars:
image: golang:1.17
image: golang:latest

steps:
- name: golang
Expand Down
2 changes: 1 addition & 1 deletion compiler/registry/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/compiler/registry"
// import "github.com/go-vela/server/compiler/registry"
package registry
2 changes: 1 addition & 1 deletion compiler/registry/github/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/compiler/registry/github"
// import "github.com/go-vela/server/compiler/registry/github"
package github
2 changes: 1 addition & 1 deletion compiler/template/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/template"
// import "github.com/go-vela/server/template"
package template
2 changes: 1 addition & 1 deletion compiler/template/native/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/compiler/template/native"
// import "github.com/go-vela/server/compiler/template/native"
package native
2 changes: 1 addition & 1 deletion database/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
//
// Usage:
//
// import "github.com/go-vela/server/database"
// import "github.com/go-vela/server/database"
package database
Loading