diff --git a/.github/workflows/rpm.yml b/.github/workflows/rpm.yml index 03352e5..5d83b78 100644 --- a/.github/workflows/rpm.yml +++ b/.github/workflows/rpm.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - + - name: Create tag based on metadata.rb id: create_tag run: | @@ -26,38 +26,55 @@ jobs: echo "TAG=$TAG" >> $GITHUB_ENV shell: bash + - name: Check if Tag Exists + id: check_tag + run: | + if git rev-parse "refs/tags/${{ env.TAG }}" >/dev/null 2>&1; then + echo "Tag ${{ env.TAG }} already exists, exiting." + exit 1 + fi + shell: bash + - name: Set Version + if: success() run: echo "VERSION=${{ env.TAG }}" >> $GITHUB_ENV - name: Run Docker Container + if: success() run: docker run --privileged -d --name builder --network host rockylinux:9 /bin/sleep infinity - name: Install build tools RPM + if: success() run: | docker cp ./ builder:/build docker exec builder bash -c "yum install -y epel-release && yum install -y make git mock" docker exec builder bash -c "rm -rf /etc/mock/default.cfg" - name: Setup SDK + if: success() run: | docker exec builder bash -c "curl https://raw.githubusercontent.com/redBorder/repoinit/master/sdk9.cfg > /build/sdk9.cfg" docker exec builder bash -c "echo \"config_opts['use_host_resolv'] = True\" >> /build/sdk9.cfg" docker exec builder bash -c "ln -s /build/sdk9.cfg /etc/mock/default.cfg" - name: Build RPM using mock + if: success() run: | docker exec builder bash -c "git config --global --add safe.directory /build" docker exec builder bash -c "cd /build/ && VERSION=${{ env.TAG }} make rpm" - name: Copy RPMS + if: success() run: | docker cp builder:/build/packaging/rpm/pkgs/. ./rpms - name: Delete non-.rpm files + if: success() run: | find ./rpms -type f -not -name '*.rpm' -exec rm {} \; - name: Release + if: success() uses: softprops/action-gh-release@v1 with: files: ./rpms/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c577b9..a010391 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ cookbook-rb-common CHANGELOG =============== +## 0.1.0 + + - Miguel Negron + - [f744111] bugfix/#18983_rlimit_nginx_problem + - Miguel Negrón + - [9055703] Update README.md + - [d2f8e42] Update rpm.yml + - [a433f03] Update metadata.rb + ## 0.0.1 - Miguel Negrón diff --git a/README.md b/README.md index feffe04..da8245a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,15 @@ -# common Cookbook +# cookbook-rb-common +[![Build Status][build-shield]][build-url] +[![Linters][linters-shield]][linters-url] +[![License][license-shield]][license-url] + + +[build-shield]: https://github.com/redBorder/cookbook-rb-common/actions/workflows/rpm.yml/badge.svg?branch=master +[build-url]: https://github.com/redBorder/cookbook-rb-common/actions/workflows/rpm.yml?query=branch%3Amaster +[linters-shield]: https://github.com/redBorder/cookbook-rb-common/actions/workflows/lint.yml/badge.svg?event=push +[linters-url]: https://github.com/redBorder/cookbook-rb-common/actions/workflows/lint.yml +[license-shield]: https://img.shields.io/badge/license-AGPLv3-blue.svg +[license-url]: https://github.com/cookbook-rb-common/blob/HEAD/LICENSE Cookbook to configure common system redborder settings @@ -8,15 +19,7 @@ Cookbook to configure common system redborder settings ### Chef -- Chef 12.0 or later - -# BUILDING - -- Build rpm package for redborder platform: - * git clone https://github.com/redborder/cookbook-rb-common.git - * cd cookbook-rb-common - * make - * RPM packages is under packaging/rpm/pkgs/ +- Chef 15.7.0 or later ## Contributing @@ -28,7 +31,5 @@ Cookbook to configure common system redborder settings 6. Submit a Pull Request using Github ## License -GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 -## Authors -Miguel Negrón +GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 diff --git a/resources/attributes/default.rb b/resources/attributes/default.rb index 7cb980b..2f1442a 100755 --- a/resources/attributes/default.rb +++ b/resources/attributes/default.rb @@ -1,5 +1,5 @@ # require 'set' TODO: refactor to this # nofile settings (ulimits) default[:redborder][:nofile] = {} -default[:redborder][:nofile][:soft] = 8192 -default[:redborder][:nofile][:hard] = 8192 +default[:redborder][:nofile][:soft] = 65535 +default[:redborder][:nofile][:hard] = 65535 diff --git a/resources/metadata.rb b/resources/metadata.rb index deb4fdb..803fd48 100755 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -1,6 +1,6 @@ name 'rb-common' -maintainer 'Miguel Negron' -maintainer_email 'manegron@redborder.com' -license 'All rights reserved' +maintainer 'Eneo Tecnología S.L.' +maintainer_email 'git@redborder.com' +license 'AGPL-3.0' description 'Redborder common system settings' -version '0.0.1' +version '0.1.0'