Skip to content

Commit

Permalink
Project setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Jokinen committed Nov 28, 2024
1 parent b1f4188 commit 5902c60
Show file tree
Hide file tree
Showing 8 changed files with 1,228 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contact_links:
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/repo-template/discussions
url: https://github.com/teragrep/cnf_02/discussions
about: Ask a question or request support
- name: Report vulnerability
url: https://github.com/teragrep/teragrep/security/advisories/new
Expand Down
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@v2

- name: Setup Maven Central
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'

- name: Cache Local Maven Repository
uses: actions/cache@v2
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@v2
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=${{ vars.COVERITY_PROJECT_URL_NAME }}" -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 sources.tgz cov-int
- name: Upload to Coverity
run: curl --silent --form token=${{ secrets.COVERITY_TOKEN }} --form email=${{ secrets.COVERITY_EMAIL }} --form file=@sources.tgz --form version="${GITHUB_REF##*/}" --form description="automated upload" https://scan.coverity.com/builds?project=${{ vars.COVERITY_PROJECT_URL_NAME }}
58 changes: 58 additions & 0 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Upload Release

on:
release:
types: [published]

jobs:
upload:
name: Upload
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

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

- name: Setup Signing
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Setup GitHub Packages
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to GitHub Packages
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-github-packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Setup Maven Central
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'

server-id: central-sonatype-org
server-username: CENTRAL_SONATYPE_ORG_USERNAME
server-password: CENTRAL_SONATYPE_ORG_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Maven Central
run: mvn --batch-mode -Drevision=${{ github.event.release.tag_name }} -Dsha1= -Dchangelist= clean deploy -Ppublish-maven-central
env:
CENTRAL_SONATYPE_ORG_USERNAME: ${{ secrets.CENTRAL_SONATYPE_ORG_USERNAME }}
CENTRAL_SONATYPE_ORG_PASSWORD: ${{ secrets.CENTRAL_SONATYPE_ORG_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/target/
/.settings/
/.vscode/
/.idea/
/*.iml
/.classpath
/.factorypath
/.flattened-pom.xml
.project
19 changes: 11 additions & 8 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,36 @@
// 2. Update the issues link in Contributing section in the readme file
// 3. Update the discussion link in config.yml file in .github/ISSUE_TEMPLATE directory

= repo-template
= Teragrep Java Configuration Wrapper for Typesafe Config

// Add a short description of your project. Tell what your project does and what it's used for.

This is a template repository for Teragrep organization.
CNF-02 is a library that provides immutable configuration for Java projects mainly for the Typesafe Config. Typesafe Config will be converted to https://github.com/teragrep/cnf_01[CNF-01]'s Configuration interface, so it is wise to read through its' documentation as well. It has CNF-01 as a dependency, so it provides all the functionality that it has.

The goal is to have CNF-02 as an extension of CNF-01 with the added third party dependency of Typesafe Config. This ensures that if a project does not use Typesafe for configuration, it doesn't have to be added as a dependency when migrating to use the CNF-01 library.

== Features

// List your project's features

== Documentation

See the official documentation on https://docs.teragrep.com[docs.teragrep.com].
- Converts Typesafe Config to CNF-01 interface.
- Provides all functionalities from CNF-01 with a transitive dependency to the component.

== Limitations

// If your project has limitations, please list them. Otherwise remove this section.
Features are still under development.

== How to [compile/use/implement]

// add instructions how people can start to use your project
See https://github.com/teragrep/cnf_01[CNF-01's documentation] for using the library.

Instructions for converting Typesafe Config will be written here when the functionality has been developed.

== Contributing

// Change the repository name in the issues link to match with your project's name

You can involve yourself with our project by https://github.com/teragrep/repo-template/issues/new/choose[opening an issue] or submitting a pull request.
You can involve yourself with our project by https://github.com/teragrep/cnf_02/issues/new/choose[opening an issue] or submitting a pull request.

Contribution requirements:

Expand Down
Loading

0 comments on commit 5902c60

Please sign in to comment.