diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d89cfd95c..f2435ab34 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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. @@ -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 @@ -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 diff --git a/compiler/native/compile.go b/compiler/native/compile.go index a1f259400..16c6ff7c9 100644 --- a/compiler/native/compile.go +++ b/compiler/native/compile.go @@ -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" @@ -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 { diff --git a/go.mod b/go.mod index a417873a3..44d95e1db 100644 --- a/go.mod +++ b/go.mod @@ -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