Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.0.5 #9

Merged
merged 10 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
freeradius CHANGELOG
cookbook-freeradius CHANGELOG
===============

## 0.0.5

- Miguel Negron
- [9e19d79] lint resources
- [d506038] lint recipes
- [722c45c] lint providers
- [679071e] lint libraries
- [3e63952] lint attributes
- [2ff458b] Update README.md
- [b4ece9c] Update rpm.yml
- [cf14abe] Update metadata.rb

0.0.1
-----
[vimesa]
Expand Down
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# cookbook-freeradius
[![Build Status][build-shield]][build-url]
[![Linters][linters-shield]][linters-url]
[![License][license-shield]][license-url]

<!-- Badges -->
[build-shield]: https://github.com/redBorder/cookbook-freeradius/actions/workflows/rpm.yml/badge.svg?branch=master
[build-url]: https://github.com/redBorder/cookbook-freeradius/actions/workflows/rpm.yml?query=branch%3Amaster
[linters-shield]: https://github.com/redBorder/cookbook-freeradius/actions/workflows/lint.yml/badge.svg?event=push
[linters-url]: https://github.com/redBorder/cookbook-freeradius/actions/workflows/lint.yml
[license-shield]: https://img.shields.io/badge/license-AGPLv3-blue.svg
[license-url]: https://github.com/cookbook-freeradius/blob/HEAD/LICENSE

Chef cookbook to install and configure freeradius-rb

Cookbook to install and configure freeradius-rb
### Platforms

- Rocky Linux 9

## Authors
Vicente Mesa <vimesa@redborder.com>
Eduardo Reyes <eareyes@redborder.com>
### Chef

- Chef 15.7.0 or later

## Contributing

1. Fork the repository on Github
2. Create a named feature branch (like `add_component_x`)
3. Write your change
4. Write tests for your change (if applicable)
5. Run the tests, ensuring they all pass
6. Submit a Pull Request using Github

## License

GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
6 changes: 2 additions & 4 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#default attributes
#

default["freeradius"]["registered"] = false
# default attributes
default['freeradius']['registered'] = false
3 changes: 1 addition & 2 deletions resources/libraries/rbfreeradius_helpers.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module Rbfreeradius
module Helpers

end
end
end
9 changes: 4 additions & 5 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name 'freeradius'
maintainer 'redborder'
maintainer_email 'vimesa@redborder.com'
license 'All rights reserved'
maintainer 'Eneo Tecnología S.L.'
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-freeradius'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.4'
version '0.0.5'
Loading
Loading