Skip to content

Commit

Permalink
Merge branch 'main' into feat/otel-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Sep 4, 2024
2 parents 50e82aa + 0894432 commit 093b912
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 40 deletions.
2 changes: 1 addition & 1 deletion api/types/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strconv"
"strings"

"github.com/buildkite/yaml"
json "github.com/ghodss/yaml"
"gopkg.in/yaml.v3"
)

// ToString is a helper function to convert
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"strings"
"time"

yml "github.com/buildkite/yaml"
"github.com/hashicorp/go-cleanhttp"
"github.com/hashicorp/go-retryablehttp"
yml "gopkg.in/yaml.v3"

api "github.com/go-vela/server/api/types"
"github.com/go-vela/types/constants"
Expand Down
30 changes: 15 additions & 15 deletions compiler/native/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"testing"
"time"

yml "github.com/buildkite/yaml"
"github.com/gin-gonic/gin"
"github.com/google/go-cmp/cmp"
"github.com/google/go-github/v63/github"
"github.com/urfave/cli/v2"
yml "gopkg.in/yaml.v3"

api "github.com/go-vela/server/api/types"
"github.com/go-vela/server/internal"
Expand Down Expand Up @@ -208,11 +208,11 @@ func TestNative_Compile_StagesPipeline(t *testing.T) {
Secrets: pipeline.StepSecretSlice{
&pipeline.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&pipeline.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down Expand Up @@ -548,11 +548,11 @@ func TestNative_Compile_StepsPipeline(t *testing.T) {
Secrets: pipeline.StepSecretSlice{
&pipeline.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&pipeline.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down Expand Up @@ -786,11 +786,11 @@ func TestNative_Compile_StagesPipelineTemplate(t *testing.T) {
Secrets: pipeline.StepSecretSlice{
&pipeline.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&pipeline.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down Expand Up @@ -1033,11 +1033,11 @@ func TestNative_Compile_StepsPipelineTemplate(t *testing.T) {
Secrets: pipeline.StepSecretSlice{
&pipeline.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&pipeline.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down Expand Up @@ -1972,7 +1972,7 @@ func Test_client_modifyConfig(t *testing.T) {
Name: "docker",
Pull: "always",
Parameters: map[string]interface{}{
"init_options": map[interface{}]interface{}{
"init_options": map[string]interface{}{
"get_plugins": "true",
},
},
Expand Down Expand Up @@ -2005,7 +2005,7 @@ func Test_client_modifyConfig(t *testing.T) {
Name: "docker",
Pull: "always",
Parameters: map[string]interface{}{
"init_options": map[interface{}]interface{}{
"init_options": map[string]interface{}{
"get_plugins": "true",
},
},
Expand Down Expand Up @@ -3583,11 +3583,11 @@ func Test_CompileLite(t *testing.T) {
Secrets: yaml.StepSecretSlice{
{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
Image: "plugins/docker:18.09",
Expand Down Expand Up @@ -3699,11 +3699,11 @@ func Test_CompileLite(t *testing.T) {
Secrets: yaml.StepSecretSlice{
{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
Image: "plugins/docker:18.09",
Expand Down
8 changes: 4 additions & 4 deletions compiler/native/expand_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,15 @@ func TestNative_ExpandStepsMulti(t *testing.T) {
Secrets: yaml.StepSecretSlice{
{
Source: "vault_token",
Target: "vault_token",
Target: "VAULT_TOKEN",
},
},
Parameters: map[string]interface{}{
"addr": "vault.example.com",
"auth_method": "token",
"username": "octocat",
"items": []interface{}{
map[interface{}]interface{}{"path": "docker", "source": "secret/docker"},
map[string]interface{}{"path": "docker", "source": "secret/docker"},
},
},
},
Expand All @@ -602,15 +602,15 @@ func TestNative_ExpandStepsMulti(t *testing.T) {
Secrets: yaml.StepSecretSlice{
{
Source: "vault_token",
Target: "vault_token",
Target: "VAULT_TOKEN",
},
},
Parameters: map[string]interface{}{
"addr": "vault.example.com",
"auth_method": "token",
"username": "octocat",
"items": []interface{}{
map[interface{}]interface{}{"path": "docker", "source": "secret/docker"},
map[string]interface{}{"path": "docker", "source": "secret/docker"},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io"
"os"

"github.com/buildkite/yaml"
"gopkg.in/yaml.v3"

"github.com/go-vela/server/compiler/template/native"
"github.com/go-vela/server/compiler/template/starlark"
Expand Down
12 changes: 6 additions & 6 deletions compiler/native/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ func TestNative_Parse_Parameters(t *testing.T) {
Secrets: yaml.StepSecretSlice{
&yaml.StepSecret{
Source: "docker_username",
Target: "docker_username",
Target: "DOCKER_USERNAME",
},
&yaml.StepSecret{
Source: "docker_password",
Target: "docker_password",
Target: "DOCKER_PASSWORD",
},
},
},
Expand Down Expand Up @@ -302,11 +302,11 @@ func TestNative_Parse_StagesPipeline(t *testing.T) {
Secrets: yaml.StepSecretSlice{
&yaml.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&yaml.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down Expand Up @@ -407,11 +407,11 @@ func TestNative_Parse_StepsPipeline(t *testing.T) {
Secrets: yaml.StepSecretSlice{
&yaml.StepSecret{
Source: "docker_username",
Target: "registry_username",
Target: "REGISTRY_USERNAME",
},
&yaml.StepSecret{
Source: "docker_password",
Target: "registry_password",
Target: "REGISTRY_PASSWORD",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion compiler/native/substitute.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"strings"

"github.com/buildkite/yaml"
"github.com/drone/envsubst"
"gopkg.in/yaml.v3"

types "github.com/go-vela/types/yaml"
)
Expand Down
2 changes: 1 addition & 1 deletion compiler/template/native/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package native
import (
"strings"

"github.com/buildkite/yaml"
"gopkg.in/yaml.v3"

"github.com/go-vela/types/raw"
)
Expand Down
2 changes: 1 addition & 1 deletion compiler/template/native/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"text/template"

"github.com/Masterminds/sprig/v3"
"github.com/buildkite/yaml"
"gopkg.in/yaml.v3"

"github.com/go-vela/types/raw"
types "github.com/go-vela/types/yaml"
Expand Down
2 changes: 1 addition & 1 deletion compiler/template/native/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"testing"

goyaml "github.com/buildkite/yaml"
"github.com/google/go-cmp/cmp"
goyaml "gopkg.in/yaml.v3"

"github.com/go-vela/types/raw"
"github.com/go-vela/types/yaml"
Expand Down
2 changes: 1 addition & 1 deletion compiler/template/starlark/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"errors"
"fmt"

yaml "github.com/buildkite/yaml"
"go.starlark.net/starlark"
"go.starlark.net/starlarkstruct"
yaml "gopkg.in/yaml.v3"

"github.com/go-vela/types/raw"
types "github.com/go-vela/types/yaml"
Expand Down
2 changes: 1 addition & 1 deletion compiler/template/starlark/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"testing"

goyaml "github.com/buildkite/yaml"
"github.com/google/go-cmp/cmp"
goyaml "gopkg.in/yaml.v3"

"github.com/go-vela/types/raw"
"github.com/go-vela/types/yaml"
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ require (
github.com/adhocore/gronx v1.8.1
github.com/alicebob/miniredis/v2 v2.33.0
github.com/aws/aws-sdk-go v1.54.20
github.com/buildkite/yaml v0.0.0-20181016232759-0caa5f0796e3
github.com/distribution/reference v0.6.0
github.com/drone/envsubst v1.0.3
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.10.0
github.com/go-playground/assert/v2 v2.2.0
github.com/go-vela/types v0.24.0
github.com/go-vela/types v0.24.1-0.20240826141537-76a66e72d5dc
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v63 v63.0.0
Expand Down Expand Up @@ -52,6 +51,7 @@ require (
golang.org/x/oauth2 v0.21.0
golang.org/x/sync v0.7.0
golang.org/x/time v0.5.0
gopkg.in/yaml.v3 v3.0.1
gorm.io/driver/postgres v1.5.9
gorm.io/driver/sqlite v1.5.6
gorm.io/gorm v1.25.11
Expand Down Expand Up @@ -148,7 +148,6 @@ require (
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4
github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-test/deep v1.0.2 h1:onZX1rnHT3Wv6cqNgYyFOOlgVKJrksuCMCRvJStbMYw=
github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/go-vela/types v0.24.0 h1:KkkiXxw3uHckh/foyadmLY1YnLw6vhZbz9XwqONCj6o=
github.com/go-vela/types v0.24.0/go.mod h1:YWj6BIapl9Kbj4yHq/fp8jltXdGiwD/gTy1ez32Rzag=
github.com/go-vela/types v0.24.1-0.20240826141537-76a66e72d5dc h1:VyT2tBwPVO9fMmn+22TC4rY4dp+d71To/Qo5Vk4cOSo=
github.com/go-vela/types v0.24.1-0.20240826141537-76a66e72d5dc/go.mod h1:WcSiFm8cWuErRw4aI08NrfM+SZzidnbUs2fmO5klFKo=
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down
2 changes: 1 addition & 1 deletion mock/server/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"strings"

yml "github.com/buildkite/yaml"
"github.com/gin-gonic/gin"
yml "gopkg.in/yaml.v3"

"github.com/go-vela/types"
"github.com/go-vela/types/library"
Expand Down

0 comments on commit 093b912

Please sign in to comment.