diff --git a/.github/workflows/build-schema.yml b/.github/workflows/build-schema.yml index 4dc59cbd5..bdc5c3d9e 100644 --- a/.github/workflows/build-schema.yml +++ b/.github/workflows/build-schema.yml @@ -3,14 +3,12 @@ name: Platform Schema (OpenAPI) on: push: branches: - - master - - develop - - backports** + - main-platform1 + - stable** pull_request: branches: - - master - - develop - - backports** + - main-platform1 + - stable** workflow_dispatch: inputs: ods_branch: @@ -26,10 +24,10 @@ on: jobs: ods_tools: if: inputs.ods_branch != '' - uses: OasisLMF/ODS_Tools/.github/workflows/build.yml@develop + uses: OasisLMF/ODS_Tools/.github/workflows/build.yml@main secrets: inherit with: - ods_branch: ${{ github.event_name != 'workflow_dispatch' && 'develop' || inputs.ods_branch }} + ods_branch: ${{ github.event_name != 'workflow_dispatch' && 'main' || inputs.ods_branch }} schema: if: ${{ ! failure() || ! cancelled() }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index db369bb75..952124918 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,11 +3,6 @@ name: Platform Release on: workflow_dispatch: inputs: - pre_release: - description: 'Mark GitHub release as pre-release' - required: false - type: boolean - push_latest: description: 'Push images with the "latest" tag' required: false @@ -19,7 +14,7 @@ on: piwind_branch: description: 'Branch to build piwind from' - default: 'develop' + default: 'main' required: true prev_release_tag: @@ -68,7 +63,7 @@ jobs: build_piwind: - uses: OasisLMF/OasisPiWind/.github/workflows/build.yml@master + uses: OasisLMF/OasisPiWind/.github/workflows/build.yml@main secrets: inherit needs: build_images with: @@ -106,15 +101,16 @@ jobs: dir_ktools: ${{ github.workspace }}/ktools branch_platform: ${{ github.ref_name }} - branch_oasislmf: 'master' - branch_ktools: 'master' + branch_oasislmf: 'main' + branch_ods_tools: 'main' + branch_ktools: 'main' steps: ## RELEASE CHECKS - name: check branchname is valid for release - if: ${{ !startsWith(github.ref_name , 'release/') && !startsWith(github.ref_name, 'backports/') }} + if: ${{ !startsWith(github.ref_name , 'release/') && !startsWith(github.ref_name, 'stable/') }} run: | - echo "Releases must be trigged on branchs 'release/x.x.x' or 'backports/x.x.x' " + echo "Releases must be trigged on branchs 'release/x.x.x' or 'stable/x.x.x' " exit 1 - name: Check tag is valid for release @@ -135,8 +131,8 @@ jobs: exit 1 fi - - name: set Oasislmf to backports - if: startsWith(github.ref_name, 'backports/') + - name: set Oasislmf to stable + if: startsWith(github.ref_name, 'stable/') run: echo "branch_oasislmf=${{ env.branch_platform }}" >> $GITHUB_ENV ## CLONE REPOS (plat / oasislmf / ktools / UI) @@ -442,7 +438,7 @@ jobs: # --- Notify Slack --- # slack: - uses: OasisLMF/OasisLMF/.github/workflows/notify.yml@master + uses: OasisLMF/OasisLMF/.github/workflows/notify.yml@main secrets: inherit needs: release with: diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 61bc39791..e53f6b827 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -3,14 +3,12 @@ name: Platform Vulnerability Scanning on: push: branches: - - master - - develop - - backports** + - main-platform1 + - stable** pull_request: branches: - - master - - develop - - backports** + - main-platform1 + - stable** schedule: - cron: '0 */6 * * *' # Run scan every 6 hours diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index ff612ef82..47fc6f0d7 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -3,16 +3,12 @@ name: Platform Image Tests on: push: branches: - - master - - develop - - backports** - + - main-platform1 + - stable** pull_request: branches: - - master - - develop - - backports** - + - main-platform1 + - stable** workflow_dispatch: inputs: last_release: @@ -21,7 +17,7 @@ on: piwind_branch: description: "Check Results from Piwind branch [git ref]" required: true - default: 'develop' + default: 'main' pytest_options: description: "Pytest optional args [-k ]" required: false @@ -48,8 +44,8 @@ jobs: docker_push: true ignore_unfixed: true cve_severity: ${{ github.event_name != 'workflow_dispatch' && 'CRITICAL' || inputs.cve_severity }} - oasislmf_branch: ${{ github.event_name != 'workflow_dispatch' && 'develop' || inputs.oasislmf_branch }} - ods_branch: ${{ github.event_name != 'workflow_dispatch' && 'develop' || inputs.ods_branch }} + oasislmf_branch: ${{ github.event_name != 'workflow_dispatch' && 'main' || inputs.oasislmf_branch }} + ods_branch: ${{ github.event_name != 'workflow_dispatch' && 'main' || inputs.ods_branch }} setup: runs-on: ubuntu-latest @@ -90,6 +86,7 @@ jobs: - name: Select PiWind branch id: piwind run: | + # Select matching base branch on piwind if [[ "${{ github.event_name }}" = "pull_request" ]]; then BRANCH=${{ github.base_ref }} elif [[ "${{ github.event_name }}" = "push" ]]; then @@ -97,8 +94,14 @@ jobs: else BRANCH=${{ inputs.piwind_branch }} fi + + #override 'main-platform1' -> 'main' + if [[ "$BRANCH" = 'main-platform1' ]]; then + BRANCH=main + fi echo "branch=$BRANCH" >> $GITHUB_OUTPUT + - name: Select Pytest Options id: pytest run: | @@ -131,7 +134,7 @@ jobs: name: Server Compatibility (${{ needs.setup.outputs.release_tag }}) secrets: inherit needs: [setup] - uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@master + uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@main with: piwind_branch: ${{ needs.setup.outputs.piwind_branch }} server_image: ${{ needs.setup.outputs.build_server_img }} @@ -146,7 +149,7 @@ jobs: name: Worker Debian secrets: inherit needs: [setup] - uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@develop + uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@main with: piwind_branch: ${{ needs.setup.outputs.piwind_branch }} server_image: ${{ needs.setup.outputs.build_server_img }} @@ -161,7 +164,7 @@ jobs: name: Worker Compatibility (${{ needs.setup.outputs.release_tag }}) secrets: inherit needs: [setup] - uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@develop + uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@main with: piwind_branch: ${{ needs.setup.outputs.piwind_branch }} server_image: 'coreoasis/api_server' @@ -176,7 +179,7 @@ jobs: name: Storage Compatibility (S3) secrets: inherit needs: [setup] - uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@develop + uses: OasisLMF/OasisPiWind/.github/workflows/integration.yml@main with: piwind_branch: ${{ needs.setup.outputs.piwind_branch }} server_image: ${{ needs.setup.outputs.build_server_img }} diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index bea8833a9..84c751d94 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -3,14 +3,12 @@ name: Platform Python Tests on: push: branches: - - master - - develop - - backports** + - main-platform1 + - stable** pull_request: branches: - - master - - develop - - backports** + - main-platform1 + - stable** workflow_dispatch: inputs: ods_branch: @@ -47,11 +45,6 @@ jobs: - name: Run Pytest run: pytest --cov-config=tox.ini --junitxml=${{ github.workspace }}/pytest_report.xml --cov=src --cov-report=xml --cov-report=term - # - name: Run Tox - # run: | - # pip install tox - # tox -e py - - name: Generate Report uses: dorny/test-reporter@v1 if: success() || failure() # run this step even if previous step failed diff --git a/README.md b/README.md index 32875915a..f3ad17253 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![ktools version](https://img.shields.io/github/tag/Oasislmf/ktools?label=ktools)](https://github.com/OasisLMF/ktools/releases) [![PyPI version](https://badge.fury.io/py/oasislmf.svg)](https://badge.fury.io/py/oasislmf) -# Oasis Platform +# Oasis Platform 1 Provides core components of the Oasis platform, specifically: * DJango application that provides the Oasis REST API * Celery worker for running a model