https://github.com/thecodesmith/artifactory-badges
Pretty artifact version badges for Artifactory
https://github.com/thecodesmith/artifactory-badges
Last synced: about 1 year ago
JSON representation
Pretty artifact version badges for Artifactory
- Host: GitHub
- URL: https://github.com/thecodesmith/artifactory-badges
- Owner: thecodesmith
- License: mit
- Created: 2020-03-25T20:00:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-06T21:04:44.000Z (about 6 years ago)
- Last Synced: 2025-01-31T07:40:35.358Z (over 1 year ago)
- Language: Groovy
- Homepage:
- Size: 82 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Artifactory Badge Service
_Pretty artifact version badges for Artifactory_
## Features
This microservice uses the [Artifactory REST
API](https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-ArtifactLatestVersionSearchBasedonLayout)
and [shields.io](https://shields.io) to generate version badges that look like
this: .
The Artifactory API is used to find the latest version of a specified artifact,
and [shields.io](https://shields.io) generates the badge in SVG format.
## Usage
To run the service using the Docker image:
docker run \
-p 8080:8080 \
-e ARTIFACTORY_HOST= \
-e ARTIFACTORY_PORT= \
-e ARTIFACTORY_USER= \
-e ARTIFACTORY_TOKEN= \
thecodesmith/artifactory-badges
Then test it using the `/badge` endpoint on badge service API:
curl localhost:8080/badge///
To use the service in a Markdown document, use this syntax:

## Development
### Run the app
Run the project via Gradle:
./gradlew run
Build the app (compile and run tests):
./gradlew build
Create a runnable fat jar with all dependencies:
./gradlew shadowJar
The jar will be in `build/libs/artifactory-badges--all.jar` and can be
run like this:
java -jar build/libs/artifactory-badges--all.jar
### Configuration
Set the Artifactory connection properties using one of Micronaut's
[configuration methods](https://docs.micronaut.io/latest/guide/config.html). The
simplest way is with environment variables or system properties. Below are the connection properties which need to be configured.
System Property | Environment Variable | Example
--------------- | -------------------- | -------
`artifactory.host` | `ARTIFACTORY_HOST` | `https://artifactory.company.com`
`artifactory.port` | `ARTIFACTORY_PORT` | `443`
`artifactory.user` | `ARTIFACTORY_USER` | `my-service-account`
`artifactory.token` | `ARTIFACTORY_TOKEN` | `iOiIyIiwid...`