Skip to content

Commit d3082b9

Browse files
Merge remote-tracking branch 'remotes/from/ce/main'
2 parents ed85b29 + 3a108ea commit d3082b9

27 files changed

+138
-53
lines changed

.github/workflows/build-hcp-image.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: build-hcp-image
33
on:
44
workflow_call:
55
inputs:
6+
branch:
7+
type: string
68
pull-request:
79
type: number
810
create-azure-image:

.github/workflows/build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,20 @@ jobs:
395395
hcp-image:
396396
if: |
397397
needs.setup.outputs.is-ent-branch == 'true' &&
398-
needs.setup.outputs.workflow-trigger == 'pull_request' &&
399-
(
400-
contains(fromJSON(needs.setup.outputs.labels), 'hcp/build-image') ||
401-
contains(fromJSON(needs.setup.outputs.labels), 'hcp/test')
398+
needs.setup.outputs.workflow-trigger == 'schedule' ||
399+
( needs.setup.outputs.workflow-trigger == 'pull_request' &&
400+
(
401+
contains(fromJSON(needs.setup.outputs.labels), 'hcp/build-image') ||
402+
contains(fromJSON(needs.setup.outputs.labels), 'hcp/test')
403+
)
402404
)
403405
needs:
404406
- setup
405407
- artifacts-ent
406408
uses: ./.github/workflows/build-hcp-image.yml
407409
with:
408-
pull-request: ${{ github.event.pull_request.number }}
410+
pull-request: ${{ needs.setup.outputs.workflow-trigger == 'pull_request' && github.event.pull_request.number || '' }}
411+
branch: ${{ needs.setup.outputs.workflow-trigger == 'schedule' && 'main' || '' }}
409412
create-aws-image: true
410413
create-azure-image: false
411414
hcp-environment: int
@@ -481,6 +484,7 @@ jobs:
481484
- hcp-image
482485
uses: ./.github/workflows/test-run-enos-scenario-cloud.yml
483486
with:
487+
hcp-environment: int
484488
product-version: ${{ fromJSON(needs.hcp-image.outputs.image).product_version }}
485489

486490
completed-successfully:

.github/workflows/test-run-enos-scenario-cloud.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: enos-cloud
44
on:
55
workflow_call:
66
inputs:
7+
hcp-environment:
8+
type: string
79
product-version:
810
type: string
911

tools/pipeline/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/Masterminds/semver v1.5.0
1010
github.com/PuerkitoBio/goquery v1.11.0
1111
github.com/avast/retry-go/v4 v4.6.1
12-
github.com/google/go-github/v74 v74.0.0
12+
github.com/google/go-github/v81 v81.0.0
1313
github.com/hashicorp/hcl/v2 v2.24.0
1414
github.com/hashicorp/releases-api v0.2.3
1515
github.com/jedib0t/go-pretty/v6 v6.6.8

tools/pipeline/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
8181
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
8282
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
8383
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
84-
github.com/google/go-github/v74 v74.0.0 h1:yZcddTUn8DPbj11GxnMrNiAnXH14gNs559AsUpNpPgM=
85-
github.com/google/go-github/v74 v74.0.0/go.mod h1:ubn/YdyftV80VPSI26nSJvaEsTOnsjrxG3o9kJhcyak=
84+
github.com/google/go-github/v81 v81.0.0 h1:hTLugQRxSLD1Yei18fk4A5eYjOGLUBKAl/VCqOfFkZc=
85+
github.com/google/go-github/v81 v81.0.0/go.mod h1:upyjaybucIbBIuxgJS7YLOZGziyvvJ92WX6WEBNE3sM=
8686
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
8787
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
8888
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=

tools/pipeline/internal/cmd/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"os"
1010
"path/filepath"
1111

12-
"github.com/google/go-github/v74/github"
12+
"github.com/google/go-github/v81/github"
1313
"github.com/hashicorp/vault/tools/pipeline/internal/pkg/git"
1414
"github.com/shurcooL/githubv4"
1515
"github.com/spf13/cobra"

tools/pipeline/internal/cmd/github_find_workflow_artifact.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var findWorkflowArtifact = &github.FindWorkflowArtifactReq{}
1515

1616
func newGithubFindWorkflowArtifactCmd() *cobra.Command {
1717
findWorkflowArtifactCmd := &cobra.Command{
18-
Use: "workflow-artifact [--pr 1234 --workflow build --pattern 'vault_[0-9]'",
18+
Use: "workflow-artifact [--pr 1234 | --branch main] [--workflow build --pattern 'vault_[0-9]' ]",
1919
Short: "Find an artifact associated with a pull requests workflow run",
2020
Long: "Find an artifact associated with a pull requests workflow run",
2121
RunE: runFindGithubWorkflowArtifactCmd,
@@ -26,6 +26,7 @@ func newGithubFindWorkflowArtifactCmd() *cobra.Command {
2626
findWorkflowArtifactCmd.PersistentFlags().StringVarP(&findWorkflowArtifact.Owner, "owner", "o", "hashicorp", "The Github organization")
2727
findWorkflowArtifactCmd.PersistentFlags().StringVarP(&findWorkflowArtifact.Repo, "repo", "r", "vault", "The Github repository. Private repositories require auth via a GITHUB_TOKEN env var")
2828
findWorkflowArtifactCmd.PersistentFlags().IntVarP(&findWorkflowArtifact.PullNumber, "pr", "p", 0, "The pull request to use as the trigger of the workflow")
29+
findWorkflowArtifactCmd.PersistentFlags().StringVarP(&findWorkflowArtifact.Branch, "branch", "b", "", "The branch to use as the trigger of the workflow")
2930
findWorkflowArtifactCmd.PersistentFlags().StringVarP(&findWorkflowArtifact.WorkflowName, "workflow", "w", "", "The name of the workflow the artifact will be associated with")
3031
findWorkflowArtifactCmd.PersistentFlags().BoolVar(&findWorkflowArtifact.WriteToGithubOutput, "github-output", false, "Whether or not to write 'workflow-artifact' to $GITHUB_OUTPUT")
3132

tools/pipeline/internal/pkg/changed/checkers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"context"
88
"testing"
99

10-
"github.com/google/go-github/v74/github"
10+
"github.com/google/go-github/v81/github"
1111
"github.com/stretchr/testify/require"
1212
)
1313

tools/pipeline/internal/pkg/changed/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"slices"
99
"strings"
1010

11-
gh "github.com/google/go-github/v74/github"
11+
gh "github.com/google/go-github/v81/github"
1212
)
1313

1414
type (

tools/pipeline/internal/pkg/github/add_assignees.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"log/slog"
99
"slices"
1010

11-
libgithub "github.com/google/go-github/v74/github"
11+
libgithub "github.com/google/go-github/v81/github"
1212
slogctx "github.com/veqryn/slog-context"
1313
)
1414

0 commit comments

Comments
 (0)