GitXplorerGitXplorer
j

jfrog-artifactory-badge

public
12 stars
7 forks
0 issues

Commits

List of commits on branch master.
Unverified
9a2f31558b4a8018d2dab939c9ba23b0786f6297

fix: silently fail on favicon fail

jjimthedev committed 7 years ago
Unverified
04d36c4aca70266e9291af784741c3321932c31b

fix: Add MIT license

jjimthedev committed 7 years ago
Unverified
c64ab5ca7f7f3c0542a958985dc25c690eaa06e4

fix: apply cache headers

jjimthedev committed 7 years ago
Unverified
d0ac9de6bf36037da26e7106f403429ebd744bbe

Initial commit

jjimthedev committed 7 years ago

README

The README file for this repository.

jfrog-artifactory-badge

A tiny http based microservice that serves up https://shields.io image badges for given private jfrog artifactory repositories.

Getting started

  • Node 8+
  • Copy/rename .env.example file to .env and fill out the details for your artifactory setup
  • npm install
  • npm start

Example .env file

You should probably replace servername twice with your jfrog url and may also need to replace the second npm in the path if you didn't call your npm repository 'npm'. The provided user will need read access to the packages that you want to generate badges for.

ARTIFACTORY_BADGE_URI=https://servername.jfrog.io/servername/api/npm/npm/
ARTIFACTORY_BADGE_USERNAME=my_jfrog_artifactory_user
ARTIFACTORY_BADGE_PASSWORD=My_jFr0g_4rtifactory_P@ssword!

Deployment

Deployment to zeit's now.sh is pretty easy so it is described here. You may deploy to hosting of your choosing.

# Read your .env file and puts those secrets into now.sh, deploys 
# and gives you a https://GENERIC-NOW-URL.now.sh on your clipboard
now --dotenv

# scale it so it doesn't sleep, using the URL they give you
now scale https://GENERIC-NOW-URL.now.sh 1

# If you have a paid account, you can alias to a custom url
now alias http://GENERIC-NOW-URL.now.sh https://mydomain.com

# Now you can use an html img tag
<img src="https://mydomain.com/@scope/package" alt="package version">

# or markdown image
![package version](https://mydomain.com/@scope/package)

Author

2018, jimthedev MIT License, have fun.