Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikko-Rajala authored and StrongestNumber9 committed Jul 31, 2024
0 parents commit b84d49d
Show file tree
Hide file tree
Showing 64 changed files with 8,550 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
<!-- Please explain what happened and provide the context in which the bug occurred. -->

**Expected behavior**
<!-- Please tell us why you think the behavior is unexpected. If you can, please copy-paste logs or error messages you got while facing the bug. -->

**How to reproduce**
<!-- Please provide us reproducible step-by-step guide on how to reproduce the bug. Please keep in mind that non-reproducible issues will be closed. -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Software version**
<!-- e.g. 3.1.4 -->

**Desktop (please complete the following information if relevant):**
- OS: <!-- [e.g. iOS] -->
- Browser: <!-- [e.g. chrome, safari] -->
- Version: <!-- [e.g. 22] -->

**Additional context**
<!-- Add any other context about the problem here. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Doc issue report
url: https://github.com/teragrep/doc_01/issues/new?template=doc-issue-report.md
about: Problems with Teragrep documentation
- name: Ask a question or get support
url: https://github.com/teragrep/cfe_16/discussions
about: Ask a question or request support
- name: Report vulnerability
url: https://github.com/teragrep/teragrep/security/advisories/new
about: Privately report a security vulnerability
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Description**
<!-- Please describe shortly your feature idea. -->

**Use case or motivation behind the feature request**
<!-- Please tell us what you would like to happen. Rather than explaining the implementation process, we would appreciate to hear what you are trying to achieve with your feature. -->

**Related issues**
<!-- If there are any, please list issues that are associated with your feature request. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/tasks-and-meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Tasks and meta
about: Maintainers only
title: ''
labels: ''
assignees: ''

---

**Description**
<!-- Add a short description and screen shots if needed. -->
51 changes: 51 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on: push

jobs:
verify:
name: Verify Code
runs-on: ubuntu-latest

env:
COVERITY: coverity_tool

steps:
- uses: actions/checkout@v3

- name: Setup Maven Central
uses: actions/setup-java@v3
with:
java-version: 8.0.292+10
distribution: 'adopt'

- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

- name: Compile Test and Verify
run: mvn --batch-mode clean verify

- name: Cache Coverity
id: cache_coverity
uses: actions/cache@v3
with:
path: ${{ env.COVERITY }}
key: coverity

- name: Download Coverity
if: steps.cache_coverity.outputs.cache-hit != 'true'
run: |
wget --quiet https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=cfe_16" -O ${{ env.COVERITY }}.tgz
mkdir -p ${{ env.COVERITY }}
tar zxvf ${{ env.COVERITY }}.tgz -C ${{ env.COVERITY }} --strip-components 1
- name: Compile Coverity
run: |
${{ env.COVERITY }}/bin/cov-build --dir cov-int mvn -DskipTests=true --batch-mode clean compile
tar czvf cfe_16.tgz cov-int
- name: Upload to Coverity
run: curl --silent --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form file=@cfe_16.tgz --form version="${GITHUB_REF##*/}" --form description="automated upload" https://scan.coverity.com/builds?project=cfe_16
65 changes: 65 additions & 0 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Upload Release

on:
release:
types: published

jobs:
upload:
name: Upload
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Cache Local Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}

- name: Setup GitHub Packages
uses: actions/setup-java@v3
with:
java-version: 8.0.292+10
distribution: 'adopt'

- name: Get version
run: git describe --tags && echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV

- name: Create jar and rpm
run: |
mvn -B -Drevision=${{ env.RELEASE_VERSION }} -Dsha1= -Dchangelist= clean verify deploy;
cd rpm/ && mvn -B -Drevision=${{ env.RELEASE_VERSION }} -Dsha1= -Dchangelist= -f rpm.pom.xml package;
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Attach rpm as artifact on releases
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/rpm/com.teragrep-cfe_16/RPMS/noarch/com.teragrep-cfe_16-*.rpm

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lowercase repository name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: 'Build Image'
run: |
docker buildx build --output type=docker --tag ghcr.io/${{ env.REPO_LC }}/app:${{ github.event.release.tag_name }} .
docker push ghcr.io/${{ env.REPO_LC }}/app:${{ github.event.release.tag_name }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea/
target/
rpm/target/
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM rockylinux:9
COPY rpm/target/rpm/com.teragrep-cfe_16/RPMS/noarch/com.teragrep-cfe_16-*.rpm /rpm/
RUN yum -y localinstall /rpm/*.rpm && yum clean all

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
USER srv-cfe_16
ENTRYPOINT /entrypoint.sh
Loading

0 comments on commit b84d49d

Please sign in to comment.