diff --git a/.github/workflows/build-schema.yml b/.github/workflows/build-schema.yml index 9648fda7b..67814d94e 100644 --- a/.github/workflows/build-schema.yml +++ b/.github/workflows/build-schema.yml @@ -3,12 +3,10 @@ name: Platform Schema (OpenAPI) on: push: branches: - - platform-2.0 - - platform-2.0-develop + - main pull_request: branches: - - platform-2.0 - - platform-2.0-develop + - main workflow_dispatch: inputs: ods_branch: @@ -24,10 +22,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 1689da98c..02813e800 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ on: piwind_branch: description: 'Branch to build piwind from' - default: 'develop' + default: 'main' required: true prev_release_tag: @@ -72,7 +72,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: @@ -114,16 +114,16 @@ jobs: dir_ktools: ${{ github.workspace }}/ktools branch_platform: ${{ github.ref_name }} - branch_oasislmf: 'master' - branch_ods_tools: '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 @@ -144,8 +144,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) @@ -448,7 +448,7 @@ jobs: docker push coreoasis/piwind_worker:${{ env.release_tag }} #- name: Push images (Production) - # if: ${{ env.pre_release == 'false' && !startsWith(github.ref_name, 'backports/') }} + # if: ${{ env.pre_release == 'false' && !startsWith(github.ref_name, 'stable/') }} # run: | # docker push coreoasis/api_server:latest # docker push coreoasis/model_worker:latest @@ -504,7 +504,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-external.yml b/.github/workflows/scan-external.yml index 26fce9dd0..eec7851b7 100644 --- a/.github/workflows/scan-external.yml +++ b/.github/workflows/scan-external.yml @@ -3,10 +3,10 @@ name: External Vulnerability Scanning on: push: branches: - - platform-2.0 + - main pull_request: branches: - - platform-2.0 + - main workflow_dispatch: inputs: diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index c7e18b371..1cf7c5bdc 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -3,12 +3,10 @@ name: Platform Vulnerability Scanning on: push: branches: - - platform-2.0 - - platform-2.0-develop + - main pull_request: branches: - - platform-2.0 - - platform-2.0-develop + - main schedule: - cron: '0 */6 * * *' # Run scan every 6 hours diff --git a/.github/workflows/test-images.yml b/.github/workflows/test-images.yml index 687712991..5066b6f74 100644 --- a/.github/workflows/test-images.yml +++ b/.github/workflows/test-images.yml @@ -3,14 +3,10 @@ name: Platform Image Tests on: push: branches: - - platform-2.0 - - platform-2.0-develop - + - main pull_request: branches: - - platform-2.0 - - platform-2.0-develop - + - main workflow_dispatch: inputs: last_release: @@ -19,7 +15,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 @@ -45,9 +41,10 @@ jobs: with: docker_push: true ignore_unfixed: true - cve_severity: ${{ github.event_name != 'workflow_dispatch' && 'CRITICAL,HIGH' || 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 }} + #cve_severity: ${{ github.event_name != 'workflow_dispatch' && 'CRITICAL,HIGH' || inputs.cve_severity }} + cve_severity: ${{ github.event_name != 'workflow_dispatch' && 'SKIP' || inputs.cve_severity }} + 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 @@ -89,23 +86,19 @@ 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 }} - if [[ "${{ github.base_ref }}" = 'platform-2.0' ]]; then - BRANCH=master - else - BRANCH=develop - fi + BRANCH=${{ github.base_ref }} elif [[ "${{ github.event_name }}" = "push" ]]; then - #BRANCH=${{ github.ref_name }} - if [[ "${{ github.base_ref }}" = 'platform-2.0' ]]; then - BRANCH=master - else - BRANCH=develop - fi + BRANCH=${{ github.ref_name }} else BRANCH=${{ inputs.piwind_branch }} - fi + fi + + #override 'main-platform1' -> 'main' + if [[ "$BRANCH" = 'main-platform1' ]]; then + BRANCH=main + fi echo "branch=$BRANCH" >> $GITHUB_OUTPUT @@ -141,7 +134,7 @@ jobs: name: PiWind all checks 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 }} @@ -156,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 }} @@ -171,7 +164,7 @@ jobs: # name: Server 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: ${{ needs.setup.outputs.build_server_img }} @@ -186,7 +179,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' @@ -201,7 +194,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 479fcefcb..ed6332d85 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -3,12 +3,10 @@ name: Platform Python Tests on: push: branches: - - platform-2.0 - - platform-2.0-develop + - main pull_request: branches: - - platform-2.0 - - platform-2.0-develop + - main workflow_dispatch: inputs: ods_branch: @@ -18,10 +16,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 }} unittest: needs: ods_tools diff --git a/README.md b/README.md index 6c5e7670e..3fe0e1724 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![Platform Vulnerability Scanning](https://github.com/OasisLMF/OasisPlatform/actions/workflows/scan.yml/badge.svg?branch=master)](https://github.com/OasisLMF/OasisPlatform/actions/workflows/scan.yml) -# Oasis Platform +# Oasis Platform 2 Provides core components of the Oasis platform, specifically: * DJango application that provides the Oasis REST API * Celery worker for running a model diff --git a/kubernetes/worker-controller/requirements.txt b/kubernetes/worker-controller/requirements.txt index a70f770e7..a32dff1ce 100644 --- a/kubernetes/worker-controller/requirements.txt +++ b/kubernetes/worker-controller/requirements.txt @@ -28,7 +28,7 @@ multidict==6.0.2 # yarl python-dateutil==2.8.2 # via kubernetes-asyncio -pyyaml==6.0 +pyyaml==5.3.1 # via kubernetes-asyncio six==1.16.0 # via diff --git a/requirements-worker.txt b/requirements-worker.txt index 9f5b28dea..181a56a60 100644 --- a/requirements-worker.txt +++ b/requirements-worker.txt @@ -56,6 +56,7 @@ click==8.1.3 # click-didyoumean # click-plugins # click-repl + # cligj # fiona click-didyoumean==0.3.0 # via celery @@ -213,6 +214,7 @@ six==1.16.0 # azure-core # click-repl # isodate + # munch # pathlib2 # python-dateutil sqlalchemy==1.4.47