Skip to content

Commit

Permalink
Merge pull request #3 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.1.0
  • Loading branch information
manegron authored Oct 10, 2024
2 parents 3971ead + 671a35f commit 2476f9f
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 20 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,63 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Create tag based on metadata.rb
id: create_tag
run: |
TAG=$(grep -o 'version\s*["'\''][^"'\'']*' ./resources/metadata.rb | sed 's/version\s*["'\'']//;s/["'\'']//')
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/*
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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]

<!-- Badges -->
[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

Expand All @@ -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

Expand All @@ -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 <[email protected]>
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
4 changes: 2 additions & 2 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit 2476f9f

Please sign in to comment.