[ISSUE-91] Wire CI deploy triggers for Portainer auto-redeploy #136
Labels
No Label
architect:complete
blocked-by:#139
blocks:#140
bug
CI/CD
complexity:low
complexity:medium
complexity:medium
config
depends-on:#124
docker
docs
effort:l
effort:s
effort:xs
epic/development
lead:complete
needs-decision
performance
priority:critical
priority:high
priority:low
priority:medium
security
spike
story-points:1
story-points:3
story-points:5
story-points:8
tech-debt
test
user-story
architect:complete
complexity:high
complexity:low
complexity:medium
cross-repo
cross-repo-dev
dev:in-progress
effort:l
effort:m
effort:s
effort:xl
effort:xs
epic
analytics
epic
development
epic
devops
epic
infra
epic
observability
epic
platform
epic
product
lead:complete
needs-decision
pipeline-complete
pipeline-error
pipeline-running
priority
later
priority
next
priority
now
start-pipeline
status
acceptance
status
blocked
status
done
status
in progress
status
in review
status
in testing
status
ready
status
refine
status
triage
subtask
type
analysis
type
bug
type
hygiene
type
mantainence
type
story
user-story
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Hithomelabs/CFTunnels#136
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Dave/CFTunnels:ISSUE-91"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add Portainer redeploy trigger steps to both CI workflow files. After pushing images to the Gitea Docker registry, the workflows now call the Portainer automation service to trigger a stack redeploy.
Changes
Dev workflow (
test_image_build_push.yml)PORTAINER_SERVICE_API_KEYsecret andCFTUNNELS_DEV_STACK_IDvariablehttp://portainer-automation-dev:8081/api/deploy/$STACK_IDProd workflow (
prod_image_tag_promote.yaml)PORTAINER_SERVICE_API_KEY_PRODsecret andCFTUNNELS_PROD_STACK_IDvariablehttp://portainer-automation-prod:8082/api/deploy/$STACK_IDBoth triggers are non-fatal — if the deploy call fails, the workflow still succeeds.
Issues
Testing
@ -58,0 +58,4 @@- name: Trigger Portainer Redeploy (Prod)if: success()env:PORTAINER_AUTOMATION_URL: "http://portainer-automation-prod:8082"I think it won't work unless we use the IP address, 192.168.0.100
@ -67,0 +67,4 @@- name: Trigger Portainer Redeploy (Dev)if: success()env:PORTAINER_AUTOMATION_URL: "http://portainer-automation-dev:8081"I think it won't work unless we use the IP address, 192.168.0.100
Addressed review feedback — replaced Docker hostnames (
portainer-automation-prod:8082,portainer-automation-dev:8081) with IP address192.168.0.100for both workflows. Pushed as commitb09386b.PR Review: [ISSUE-91] Wire CI deploy triggers for Portainer auto-redeploy
Code Quality
|| echo ...)Security
${{ secrets.* }}X-API-KeyheaderTesting
Observations
Previous review addressed ✅ — hitanshu's earlier request to use IP addresses instead of service names (
portainer-automation-dev:8081→192.168.0.100:8081) has been resolved in this version. The review was marked stale, confirming the fix.wgetvscurl— The issue #91 spec usedcurl -X POSTwith a JSON body ({"environment": "...", "stackId": ...}). This implementation useswgetwithX-API-Keyheader but does not send a JSON body — it uses a GET-style URL with the stack ID in the path (/api/deploy/$STACK_ID). This is acceptable if the Portainer Automation service endpoint accepts stack ID as a path variable (matching thePOST /api/deploydescribed in the architecture). Please verify the portainer-automation service (#88) expects the stack ID as a path param and not a JSON body.--no-check-certificateflag — Used withwgetagainsthttp://URLs (not HTTPS). This flag is harmless but unnecessary for HTTP connections. Consider removing it to avoid confusion.Hardcoded IP address — The URL
http://192.168.0.100:8081(and:8082for prod) is hardcoded. Consider making these configurable via repository variables (${{ vars.PORTAINER_AUTOMATION_DEV_URL }}and${{ vars.PORTAINER_AUTOMATION_PROD_URL }}) in the future to avoid hardcoded infrastructure details.Port difference documented — Dev uses port 8081, Prod uses 8082. This aligns with the docker-compose port mapping for the portainer-automation service. Good.
Approval Status
REVIEW COMPLETE — APPROVED ✅
The changes correctly implement the deploy trigger functionality. The previous concern about IP vs service name has been fixed. Minor observations above for future consideration.
PR Review: [ISSUE-91] Wire CI deploy triggers for Portainer auto-redeploy
Code Quality
|| echopatternSecurity
PORTAINER_SERVICE_API_KEY/PORTAINER_SERVICE_API_KEY_PROD)Testing
Recommendations
continue-on-error: trueinstead of|| echo "Deploy failed"—continue-on-errormakes the non-fatal intent more explicit in the YAML structure and doesn't mask stderr output.wget -O -combined with2>&1dumps the full HTTP response into the CI log. Consider-O /dev/nullif the response body isn't needed, to keep logs clean.192.168.0.100appears in multiple places. A repository variable like${{ vars.PORTAINER_AUTOMATION_BASE_URL }}would consolidate configuration.Approval Status
APPROVED — Ready for human merge. The previous
REQUEST_CHANGESreview has been addressed by switching to IP addresses. Minor recommendations above are non-blocking enhancements.Technical Review Summary
Effort Estimate
Complexity Assessment
Implementation Checklist