Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4747 from hashicorp/pipelines/current-pipeline-re…
Browse files Browse the repository at this point in the history
…f-pipeline-step

Add “root pipeline” fields to jobs
  • Loading branch information
jgwhite authored Jun 1, 2023
2 parents 5b25f1e + bd726ac commit 454b1d4
Show file tree
Hide file tree
Showing 7 changed files with 4,485 additions and 4,311 deletions.
8,400 changes: 4,212 additions & 4,188 deletions pkg/server/gen/server.pb.go

Large diffs are not rendered by default.

126 changes: 102 additions & 24 deletions pkg/server/gen/server.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -721,33 +721,47 @@
},
{
"name": "pipeline.pipeline_id",
"description": "ID of the pipeline.",
"description": "ID of the current pipeline (the one containing the current step).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.pipeline_name",
"description": "Name of the pipeline.",
"description": "Name of the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.step",
"description": "Step name within the pipeline.",
"description": "Step name within the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.run_sequence",
"description": "Pipeline run sequence.",
"description": "Run sequence for the root pipeline.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
},
{
"name": "pipeline.root_pipeline_id",
"description": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.root_pipeline_name",
"description": "Name of the root pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "jobState",
"in": "query",
Expand Down Expand Up @@ -878,33 +892,47 @@
},
{
"name": "pipeline.pipeline_id",
"description": "ID of the pipeline.",
"description": "ID of the current pipeline (the one containing the current step).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.pipeline_name",
"description": "Name of the pipeline.",
"description": "Name of the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.step",
"description": "Step name within the pipeline.",
"description": "Step name within the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.run_sequence",
"description": "Pipeline run sequence.",
"description": "Run sequence for the root pipeline.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
},
{
"name": "pipeline.root_pipeline_id",
"description": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.root_pipeline_name",
"description": "Name of the root pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "jobState",
"in": "query",
Expand Down Expand Up @@ -1021,33 +1049,47 @@
},
{
"name": "pipeline.pipeline_id",
"description": "ID of the pipeline.",
"description": "ID of the current pipeline (the one containing the current step).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.pipeline_name",
"description": "Name of the pipeline.",
"description": "Name of the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.step",
"description": "Step name within the pipeline.",
"description": "Step name within the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.run_sequence",
"description": "Pipeline run sequence.",
"description": "Run sequence for the root pipeline.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
},
{
"name": "pipeline.root_pipeline_id",
"description": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.root_pipeline_name",
"description": "Name of the root pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pagination.page_size",
"description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. A value of zero will cause `page_size` to be defaulted.",
Expand Down Expand Up @@ -1200,33 +1242,47 @@
},
{
"name": "pipeline.pipeline_id",
"description": "ID of the pipeline.",
"description": "ID of the current pipeline (the one containing the current step).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.pipeline_name",
"description": "Name of the pipeline.",
"description": "Name of the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.step",
"description": "Step name within the pipeline.",
"description": "Step name within the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.run_sequence",
"description": "Pipeline run sequence.",
"description": "Run sequence for the root pipeline.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
},
{
"name": "pipeline.root_pipeline_id",
"description": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.root_pipeline_name",
"description": "Name of the root pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "jobState",
"in": "query",
Expand Down Expand Up @@ -1343,33 +1399,47 @@
},
{
"name": "pipeline.pipeline_id",
"description": "ID of the pipeline.",
"description": "ID of the current pipeline (the one containing the current step).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.pipeline_name",
"description": "Name of the pipeline.",
"description": "Name of the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.step",
"description": "Step name within the pipeline.",
"description": "Step name within the current pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.run_sequence",
"description": "Pipeline run sequence.",
"description": "Run sequence for the root pipeline.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
},
{
"name": "pipeline.root_pipeline_id",
"description": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`).",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pipeline.root_pipeline_name",
"description": "Name of the root pipeline.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pagination.page_size",
"description": "The max number of results per page that should be returned. If the number\nof available results is larger than `page_size`, a `next_page_token` is\nreturned which can be used to get the next page of results in subsequent\nrequests. A value of zero will cause `page_size` to be defaulted.",
Expand Down Expand Up @@ -11136,20 +11206,28 @@
"properties": {
"pipeline_id": {
"type": "string",
"title": "ID of the pipeline"
"title": "ID of the current pipeline (the one containing the current step)"
},
"pipeline_name": {
"type": "string",
"title": "Name of the pipeline"
"title": "Name of the current pipeline"
},
"step": {
"type": "string",
"description": "Step name within the pipeline."
"title": "Step name within the current pipeline"
},
"run_sequence": {
"type": "string",
"format": "uint64",
"title": "Pipeline run sequence"
"title": "Run sequence for the root pipeline"
},
"root_pipeline_id": {
"type": "string",
"title": "Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`)"
},
"root_pipeline_name": {
"type": "string",
"title": "Name of the root pipeline"
}
}
},
Expand Down
14 changes: 10 additions & 4 deletions pkg/server/proto/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1331,17 +1331,23 @@ message Ref {
}

message PipelineStep {
// ID of the pipeline
// ID of the current pipeline (the one containing the current step)
string pipeline_id = 1;

// Name of the pipeline
// Name of the current pipeline
string pipeline_name = 2;

// Step name within the pipeline.
// Step name within the current pipeline
string step = 3;

// Pipeline run sequence
// Run sequence for the root pipeline
uint64 run_sequence = 4;

// Name of the root pipeline (the one invoked in `waypoint pipeline run <pipeline>`)
string root_pipeline_id = 5;

// Name of the root pipeline
string root_pipeline_name = 6;
}

message ProjectTemplate {
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/ptypes/pipeline_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func (p uiPipelineProcessor) stepRefFromJob(job *pb.Job) *pb.Pipeline_Step_Pipel
Ref: &pb.Ref_Pipeline_Owner{
Owner: &pb.Ref_PipelineOwner{
Project: &pb.Ref_Project{Project: job.Application.Project},
PipelineName: job.Pipeline.PipelineName,
PipelineName: job.Pipeline.GetPipelineName(),
},
},
},
Expand Down
Loading

0 comments on commit 454b1d4

Please sign in to comment.