Auto-Deploy multiple projects

Triggers stopped working as before with upgrade to 2019.13

Here are logs. It looks like

  • machine(s) comes online
  • trigger for project A fires. works
  • warning is thrown, “Project B is eligible for auto deploy but another project is deploying, trying again in 30 sec”
  • 30 sec later: “Project B doesnt have an event that matches the trigger” --> trigger is same as project A

ProcessAutoDeployments.log.txt (5.8 KB)

I ahve removed trigger for project A, and project B still doesnt work. So maybe its something specific with this trigger on this project B

Have read everything here as well. dashboard green, events match, all should be good.

Hi Jay,

Thanks for getting in touch.

I’m having a look at the logs you sent and they are only showing one project being considered for auto deploy, Projects-102 which I think is Theranest - Telegraf. Like you mentioned, it seems to be working as expected.

Could you please send your trigger configurations? You can find them at /api/projecttriggers (a full url would look like https://myoctopus/api/projecttriggers).

Cheers,
Shane

{
“ItemType”: “ProjectTrigger”,
“TotalResults”: 4,
“ItemsPerPage”: 30,
“NumberOfPages”: 1,
“LastPageNumber”: 0,
“Items”: [
{
“Id”: “ProjectTriggers-101”,
“Name”: “Production Auto Deploy”,
“ProjectId”: “Projects-1”,
“IsDisabled”: false,
“Filter”: {
“FilterType”: “MachineFilter”,
“EnvironmentIds”: [
“Environments-2”
],
“Roles”: [
“WEB”,
“Hangfire Worker”,
“Reminder”,
“Scheduler”
],
“EventGroups”: [
“MachineAvailableForDeployment”
],
“EventCategories”: [],
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“Action”: {
“ActionType”: “AutoDeploy”,
“ShouldRedeployWhenMachineHasBeenDeployedTo”: false,
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“SpaceId”: “Spaces-1”,
“Description”: “”,
“Links”: {
“Self”: “/api/Spaces-1/projecttriggers/ProjectTriggers-101”,
“Project”: “/api/Spaces-1/projects/Projects-1”
}
},
{
“Id”: “ProjectTriggers-102”,
“Name”: “Stage Auto Deploy”,
“ProjectId”: “Projects-1”,
“IsDisabled”: false,
“Filter”: {
“FilterType”: “MachineFilter”,
“EnvironmentIds”: [
“Environments-3”
],
“Roles”: [
“WEB”,
“Hangfire Worker”,
“Scheduler”,
“Reminder”
],
“EventGroups”: [
“MachineAvailableForDeployment”
],
“EventCategories”: [],
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“Action”: {
“ActionType”: “AutoDeploy”,
“ShouldRedeployWhenMachineHasBeenDeployedTo”: false,
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“SpaceId”: “Spaces-1”,
“Description”: “”,
“Links”: {
“Self”: “/api/Spaces-1/projecttriggers/ProjectTriggers-102”,
“Project”: “/api/Spaces-1/projects/Projects-1”
}
},
{
“Id”: “ProjectTriggers-61”,
“Name”: “RunDailyCleanup”,
“ProjectId”: “Projects-24”,
“IsDisabled”: false,
“Filter”: {
“FilterType”: “OnceDailySchedule”,
“StartTime”: “2019-07-23T04:00:00.000Z”,
“DaysOfWeek”: [“Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”],
“Timezone”: “UTC”,
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“Action”: {
“ActionType”: “DeployNewRelease”,
“Variables”: null,
“EnvironmentId”: “Environments-1”,
“ChannelId”: “Channels-25”,
“TenantIds”: [],
“TenantTags”: [],
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“SpaceId”: “Spaces-1”,
“Description”: “”,
“Links”: {
“Self”: “/api/Spaces-1/projecttriggers/ProjectTriggers-61”,
“Project”: “/api/Spaces-1/projects/Projects-24”
}
},
{
“Id”: “ProjectTriggers-81”,
“Name”: “E2E Auto Deploy”,
“ProjectId”: “Projects-1”,
“IsDisabled”: false,
“Filter”: {
“FilterType”: “MachineFilter”,
“EnvironmentIds”: [
“Environments-81”
],
“Roles”: [
“Hangfire Worker”,
“Reminder”,
“Scheduler”,
“WEB”
],
“EventGroups”: [
“MachineAvailableForDeployment”
],
“EventCategories”: [],
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“Action”: {
“ActionType”: “AutoDeploy”,
“ShouldRedeployWhenMachineHasBeenDeployedTo”: false,
“Id”: null,
“LastModifiedOn”: null,
“LastModifiedBy”: null,
“Links”: {}
},
“SpaceId”: “Spaces-1”,
“Description”: “”,
“Links”: {
“Self”: “/api/Spaces-1/projecttriggers/ProjectTriggers-81”,
“Project”: “/api/Spaces-1/projects/Projects-1”
}
}
],
“Links”: {
“Self”: “/api/Spaces-1/projecttriggers”,
“Template”: “/api/Spaces-1/projecttriggers{?skip,take,ids,runbooks}”,
“Page.All”: “/api/Spaces-1/projecttriggers?skip=0&take=2147483647”,
“Page.Current”: “/api/Spaces-1/projecttriggers?skip=0&take=30”,
“Page.Last”: “/api/Spaces-1/projecttriggers?skip=0&take=30”
}
}

Production Auto Deploy is the one that isnt working. have remade it several times, tried removing role filters, tried removing environment filters, no luck. I havent tested the others yet (e2e, stage auto deploy)

Thanks Jay,

All of the triggers you sent related to Projects-1, have you deleted the trigger for Projects-102 that appears in the logs you sent?

Auto deploy processing should get a list of triggers for all enabled projects and then compare the machines to those project triggers. Is Projects-1 disabled by any chance? Would you mind sending /api/Spaces-1/projects/Projects-1? If there is sensitive information in there, send it through to support@octopus.com and I’ll pick it up.

Cheers,
Shane

OK, I sent a message to support email

@Shane_Gill - Any word on this? any troubleshooting you want me to try? Ive done just about everything i can think of. The data in sql looks fine, nothing out of the ordinary that i can see.

It really seems like something on the project level for “project-1” is preventing the triggers from being processed.

Well, I was able to clone the project and without changing anything, everything is working again on the new project. so weird.

Actually I take that back, things still arent wroking right.

THe telegraf project, 102, will trigger fine, but its like the trigger doesnt even get considered in the logs for the other project.

@Shane_Gill- Issue solved, the trigger wasnt working because, somehow the default lifecycle was changed on the project level. Not sure if that was introduced during an upgrade or by one of our users. Things are working as expected now.

Hi Jay,

It’s great that you were able to solve the problem. Just to confirm, the issue was that the machine was not part of project B’s lifecycle?

There was a recent change to Octopus where AutoDeploy strictly checks that a machine is part of the lifecycle of a project otherwise the machine is ignored. This could have potentially been the cause of the issue and I would like to confirm that was the case.

Cheers,
Ali

Yes, that was 100% the issue. We create our releases directly from teamcity, so we actually didnt even need to set the default lifecycle in octopus…

That may be a good candidate to update the auto-deploy docs. :stuck_out_tongue:

All good now, Thank you all though. That one really drove me crazy haha.