This service continuously monitors a specified JFrog Artifactory repository for .war file updates. Upon detecting a
new version, it automatically triggers a custom deployment script.
Docker Hub: ferdinond/jfrog-artifact-watcher
- Monitors a JFrog repository for updated
.warartifacts - Automatically runs a custom deployment script on update
- Lightweight and configurable via environment variables
- Docker-ready for easy integration into CI/CD pipelines
-
Download the Docker image
docker pull ferdinond/jfrog-artifact-watcher
-
Run the container Use
dockerordocker-composeto run the watcher. See docker-compose example. -
Configure environment variables All required settings are provided via environment variables (see below).
-
Create your deployment script The script (e.g.,
deploy.sh) should contain the actions to perform when a new.waris detected. Example: deploy.sh -
Start the Docker container Make sure the
docker.sockand required files are mounted correctly to allow script execution.
| Variable | Default | Description |
|---|---|---|
RUST_LOG |
info |
Log level: error, warn, info, debug, or trace |
INTERVAL |
5 |
Interval (in seconds) for checking new .war versions in the repository |
JFROG_REPRO |
(required) | Name of your JFrog repository |
JFROG_HOST |
https://jfrog.io |
JFrog base URL, e.g. https://yourcompany.jfrog.io |
WAR_NAME |
(required) | Name pattern of your .war artifact, e.g. yourapp-{%VERSION}.war. The {%VERSION} placeholder will be replaced with the actual version tag. |
JFROG_AUTH |
(required) | JFrog authentication string in the format: USERNAME:TOKEN |
http_proxy |
(optional) | Set this if you use an HTTP proxy |
https_proxy |
(optional) | Set this if you use an HTTPS proxy |
To allow the deployment script to interact with Docker or files on the host:
-
Mount the Docker socket into the container:
volumes: - /var/run/docker.sock:/var/run/docker.sock
-
Mount any necessary files (like deployment scripts) into the container:
volumes: - ./deploy:/deploy
More info on
deploy.shcan be found here
After setup, the service logs should show status checks and deployment triggers like this:
MIT – feel free to use, share, and contribute.
