Build and Validate Packages (Reusable) #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Version: v1.9 | ||
| # Reusable workflow for building and validating DBmaestro packages | ||
| # Can be called from other workflows with different configurations | ||
| # Accepts a list of packages to build and validate | ||
| name: Build and Validate Packages (Reusable) | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| agent_jar_path: | ||
| description: 'Path to DBmaestro agent JAR file' | ||
| required: false | ||
| type: string | ||
| default: '/home/runner/DBmaestroAgent.jar' | ||
| auth_type: | ||
| description: 'Authentication type' | ||
| required: false | ||
| type: string | ||
| default: 'DBmaestroAccount' | ||
| dbmaestro_server: | ||
| description: 'DBmaestro server hostname' | ||
| required: true | ||
| dbmaestro_user: | ||
| description: 'DBmaestro username' | ||
| required: true | ||
| package_type: | ||
| description: 'Package type (Regular or AdHoc)' | ||
| required: false | ||
| type: string | ||
| default: 'Regular' | ||
| packages_folder: | ||
| description: 'Root folder containing packages' | ||
| required: false | ||
| type: string | ||
| default: 'packages' | ||
| packages_matrix: | ||
| description: 'JSON array of packages to build (e.g., [{"package":"V15"},{"package":"V16"}])' | ||
| required: true | ||
| type: string | ||
| project_name: | ||
| description: 'DBmaestro project name' | ||
| required: true | ||
| type: string | ||
| runner: | ||
| description: 'Runner type (ubuntu-latest or self-hosted)' | ||
| required: false | ||
| type: string | ||
| default: 'ubuntu-latest' | ||
| use_ssl: | ||
| description: 'Use SSL for DBmaestro connection' | ||
| required: false | ||
| type: string | ||
| default: 'True' | ||
| secrets: | ||
| DBMAESTRO_PASSWORD: | ||
| description: 'DBmaestro password or token' | ||
| required: true | ||
| jobs: | ||
| create_package: | ||
| name: Create Package | ||
| runs-on: ${{ inputs.runner }} | ||
| strategy: | ||
| max-parallel: 1 | ||
| matrix: | ||
| item: ${{ fromJson(inputs.packages_matrix) }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - name: Create Package using Action | ||
| uses: DBMaestroDev/github/.github/actions/sh/create-package@v1 | ||
| with: | ||
| agent_jar_path: ${{ inputs.agent_jar_path }} | ||
| auth_type: ${{ inputs.auth_type }} | ||
| dbmaestro_password: ${{ secrets.DBMAESTRO_PASSWORD }} | ||
| dbmaestro_server: ${{ inputs.dbmaestro_server }} | ||
| dbmaestro_user: ${{ inputs.dbmaestro_user }} | ||
| package_name: ${{ matrix.item.package }} | ||
| package_type: ${{ inputs.package_type }} | ||
| packages_folder: ${{ inputs.packages_folder }} | ||
| project_name: ${{ inputs.project_name }} | ||
| use_ssl: ${{ inputs.use_ssl }} | ||
| validate_package: | ||
| name: Validate Package | ||
| runs-on: ${{ inputs.runner }} | ||
| needs: create_package | ||
| strategy: | ||
| max-parallel: 1 | ||
| matrix: | ||
| item: ${{ fromJson(inputs.packages_matrix) }} | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - name: Precheck Package using Action | ||
| uses: DBMaestroDev/github/.github/actions/sh/precheck-package@v1 | ||
| with: | ||
| agent_jar_path: ${{ inputs.agent_jar_path }} | ||
| auth_type: ${{ inputs.auth_type }} | ||
| dbmaestro_password: ${{ secrets.DBMAESTRO_PASSWORD }} | ||
| dbmaestro_server: ${{ inputs.dbmaestro_server }} | ||
| dbmaestro_user: ${{ inputs.dbmaestro_user }} | ||
| package_name: ${{ matrix.item.package }} | ||
| project_name: ${{ inputs.project_name }} | ||
| use_ssl: ${{ inputs.use_ssl }} | ||