Skip to content

Commit

Permalink
fix(patch): apply fixes for v0.25.1 (#1203)
Browse files Browse the repository at this point in the history
* fix(patch): apply fixes for v0.25.1

* upgrade types
  • Loading branch information
ecrupper authored Oct 4, 2024
1 parent 23e4c60 commit 0db9ba6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/init@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/autobuild@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -72,4 +72,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
uses: github/codeql-action/analyze@6db8d6351fd0be61f9ed8ebd12ccd35dcec51fea # v3.26.11
28 changes: 13 additions & 15 deletions compiler/native/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/hashicorp/go-retryablehttp"

api "github.com/go-vela/server/api/types"
"github.com/go-vela/server/internal"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/types/pipeline"
Expand Down Expand Up @@ -62,22 +61,21 @@ func (c *client) Compile(ctx context.Context, v interface{}) (*pipeline.Build, *
event = event + ":" + action
}

// populate metadata when not provided using compiler.WithMetadata
if c.metadata == nil {
c.metadata = &internal.Metadata{Database: &internal.Database{}, Queue: &internal.Queue{}, Source: &internal.Source{}, Vela: &internal.Vela{}}
}

// create the ruledata to purge steps
r := &pipeline.RuleData{
Branch: c.build.GetBranch(),
Comment: c.comment,
Event: event,
Path: c.files,
Repo: c.repo.GetFullName(),
Tag: strings.TrimPrefix(c.build.GetRef(), "refs/tags/"),
Target: c.build.GetDeploy(),
Label: c.labels,
Instance: c.metadata.Vela.Address,
Branch: c.build.GetBranch(),
Comment: c.comment,
Event: event,
Path: c.files,
Repo: c.repo.GetFullName(),
Tag: strings.TrimPrefix(c.build.GetRef(), "refs/tags/"),
Target: c.build.GetDeploy(),
Label: c.labels,
}

// add instance when we have the metadata (local exec will not)
if c.metadata != nil && c.metadata.Vela != nil {
r.Instance = c.metadata.Vela.Address
}

switch {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-vela/server

go 1.23.1
go 1.23.2

require (
github.com/Bose/minisentinel v0.0.0-20200130220412-917c5a9223bb
Expand All @@ -16,7 +16,7 @@ require (
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.25.0
github.com/go-vela/types v0.25.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v65 v65.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27
github.com/go-playground/validator/v10 v10.22.1/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.25.0 h1:5jSXgW8uf2ODbhOiWdVmKtbznF/CfNIzkZSYuNQIars=
github.com/go-vela/types v0.25.0/go.mod h1:gyKVRQjNosAJy4AJ164CnEF6jIkwd1y6Cm5pZ6M20ZM=
github.com/go-vela/types v0.25.1 h1:DCPHv1+ouqldjfsjfcVTcm/Yyd0OwazIfxYyR+GwpMo=
github.com/go-vela/types v0.25.1/go.mod h1:5+MHUI9ZSY2Uz1cTJa64FWUv8jKzzUUq96UQTokGJzs=
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

0 comments on commit 0db9ba6

Please sign in to comment.