From ce61fa9b96e5b2dc0fbed9806b5b2a0497911b17 Mon Sep 17 00:00:00 2001 From: maxachis Date: Sun, 30 Jun 2024 19:24:46 -0400 Subject: [PATCH] Created Dockerfile and Jenkinsfile for running Automatic Archive with Python 3.11 and health monitoring actions. --- Dockerfile | 8 ++++++++ Jenkinsfile | 24 ++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 Jenkinsfile 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: