From 7f46a96d1b39f79680ce5f9523cba76a9ae79cb0 Mon Sep 17 00:00:00 2001 From: Vladimir Ischenko Date: Sat, 25 Jan 2025 11:54:54 +0300 Subject: [PATCH] Test build OCI rpm old --- .github/workflows/build_packages.yml | 102 +++++++++++++-------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build_packages.yml b/.github/workflows/build_packages.yml index a4bc190c163..87867bce940 100644 --- a/.github/workflows/build_packages.yml +++ b/.github/workflows/build_packages.yml @@ -6,10 +6,8 @@ on: - 'release/**' - 'hotfix/**' - 'develop' + - 'feature/test-build-develop' paths: - - 'install/common/**' - - 'install/deb/**' - - 'install/rpm/**' - '.github/workflows/build_packages.yml' workflow_dispatch: inputs: @@ -43,9 +41,9 @@ env: PRODUCT_LOW: "docspace" BUILD_NUMBER: ${{ github.run_number }} PACKAGE_DIRECTORY: "/home/runner/work/${{ github.event.repository.name }}/${{ github.event.repository.name }}" - BRANCH_BUILDTOOLS: ${{ github.event.inputs.branch-buildtools != '' && github.event.inputs.branch-buildtools || github.ref_name || 'develop' }} - BRANCH_CLIENT: ${{ github.event.inputs.branch-client != '' && github.event.inputs.branch-client || github.ref_name || 'develop' }} - BRANCH_SERVER: ${{ github.event.inputs.branch-server != '' && github.event.inputs.branch-server || github.ref_name || 'develop' }} + BRANCH_BUILDTOOLS: 'feature/test-build-develop' + BRANCH_CLIENT: 'develop' + BRANCH_SERVER: 'develop' jobs: prepare: @@ -58,12 +56,12 @@ jobs: with: fetch-depth: 0 - - name: Determine changed - id: changes - run: | - git fetch --no-tags --prune --depth=2 - CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) - echo "build_all=$(echo "$CHANGED_FILES" | grep -qE '^.github/workflows/build_packages.yml' && echo true || echo false)" >> $GITHUB_OUTPUT + # - name: Determine changed + # id: changes + # run: | + # git fetch --no-tags --prune --depth=2 + # CHANGED_FILES=$(git diff --name-only HEAD~1 HEAD) + # echo "build_all=$(echo "$CHANGED_FILES" | grep -qE '^.github/workflows/build_packages.yml' && echo true || echo false)" >> $GITHUB_OUTPUT - name: Set matrix id: set-matrix run: | @@ -85,7 +83,9 @@ jobs: needs: prepare runs-on: ubuntu-22.04 strategy: - matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} + matrix: + include: + - packageType: rpm steps: - name: Checkout code uses: actions/checkout@v4 @@ -96,7 +96,7 @@ jobs: run: | PRODUCT_VERSION=$(grep -oP '\d+\.\d+\.\d+' <<< "${BRANCH_BUILDTOOLS//\//} ${BRANCH_CLIENT//\//} \ ${BRANCH_SERVER//\//}" | head -n1) - echo "PRODUCT_VERSION=${PRODUCT_VERSION:-3.0.1}" >> $GITHUB_ENV + echo "PRODUCT_VERSION=${PRODUCT_VERSION:-3.0.2}" >> $GITHUB_ENV - name: Free Disk Space run: | @@ -204,42 +204,42 @@ jobs: && echo "Success: $(basename "$rpm_package") uploaded." || echo "Error: Failed to upload $(basename "$rpm_package")" done - - name: Checking the DEB package for errors - if: matrix.packageType == 'deb' - run: | - lintian --profile debian ${PACKAGE_DIRECTORY}/install/*.deb | tee -a LINTIAN - if grep -qE '^(W:|E:)' LINTIAN; then - echo "::warning Noticedeb=lintian::$(cat LINTIAN | awk '/^W:/ { ws += 1 } /^E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" - fi - - - name: Checking the RPM package for errors - if: matrix.packageType == 'rpm' - run: | - for rpm_package in ${PACKAGE_DIRECTORY}/install/rpm/SPECS/RPMS/noarch/*.rpm; do - rpmlint --ignore-unused-rpmlintrc --rpmlintrc ${PACKAGE_DIRECTORY}/install/rpm/SPECS/SOURCES/${PRODUCT_LOW}.rpmlintrc $rpm_package | tee -a RPM_LINT - done - if grep -qE '(W:|E:)' RPM_LINT; then - echo "::warning Noticerpm=rpmlint::$(cat RPM_LINT | awk '/W:/ { ws += 1 } /E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" - fi + # - name: Checking the DEB package for errors + # if: matrix.packageType == 'deb' + # run: | + # lintian --profile debian ${PACKAGE_DIRECTORY}/install/*.deb | tee -a LINTIAN + # if grep -qE '^(W:|E:)' LINTIAN; then + # echo "::warning Noticedeb=lintian::$(cat LINTIAN | awk '/^W:/ { ws += 1 } /^E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" + # fi + + # - name: Checking the RPM package for errors + # if: matrix.packageType == 'rpm' + # run: | + # for rpm_package in ${PACKAGE_DIRECTORY}/install/rpm/SPECS/RPMS/noarch/*.rpm; do + # rpmlint --ignore-unused-rpmlintrc --rpmlintrc ${PACKAGE_DIRECTORY}/install/rpm/SPECS/SOURCES/${PRODUCT_LOW}.rpmlintrc $rpm_package | tee -a RPM_LINT + # done + # if grep -qE '(W:|E:)' RPM_LINT; then + # echo "::warning Noticerpm=rpmlint::$(cat RPM_LINT | awk '/W:/ { ws += 1 } /E:/ { es += 1 } END { print "Warnings:", ws, "Errors:", es }')" + # fi - trigger_oci: - name: Trigger ci-oci-install Workflow - needs: build - runs-on: ubuntu-22.04 - if: ${{ success() }} - steps: - - name: Trigger CI-OCI-Install Workflow - run: | - curl \ - -X POST \ - -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ - https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/actions/workflows/85067971/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - --data '{ - "ref": "'"${{ github.ref_name }}"'", - "inputs": { - "deb_build": "'"${{ github.event.inputs.deb_build }}"'", - "rpm_build": "'"${{ github.event.inputs.rpm_build }}"'" - } - }' + # trigger_oci: + # name: Trigger ci-oci-install Workflow + # needs: build + # runs-on: ubuntu-22.04 + # if: ${{ success() }} + # steps: + # - name: Trigger CI-OCI-Install Workflow + # run: | + # curl \ + # -X POST \ + # -u "${{ secrets.USERNAME}}:${{secrets.TOKEN}}" \ + # https://api.github.com/repos/ONLYOFFICE/DocSpace-buildtools/actions/workflows/85067971/dispatches \ + # -H "Accept: application/vnd.github.everest-preview+json" \ + # --data '{ + # "ref": "'"${{ github.ref_name }}"'", + # "inputs": { + # "deb_build": "'"${{ github.event.inputs.deb_build }}"'", + # "rpm_build": "'"${{ github.event.inputs.rpm_build }}"'" + # } + # }'