Jenkinsfile-Folio-Update
pipeline { agent any triggers { cron('H(5-20) 5 * * *') } environment { OKAPI_URL = credentials('OKAPI_PROD_URL') } stages { stage('harvest') { steps { checkout scm sshagent (['sul-devops-team']){ sh '''#!/bin/bash -l export PATH=/ci/home/bin:$PATH export HUB_CONFIG=/ci/home/config/hub # Load RVM rvm use 3.4.1@searchworks --create gem install bundler bundle install --without production # Harvest SETTINGS__FOLIO__CONFIG_SET=prod bin/rake folio:update_types_cache || exit 1 # TODO: Figure out how to set SETTINGS__FOLIO__URL/OKAPI_USER/OKAPI_PASSWORD for the test server # SETTINGS__FOLIO__CONFIG_SET=test bin/rake folio:update_types_cache || exit 1 # Make a PR git checkout -B folio-policies-update git add config/folio git commit -m "Update FOLIO types" && git push git@github.com:sul-dlss/SearchWorks.git folio-policies-update && hub pull-request -f -m "Update FOLIO types" --base main echo 'Done!' ''' } } } }}