Skip to content

Write push result output variables#1765

Merged
eddymoulton merged 11 commits intomainfrom
ap/add-push-result-output-vars
Feb 13, 2026
Merged

Write push result output variables#1765
eddymoulton merged 11 commits intomainfrom
ap/add-push-result-output-vars

Conversation

@APErebus
Copy link
Contributor

@APErebus APErebus commented Feb 10, 2026

Updates output variables to correctly track commited changes for each application and source.

We're tracking:

  • Commit SHA
  • Short SHA
  • PR title
  • PR url
  • PR number

These values will be used for subsequent operations, such as:

  • Waiting for the raised PR to be merged
  • Determining which commit Octopus has made it's changes on

Example result for a direct commit

[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].CommitSha] = '2e4e752201502099ce74ab3641dc70a4d255f723' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].ShortSha] = '2e4e752201'

Multi-source direct commit

[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-manifests-yaml-multisource-test].Source[0].CommitSha] = '6ddf850cb9a29b22703a911185935fe3d683c7d7' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-manifests-yaml-multisource-test].Source[0].ShortSha] = '6ddf850cb9' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-manifests-yaml-multisource-test].Source[1].CommitSha] = '323c6344a7001d911254f3e43e80299dadd2d3bc' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-manifests-yaml-multisource-test].Source[1].ShortSha] = '323c6344a7' 

Pull request

[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].CommitSha] = '4e61beba829ba9dc2a13075f0e0494a02ed43401' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].PullRequest.Number] = '1' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].PullRequest.Title] = 'Octopus Deploy updated image versions' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].PullRequest.Url] = 'https://github.com/xxx/yyy/pull/1' 
[Octopus.Action[Update Image Tags].Output.ArgoCD.Gateway[terraform-argo-gateway].Application[update-image-tags-yaml-octopub-test].Source[0].ShortSha] = '4e61beba82' 

Note: There is currently a known issue where multiple ArgoCD applications with the exact same source and using the direct commit method will not have this data reported. This is not addressed in this PR.

(PR taken over by @eddymoulton)

Closes MD-1514

@APErebus APErebus marked this pull request as draft February 10, 2026 01:49
Copy link
Contributor

@eddymoulton eddymoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach seems fine to me 🤷

@eddymoulton eddymoulton marked this pull request as ready for review February 13, 2026 03:02
Copy link
Contributor Author

@APErebus APErebus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

}


var result = new PushResult(commit.Sha, commit.ShortSha());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: It would be clearer if we just short circuited and returned the push result here

Copy link
Contributor

@flin-8 flin-8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eddymoulton eddymoulton merged commit 3fcba62 into main Feb 13, 2026
33 checks passed
@eddymoulton eddymoulton deleted the ap/add-push-result-output-vars branch February 13, 2026 05:47
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

Successfully merging this pull request may close these issues.

3 participants