Bug with renaming the project and API release

support

(G) #1

i made an auto-release creating container. everything worked.

So, i changed the project’s NAME. Now, the projectID has changed from 741 to 742.

so i query api for project by new name - i get 742. query by old name - null. ok

so,
when i make a POST to make a release, it will not create a release for 742.

curl -v POST “https://deploy.corp.f.com/api/releases” -d “{“ProjectId”:“Projects-742”,“Version”:“0.0.58”,“SelectedPackages”:[{“StepName”:“Deploy”,“Version”:“1.0.11”}]}” -H “accept: application/json” -H “X-Octopus-ApiKey: API-yourmom”|jq -C

in response it will create a release HOWEVER, the “SelectedPackages”: [], is empty. no release is created in UI.

if i post to 741, same release post, (mind that project no longer exists as it was the old name) - release is created with correct array in RESPONSE:

“SelectedPackages”: [
{
“StepName”: “Deploy”,
“ActionName”: “Deploy”,
“Version”: “1.0.11”
}
],

is there any fix for this?

here is full response making a post to 742(new name)

“Id”: “Releases-14700”,
“Assembled”: “2018-05-16T16:45:20.321+00:00”,
“ReleaseNotes”: null,
“ProjectId”: “Projects-742”,
“ChannelId”: “Channels-742”,
“ProjectVariableSetSnapshotId”: “variableset-Projects-742-s-0-S9Q9W”,
“LibraryVariableSetSnapshotIds”: [],
“ProjectDeploymentProcessSnapshotId”: “deploymentprocess-Projects-742-s-0-NU2WM”,
“SelectedPackages”: [],
“Version”: “0.0.588”,
“LastModifiedOn”: “2018-05-16T16:45:20.383+00:00”,
“LastModifiedBy”: “ad”,
“Links”: {
“Self”: “/api/releases/Releases-14700{?ignoreChannelRules}”,
“Project”: “/api/projects/Projects-742”,
“Progression”: “/api/releases/Releases-14700/progression”,
“Deployments”: “/api/releases/Releases-14700/deployments{?skip,take}”,
“DeploymentTemplate”: “/api/releases/Releases-14700/deployments/template”,
“Artifacts”: “/api/artifacts?regarding=Releases-14700”,
“ProjectVariableSnapshot”: “/api/variables/variableset-Projects-742-s-0-S9Q9W”,
“ProjectDeploymentProcessSnapshot”: “/api/deploymentprocesses/deploymentprocess-Projects-742-s-0-NU2WM”,
“Web”: “/app#/releases/Releases-14700”,
“SnapshotVariables”: “/api/releases/Releases-14700/snapshot-variables”,
“Defects”: “/api/releases/Releases-14700/defects”,
“ReportDefect”: “/api/releases/Releases-14700/defects”,
“ResolveDefect”: “/api/releases/Releases-14700/defects/resolve”
}
}


(G) #2

figured out the issue.

so i curl for project name but curl finds all pattern matches

curl -X GET https://deploy.corp.vizientinc.com/api/projects/?Name=g_test -H “accept: application/json” -H "X-Octopus-ApiKey: “API-Uxxxxxxxxxxxxx -C -r ‘.Items[0] .Id’|sed 's/,$//g; s/”//g’

2 :
ag_test and - 742
g_test (what im looking for ) - 741


(Kenneth Bates) #4

Hi,

Thanks for getting in touch! That’s great you figured this out. Thanks for taking the time to outline your solution. Don’t hesitate to reach out if you have any questions going forward. :slight_smile:

Best regards,

Kenny


(system) #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.