From 6a8ce9ec86bf8af7b5c19f75784f233e1ee21587 Mon Sep 17 00:00:00 2001 From: Ivan Druzhitskiy Date: Thu, 28 Nov 2024 16:17:36 +0300 Subject: [PATCH] Update actions --- .github/workflows/build-packages.yml | 53 +++++++++++----------- .github/workflows/integration-tests.yml | 58 ++++++++++++------------- 2 files changed, 55 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 9f826682..15e04401 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -3,11 +3,10 @@ name: build-packages on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' - -jobs: + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" +jobs: build-release: runs-on: ubuntu-latest strategy: @@ -17,8 +16,8 @@ jobs: TARGET: "x86_64-unknown-linux-musl" BUILD_PROFILE: "release-lto" steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Set env variables and install packages run: | echo "BOB_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV @@ -48,7 +47,7 @@ jobs: - name: Check bobd version run: target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/bobd --version - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.1.7 with: name: bob-binaries-${{ matrix.bob_key_size }} path: | @@ -58,7 +57,7 @@ jobs: target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/bobc target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/ccg target/${{ env.TARGET }}/${{ env.BUILD_PROFILE_DIR }}/brt - + build-rpm: runs-on: ubuntu-latest needs: build-release @@ -66,8 +65,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -84,7 +83,7 @@ jobs: tar czf ./rpmbuild/SOURCES/bob-${{ env.VERSION }}.tar.gz ../${cur_dir_name}/{bobd,bobp,bobc,brt,ccg,linux-packages/bob_limits.conf,linux-packages/bob.service} ../${cur_dir_name}/config-examples/{cluster,node,logger}.yaml --transform s/${cur_dir_name}/bob-${{ env.VERSION }}/ rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" linux-packages/bob.spec - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.1.7 with: name: bob-rpm-${{ matrix.bob_key_size }} path: rpmbuild/RPMS/x86_64/bob-${{ env.VERSION }}-${{ github.run_id }}.x86_64.rpm @@ -97,8 +96,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -109,7 +108,7 @@ jobs: if: ${{ matrix.bob_key_size != 8 }} run: echo "asset_name_postfix=-key${{ matrix.bob_key_size }}" >> $GITHUB_ENV - name: Upload rpm to release - uses: svenstaro/upload-release-action@v2 + uses: svenstaro/upload-release-action@v4.1.7 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: bob-${{ env.VERSION }}-${{ github.run_id }}.x86_64.rpm @@ -124,8 +123,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -147,7 +146,7 @@ jobs: sed -i "s/current_version/${{ env.VERSION }}/" bob_${{ env.VERSION }}_amd64/DEBIAN/control dpkg-deb --build ./bob_${{ env.VERSION }}_amd64 - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.1.7 with: name: bob-deb-${{ matrix.bob_key_size }} path: bob_${{ env.VERSION }}_amd64.deb @@ -160,8 +159,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -172,7 +171,7 @@ jobs: if: ${{ matrix.bob_key_size != 8 }} run: echo "asset_name_postfix=_key${{ matrix.bob_key_size }}" >> $GITHUB_ENV - name: Upload deb to release - uses: svenstaro/upload-release-action@v2 + uses: svenstaro/upload-release-action@v4.1.7 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: bob_${{ env.VERSION }}_amd64.deb @@ -187,8 +186,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -207,7 +206,7 @@ jobs: cp linux-packages/bob_limits.conf bob_${{ env.VERSION }}/etc/security/limits.d/bob.conf zip -r bob_${{ env.VERSION }}.zip bob_${{ env.VERSION }} - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.1.7 with: name: bob-zip-${{ matrix.bob_key_size }} path: bob_${{ env.VERSION }}.zip @@ -220,8 +219,8 @@ jobs: matrix: bob_key_size: [8, 16] steps: - - name: Checks-out repository - uses: actions/checkout@v2 + - name: Checks-out repository + uses: actions/checkout@v4.1.7 - name: Download artifact uses: actions/download-artifact@v4.1.7 with: @@ -232,10 +231,10 @@ jobs: if: ${{ matrix.bob_key_size != 8 }} run: echo "asset_name_postfix=_key${{ matrix.bob_key_size }}" >> $GITHUB_ENV - name: Upload zip file to release - uses: svenstaro/upload-release-action@v2 + uses: svenstaro/upload-release-action@v4.1.7 with: repo_token: ${{ secrets.GITHUB_TOKEN }} file: bob_${{ env.VERSION }}.zip asset_name: bob_${{ env.VERSION }}${{ env.asset_name_postfix }}.zip tag: ${{ github.ref }} - overwrite: true \ No newline at end of file + overwrite: true diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 035c12ac..4b14162e 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -2,52 +2,52 @@ name: integration-tests on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+' + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" pull_request_review: types: [submitted] workflow_dispatch: inputs: bob_nodes_amount: - description: 'Amount of nodes in bob cluster for tests' + description: "Amount of nodes in bob cluster for tests" required: true - default: '4' + default: "4" quorum: - description: 'Quorum for bob cluster' + description: "Quorum for bob cluster" required: true - default: '2' + default: "2" bob_vdisk_count: - description: 'Vdisks count' + description: "Vdisks count" required: true - default: '4' + default: "4" bob_replicas_amount: - description: 'Amount of vdisks replicas' + description: "Amount of vdisks replicas" required: true - default: '2' + default: "2" bob_payload_size: - description: 'Payload size' + description: "Payload size" required: true - default: '10240' + default: "10240" bob_record_count: - description: 'Amount of records to process during test' + description: "Amount of records to process during test" required: true - default: '100000' + default: "100000" bob_first_index: - description: 'Index of the first record to proceed during tests' + description: "Index of the first record to proceed during tests" required: true - default: '0' + default: "0" bob_bobt_count: - description: 'Amount of iterations for bobt operation test' + description: "Amount of iterations for bobt operation test" required: true - default: '100000' + default: "100000" bob_bobt_first_index: - description: 'Bottom boundary for key in bobt test' + description: "Bottom boundary for key in bobt test" required: true - default: '0' + default: "0" bob_bobt_last_index: - description: 'Upper boundary for key in bobt test' + description: "Upper boundary for key in bobt test" required: true - default: '10000' + default: "10000" jobs: build-binaries: if: ${{ github.event_name != 'pull_request_review' || github.event.review.state == 'approved' }} @@ -59,7 +59,7 @@ jobs: BUILD_PROFILE: "integration-test" runs-on: ubuntu-latest steps: - - name: Checks-out repository + - name: Checks-out repository uses: actions/checkout@v3 - name: Set env variables and install packages run: | @@ -106,7 +106,7 @@ jobs: env: BUILD_PROFILE: "integration-test" steps: - - name: Checks-out repository + - name: Checks-out repository uses: actions/checkout@v3 - name: Set env run: | @@ -120,7 +120,7 @@ jobs: tags: | ${{ env.VERSION }}-key${{ matrix.key }} - name: Build image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4.1.7 with: outputs: type=image,name=qoollo/bob:${{ env.VERSION }}-key${{ matrix.key }} context: . @@ -162,7 +162,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: "3.x" - name: Setup default variables for auto runs run: | INPUT="${{ github.event.inputs.bob_nodes_amount }}" @@ -218,7 +218,7 @@ jobs: working-directory: ./integration-tests - name: Deploy docker containers run: | - ./deploy.py --path /tmp/generated_configs -d ${{ env.BOB_VDISK_COUNT }} -r ${{ env.BOB_REPLICAS_AMOUNT }} -nodes_amount ${{ env.BOB_NODES_AMOUNT }} -rest_min_port ${{ env.BOB_REST_MIN_PORT }} --cluster_start_waiting_time 5000 + ./deploy.py --path /tmp/generated_configs -d ${{ env.BOB_VDISK_COUNT }} -r ${{ env.BOB_REPLICAS_AMOUNT }} -nodes_amount ${{ env.BOB_NODES_AMOUNT }} -rest_min_port ${{ env.BOB_REST_MIN_PORT }} --cluster_start_waiting_time 5000 working-directory: ./integration-tests - name: Run write/read/exist tests run: | @@ -238,7 +238,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: "3.x" - name: Setup default variables for auto runs run: | INPUT="${{ github.event.inputs.bob_nodes_amount }}" @@ -314,7 +314,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: "3.x" - name: Setup default variables for auto runs run: | INPUT="${{ github.event.inputs.bob_nodes_amount }}"