Skip to content

Commit

Permalink
Merge pull request #13 from redBorder/development
Browse files Browse the repository at this point in the history
Release 1.0.7
  • Loading branch information
nilsver authored Jun 4, 2024
2 parents be33347 + 5450fe5 commit 6430d28
Show file tree
Hide file tree
Showing 11 changed files with 188 additions and 192 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
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# chef-server CHANGELOG
cookbook-chef-server CHANGELOG
===============

## 1.0.7


- Miguel Negron
- [7602d84] lint resources
- [a56d9d7] lint recipes
- [4fc36e0] lint providers
- [537dffe] lint attributes

## 0.0.1
- [cjmateos] - 3ba8f0e Fix in providers/config.rb
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# Chef-server Cookbook
# cookbook-chef-server
[![Build Status][build-shield]][build-url]
[![Linters][linters-shield]][linters-url]
[![License][license-shield]][license-url]

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

Chef cookbook to install and configure redborder Chef-server

### Platforms

- Rocky Linux 9

### Chef

- Chef 12.0 or later
- Chef 15.7.0 or later

## Contributing

Expand All @@ -20,7 +31,5 @@ cookbook to install and configure redborder Chef-server
6. Submit a Pull Request using Github

## License
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007

## Authors
Authors: Enrique Jimenez <[email protected]>
GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
44 changes: 11 additions & 33 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
default["chef-server"]["services"]["chef"] = true
default["chef-server"]["services"]["nginx"] = true
default["chef-server"]["services"]["postgresql"] = true

default["chef-server"]["chef_middleware"] = [
"bookshelf",
"oc_bifrost",
"oc_id",
"opscode-erchef",
"redis_lb",
"opensearch"
]




default["chef-server"]["services_list"] = [
"postgresql",
"nginx",
"bookshelf",
"oc_bifrost",
"oc_id",
"opscode-erchef",
"redis_lb",
"opensearch"
]

default["chef-server"]["services_dir"] = "/opt/opscode/service"

#flags
default["chef-server"]["installed"] = false
default["chef-server"]["datastore_configured"] = false
default["chef-server"]["registered"] = false
default['chef-server']['services']['chef'] = true
default['chef-server']['services']['nginx'] = true
default['chef-server']['services']['postgresql'] = true
default['chef-server']['chef_middleware'] = %w(bookshelf oc_bifrost oc_id opscode-erchef redis_lb opensearch)
default['chef-server']['services_list'] = %w(postgresql nginx bookshelf oc_bifrost oc_id opscode-erchef redis_lb opensearch)
default['chef-server']['services_dir'] = '/opt/opscode/service'

# flags
default['chef-server']['installed'] = false
default['chef-server']['datastore_configured'] = false
default['chef-server']['registered'] = false
10 changes: 4 additions & 6 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name 'chef-server'
maintainer 'Redborder'
maintainer_email 'ejimenez@redborder.com'
license 'All rights reserved'
maintainer 'Eneo Tecnología S.L.'
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures chef-server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.0.6'

version '1.0.7'
Loading

0 comments on commit 6430d28

Please sign in to comment.