diff --git a/.github/workflows/rpm.yml b/.github/workflows/rpm.yml new file mode 100644 index 0000000..e5acf80 --- /dev/null +++ b/.github/workflows/rpm.yml @@ -0,0 +1,66 @@ +name: RPM Build and Upload + +on: + push: + branches: + - 'master' + - 'main' + +jobs: + build: + runs-on: ubuntu-latest + + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Create tag based on metadata.rb + id: create_tag + run: | + TAG=$(cat ./VERSION) + echo "TAG=$TAG" >> $GITHUB_ENV + shell: bash + + - name: Set Version + run: echo "VERSION=${{ env.TAG }}" >> $GITHUB_ENV + + - name: Run Docker Container + run: docker run --privileged -d --name builder --network host rockylinux:9 /bin/sleep infinity + + - name: Install build tools RPM + 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 + 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 + 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 + run: | + docker cp builder:/build/packaging/rpm/pkgs/. ./rpms + + - name: Delete non-.rpm files + run: | + find ./rpms -type f -not -name '*.rpm' -exec rm {} \; + + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: ./rpms/* + tag_name: ${{ env.TAG }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..66c4c22 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.9 diff --git a/resources/bin/rb_configure_leader.sh b/resources/bin/rb_configure_leader.sh index 7fdd4ee..997e4df 100755 --- a/resources/bin/rb_configure_leader.sh +++ b/resources/bin/rb_configure_leader.sh @@ -348,7 +348,7 @@ function configure_leader(){ listCookbooks="rb-selinux cron zookeeper kafka druid http2k memcached chef-server consul hadoop samza nginx geoip webui snmp mongodb rbmonitor rbscanner f2k logstash pmacct minio postgresql rbdswatcher rbevents-counter - rsyslog freeradius rbnmsp n2klocd rbale rbcep k2http rblogstatter rb-arubacentral rbcgroup rb-proxy + rsyslog freeradius rbnmsp n2klocd rbale rbcep k2http rblogstatter rb-arubacentral rbcgroup rb-exporter rb-proxy snort barnyard2 rb-ips rbaioutliers rb-manager" # The order matters! for n in $listCookbooks; do # cookbooks