Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Projects with Version Control Enabled #1547

Open
sgoncalvesLGC opened this issue Aug 16, 2024 · 0 comments
Open

Issue with Projects with Version Control Enabled #1547

sgoncalvesLGC opened this issue Aug 16, 2024 · 0 comments

Comments

@sgoncalvesLGC
Copy link

Step template

Chain Deployment

Step version

26

Octopus version

2023.4.8354

Step template parameter inputs

No response

What happened

After changing the project to use config as code, the deployment process URL changed to the following:
/api/Spaces-XX/projects/Projects-XX/{gitRef}/deploymentprocesses
With this the deployment process / project information will not show on the endpoint as the deployment process is stored in our git repository.
As the config as code project can have multiple branches, we will need to specify which branch to look for in the deployment process.

So maybe a new parameter to say if uses config as code and another to define the git reference needed?

Reproduction steps

Change a project that uses the Step Template octopus-chain-deployment and enable config as code in it. When it tries to run it will fail with the following message:

╔═══════════════════════════════════════════════╗ 
║                                Creating Release                                                               ║ ╚═══════════════════════════════════════════════╝ 

Project: XX
Project Lifecycle: DB Generic Environments 
Channel: YY
	********app#/Spaces-1/projects/Projects-340 
The remote server returned an error: (404) Not Found.

More Information

In Python I was able to resolve the situation with the following code change (but in this case it needs an evaluation to check if the project has code as config or not):

     # Get project template
    ## Example without version control
    #uri = '{0}api/{1}/deploymentprocesses/deploymentprocess-{2}/template?channel={3}'.format(octopus_server_uri, space['Id'], project['Id'], channel['Id'])
    ## Example with version control
    uri = '{0}api/{1}/projects/{2}/{3}/deploymentprocesses/template?channel={4}'.format(octopus_server_uri, space['Id'], project['Id'], gitRef, channel['Id'])
    template = get_octopus_resource(uri, headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant