Skip to content

Re visit current tooling #35

Description

@craigpnnl

Current Tooling

This is the overall sequence diagram for the file https://github.com/eclipse-volttron/github-tooling/blob/main/.github/workflows/deploy-release.yml

GitHub Actions Workflow: Deploy Release Artifacts

This document provides an overview of the "Deploy Release Artifacts" GitHub Actions workflow. It includes a sequence diagram, a detailed description of each workflow step, and input parameters documentation.

sequenceDiagram
    actor GitHub
    participant Runner as GitHub Runner

    GitHub ->> Runner: Trigger workflow
    note right of Runner: Context steps
    Runner ->> Runner: Echo event details
    Runner ->> Runner: Checkout code
    note right of Runner: Merge dry-run
    Runner ->> Runner: Check merge conflicts
    alt Merge conflicts detected
        Runner ->> GitHub: Abort, require manual merge
    else No conflicts
        Runner ->> Runner: Continue merge process
    end
    note right of Runner: Set up environments
    Runner ->> Runner: Set up Python, Node, Poetry
    note right of Runner: Generate SBOM
    Runner ->> Runner: Install and run cdxgen and depscan
    note right of Runner: Manage release version
    alt Specific release-version provided
        Runner ->> Runner: Use provided version
    else Compute version from git
        Runner ->> Runner: Bump version using poetry
    end
    note right of Runner: Branch management
    Runner ->> Runner: Create and push release branch
    Runner ->> Runner: Merge back to main
    note right of Runner: Run tests and handle failures
    alt Tests pass
        Runner ->> Runner: Create build artifacts
    else Tests fail
        Runner ->> GitHub: Revert changes, delete branches
    end
    note right of Runner: Release and publish
    alt Publish to PyPI
        Runner ->> PyPI: Upload package
    else Publish to Test-PyPI
        Runner ->> Test-PyPI: Upload package
    end
    note right of Runner: Final merge
    Runner ->> Runner: Merge back to develop
Loading

Workflow Steps

  1. Trigger Workflow : The workflow is activated by a specific GitHub event.
  2. Checkout Code : Retrieve the repository code at the specified reference point.
  3. Dry Run Merge : Perform a dry-run merge to identify potential conflicts.
    • Abort and exit if conflicts are encountered and no merge strategy is provided.
  4. Environment Setup : Configure Python, Node.js, and install the required tools.
  5. SBOM Generation : Generate a Software Bill of Materials and a vulnerability report.
  6. Version Management :
    • Utilize a provided release version or compute a new version using Git tags.
  7. Branch Management :
    • Create and push a new branch for the release.
    • Merge changes back into the main branch.
  8. Run Tests : Execute tests on the main branch and manage failures.
  9. Create Build Artifacts : Build package artifacts in preparation for release.
  10. Publish Artifacts :
    • Optionally publish to PyPI or Test-PyPI.
    • Handle any publication failures by reverting and removing branches.
  11. Final Merge to Develop : Integrate successful release changes back into the develop branch.

Workflow Inputs

  • merge-strategy : (string) Options for merging in case of conflicts. Default: ''.
  • release-version : (string) Predefined version number to override the bump rule. Default: ''.
  • bump-rule : (string) Rule to determine the next version if no release-version is specified. Valid options: patch, minor, major, prepatch, preminor, premajor, prerelease. Default: prerelease.
  • run-tests-wait : (number) Delay time (in seconds) before executing tests after merging to main. Default: 600.
  • publish-option : (string) Destination for publication: pypi, test-pypi, or none. Default: none.

Secrets

  • git-token : Token for GitHub repository access (required).
  • pypi-token : Token for authenticating with PyPI services (required).

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions