Repository navigation
ci: test the Jenkins build workflow, same-repo branch (do not merge) - #253
venkatesan-krishnamoorthy wants to merge 4 commits into
Conversation
Empty commit to start ti_platforms_jenkins.yaml with the repository secrets. Do not merge. Signed-off-by: Venkatesan Krishnamoorthy <v-krishnamoorthy@ti.com>
Empty commit to check that a push cancels the running Jenkins builds. Do not merge. Signed-off-by: Venkatesan Krishnamoorthy <v-krishnamoorthy@ti.com>
Jenkins build of the TI platformsCommit
|
⏩ Board tests skippedCommit Board tests were not run because other checks on this commit failed: Compliance Checks, Run compliance checks on patch series (PR). Fix those first; the boards will run on the next push. |
Start zsod_utils_twister_build_all, which builds the platforms in parallel, instead of one Jenkins build per GitHub job. Cancelling the run stops the master and the master stops its workers. Signed-off-by: Venkatesan Krishnamoorthy <v-krishnamoorthy@ti.com>
| echo "Jenkins master result: $RESULT" | ||
|
|
||
| # one PLATFORM_RESULT line per platform, printed by the master | ||
| curl -sf $JOPTS "${BUILD_URL}consoleText" | grep -o 'PLATFORM_RESULT: .*' | sort -u > "$RUNNER_TEMP/platforms.txt" || true |
There was a problem hiding this comment.
1. A green check can show no platform results 🐞 Bug ≡ Correctness
The build step suppresses failures while fetching and extracting PLATFORM_RESULT lines, then decides its status solely from the master build result. If the console request fails or contains no matching lines while the master reports SUCCESS, the workflow passes without any platform results.
Agent Prompt
## Issue description
A successful master build can yield a passing check even when its platform results cannot be read or are absent.
## Fix Focus Areas
- .github/workflows/ti_platforms_jenkins.yaml[110-120]
## Recommended Fix
Fail the build step when console retrieval or parsing fails, and require one valid result for each expected platform before returning success.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| ROWS+=$(printf '| %s | %s %s | [build](%sconsole) |\n' "$P" "$I" "$R" "$B")$'\n' | ||
| done < "$RUNNER_TEMP/platforms.txt" | ||
| if [[ -z "$ROWS" ]]; then | ||
| RES=$(cat "$RUNNER_TEMP/result.txt" 2>/dev/null || echo "not finished") |
There was a problem hiding this comment.
2. Early build failures lose their cause 🐞 Bug ◔ Observability
The workflow writes result.txt only after the master wait loop, while the comment step substitutes not finished when that file is absent. A missing secret, rejected build request, or queue-start timeout exits before that write, so the pull request comment no longer identifies the failure.
Agent Prompt
## Issue description
Early exits leave no result file, causing the pull request comment to say `not finished` instead of identifying an error or timeout.
## Fix Focus Areas
- .github/workflows/ti_platforms_jenkins.yaml[51-65]
- .github/workflows/ti_platforms_jenkins.yaml[79-95]
- .github/workflows/ti_platforms_jenkins.yaml[161-169]
## Recommended Fix
Initialize an error outcome and restore an exit trap that records it; set a timeout outcome on the queue-start timeout path.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| else | ||
| ID=$(basename "${TARGET%/}") | ||
| curl -s $JOPTS -o /dev/null -X POST -b "$jar" ${field:+-H "$field: $crumb"} \ | ||
| "${URL}/queue/cancelItem?id=${ID}" && echo "Removed the master from the queue" |
There was a problem hiding this comment.
3. Cancellation can leave the master running 🐞 Bug ☼ Reliability
The cancellation step chooses queue cancellation from the saved queue record without checking whether that item has become an executable build. If Jenkins starts the master after that record is written but before it is replaced with the build URL, cancelling the GitHub run targets the queue item rather than the running master.
Agent Prompt
## Issue description
A saved queue URL can refer to a master that has already started, so queue cancellation alone does not stop it.
## Fix Focus Areas
- .github/workflows/ti_platforms_jenkins.yaml[84-95]
- .github/workflows/ti_platforms_jenkins.yaml[127-145]
## Recommended Fix
When cancellation finds a queue record, query the item for its executable URL and stop that build if present; otherwise cancel the still-queued item.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| curl -s $JOPTS -o /dev/null -X POST -b "$jar" ${field:+-H "$field: $crumb"} \ | ||
| "${URL}/queue/cancelItem?id=${ID}" && echo "Removed the master from the queue" |
There was a problem hiding this comment.
4. Failed queue cancellation appears successful 🐞 Bug ◔ Observability
The new queue-cancellation request uses curl -s without checking the HTTP response before printing its success message. If Jenkins rejects the request or the item cannot be cancelled, the workflow can say it removed the master while Jenkins has not accepted the cancellation.
Agent Prompt
## Issue description
The new queue-cancellation path prints success for Jenkins HTTP error responses.
## Fix Focus Areas
- .github/workflows/ti_platforms_jenkins.yaml[141-145]
## Recommended Fix
Use a failing HTTP request or explicitly inspect the response status, and print success only after Jenkins accepts the cancellation; surface failures in the workflow log.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Empty commit to start the Jenkins master job from the workflow. Do not merge. Signed-off-by: Venkatesan Krishnamoorthy <v-krishnamoorthy@ti.com>
Test PR for
ti_platforms_jenkins.yaml. The head branch is in this repository, so the run gets theEPSW_JENKINS_*secrets. Empty commit. Do not merge.