diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b0d429 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.11 + +WORKDIR /usr/src/app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..c0d9c36 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,24 @@ +#!/usr/bin/env groovy + +/* +This script runs all health monitoring actions +*/ + +pipeline { + + agent { + dockerfile { + filename 'Dockerfile' + args '-e VUE_APP_PDAP_API_KEY=$VUE_APP_PDAP_API_KEY -e VITE_VUE_APP_BASE_URL=$VITE_VUE_APP_BASE_URL' + } + } + + stages { + stage('Run Automatic Archive') { + steps { + echo 'Running Automatic Archive...' + sh 'python cache_url.py' + } + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index f41b50e..d97f1a5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This tool uses the [PDAP API](https://docs.pdap.io/api/endpoints/data-sources-da Then, it uses the PDAP API to update the Data Sources' `last_cached` and `url_status` properties. -The script is set up to run with a GitHub Actions workflow. +This script runs from the Automation Manager on a daily basis, with the Jenkinsfile and the Dockerfile utilized to ensure the script runs in a consistent environment and manner. Requires the following environment variables to be set: