NewProject creates a new project resource, using default settings from the server. NOT tenanted VersioningStrategy is template based NOT version controlled
(spaceID string, projectID string, projectName string, lifecycleID string, projectGroupID string, deploymentProcessID string)
| 65 | // VersioningStrategy is template based |
| 66 | // NOT version controlled |
| 67 | func NewProject(spaceID string, projectID string, projectName string, lifecycleID string, projectGroupID string, deploymentProcessID string) *projects.Project { |
| 68 | result := projects.NewProject(projectName, lifecycleID, projectGroupID) |
| 69 | result.ID = projectID |
| 70 | result.VersioningStrategy = &projects.VersioningStrategy{ |
| 71 | Template: "#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.NextPatch}", // this is the default |
| 72 | } |
| 73 | result.PersistenceSettings = projects.NewDatabasePersistenceSettings() |
| 74 | result.DeploymentProcessID = deploymentProcessID |
| 75 | result.TenantedDeploymentMode = core.TenantedDeploymentModeUntenanted |
| 76 | result.Links = map[string]string{ |
| 77 | "Channels": fmt.Sprintf("/api/%s/projects/%s/channels{/id}{?skip,take,partialName}", spaceID, projectID), |
| 78 | "DeploymentProcess": fmt.Sprintf("/api/%s/projects/%s/deploymentprocesses", spaceID, projectID), |
| 79 | "DeploymentSettings": fmt.Sprintf("/api/%s/projects/%s/deploymentsettings", spaceID, projectID), |
| 80 | "Releases": fmt.Sprintf("/api/%s/projects/%s/releases{/version}{?skip,take,searchByVersion}", spaceID, projectID), |
| 81 | } |
| 82 | return result |
| 83 | } |
| 84 | |
| 85 | func NewVersionControlledProject(spaceID string, projectID string, projectName string, lifecycleID string, projectGroupID string, deploymentProcessID string) *projects.Project { |
| 86 | repoUrl, _ := url.Parse("https://server/repo.git") |
no outgoing calls