Skip to content

chore: release workflow for codegen 3.0 - adjustments#12735

Merged
ewaostrowska merged 1 commit into
3.0.0from
3.0.0-release-fix
May 13, 2026
Merged

chore: release workflow for codegen 3.0 - adjustments#12735
ewaostrowska merged 1 commit into
3.0.0from
3.0.0-release-fix

Conversation

@ewaostrowska
Copy link
Copy Markdown
Contributor

This pull request refactors the CI/CD workflow for releasing and deploying the Swagger codegen and generator Docker images. The main improvements are the consolidation of Docker build and deployment steps into a reusable workflow, simplification of the deployment logic, and improved parameterization for easier configuration and maintenance.

Parameterization and Inputs:

  • The reusable workflow now accepts tag and deploy_online as inputs, with deploy_online defaulting to true, allowing flexible control over deployment to Rancher.
  • The workflow also supports secrets for DockerHub and Maven credentials, as well as an optional Rancher token for deployment.

Conditional Deployment:

  • The deploy step in the reusable workflow will only run if deploy_online is true, enabling orchestrator-level skip gates for deployment.

Environment and Variable Consistency:

  • The environment variable for the release tag is now consistently sourced from workflow inputs rather than GitHub event inputs, improving reliability when called as a reusable workflow.

Release Automation Script:

  • The release update script CI/release/update-codegen-release-files.py now also updates the Docker POM version to match the next snapshot, ensuring version consistency across release artifacts.

@ewaostrowska ewaostrowska requested a review from Copilot May 13, 2026 10:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the Codegen 3.0 release automation by moving Docker image build/push (and optional Rancher deployment) behind a reusable GitHub Actions workflow, and by extending the release file update script to keep pom.docker.xml’s version aligned during post-release snapshot bumps.

Changes:

  • Refactors release-codegen-3.yml to call the reusable docker-release-3.0.yml workflow instead of inlining Docker build/push and Rancher deploy steps.
  • Enhances docker-release-3.0.yml with workflow_call inputs (tag, deploy_online) and standardizes tag sourcing via inputs.tag.
  • Updates CI/release/update-codegen-release-files.py to also update pom.docker.xml version when transitioning back to the next snapshot.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
CI/release/update-codegen-release-files.py Adds post-release alignment of pom.docker.xml version to the next snapshot.
.github/workflows/release-codegen-3.yml Replaces the inline Docker/Rancher logic with a call to the reusable Docker release workflow and updates downstream job dependencies.
.github/workflows/docker-release-3.0.yml Adds reusable workflow interface (workflow_call), deploy_online gating, and consistent tag input sourcing.
Comments suppressed due to low confidence (1)

.github/workflows/docker-release-3.0.yml:168

  • The deploy step can run with inputs.deploy_online true even when secrets.RANCHER2_BEARER_TOKEN is not provided (it’s declared optional for workflow_call, and deploy_online defaults to true). In that case the script will attempt Rancher API calls with an empty token and may fail in confusing ways (or behave inconsistently depending on curl/jq output). Consider guarding the step with an explicit token check (or make the secret required when deploy_online is true) and failing fast with a clear error message when deployment is requested but the token is missing.
      - name: deploy
        if: ${{ inputs.deploy_online }}
        run: |
          echo "${{ env.TAG }}"

          TOKEN="${{ secrets.RANCHER2_BEARER_TOKEN }}"
          RANCHER_HOST="rancher.tools.swagger.io"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ewaostrowska ewaostrowska merged commit db1b20d into 3.0.0 May 13, 2026
9 checks passed
@ewaostrowska ewaostrowska deleted the 3.0.0-release-fix branch May 13, 2026 11:43
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