Skip to content

Commit

Permalink
add TODO placeholders and a deprecation notice for implicit tekton wo…
Browse files Browse the repository at this point in the history
…rkspace emptydir volumes
  • Loading branch information
gabemontero committed Nov 9, 2021
1 parent 03d96e2 commit 4ed5a62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/apis/build/v1alpha1/build_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ const (
// BuildSpec defines the desired state of Build
type BuildSpec struct {
// Source refers to the Git repository containing the
// source code to be built.
// source code to be built. Currently, a Tekton Workspace with an EmptyDir Binding
// is implicitly created to store the contents retrieved from the Git repository referenced
// here. However, that behavior is deprecated with the release of Shipwright v0.7.0, and will
// be replaced in v0.8.0 with the creation of an implicit Build Strategy Volume per the SHIP 22 Enhancement Proposal.
Source Source `json:"source"`

// Sources slice of BuildSource, defining external build artifacts complementary to VCS
Expand Down
8 changes: 8 additions & 0 deletions pkg/reconciler/buildrun/resources/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ const (
paramSourceRoot = "source-root"
paramSourceContext = "source-context"

//TODO when SHIP 22 is fully implemented, it calls for the removal of this tekton workspace/emptyDir volume,
// with it replaced with an explicit emptyDir volume that is applied for the source tree. A constant to
// declare this well known volume will probably still exist, but most likely we'll want to change the name,
// and move it out of taskrun.go and into where the build strategy volumes are implemented.
workspaceSource = "source"

inputParamBuilder = "BUILDER_IMAGE"
Expand Down Expand Up @@ -105,6 +109,8 @@ func GenerateTaskSpec(
Type: taskv1.ParamTypeString,
},
},
//TODO when SHIP 22 is fully implemented, it calls for the removal of this tekton workspace/emptyDir volume,
// with it replaced with an explicit emptyDir volume that is applied for the source tree
Workspaces: []v1beta1.WorkspaceDeclaration{
// workspace for the source files
{
Expand Down Expand Up @@ -264,6 +270,8 @@ func GenerateTaskRun(
Spec: v1beta1.TaskRunSpec{
ServiceAccountName: serviceAccountName,
TaskSpec: taskSpec,
//TODO when SHIP 22 is fully implemented, it calls for the removal of this tekton workspace/emptyDir volume,
// with it replaced with an explicit emptyDir volume that is applied for the source tree
Workspaces: []v1beta1.WorkspaceBinding{
// workspace for the source files
{
Expand Down

0 comments on commit 4ed5a62

Please sign in to comment.