From 9c8b1b70ee1f940b76f4a4ed07799da8811aa69f Mon Sep 17 00:00:00 2001 From: David Crossley Date: Wed, 28 Jun 2023 12:25:33 +1000 Subject: [PATCH 1/2] Update copyright year FOLIO-1021 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5928a06..f7b30a9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # folio-export-common -Copyright (C) 2021 The Open Library Foundation +Copyright (C) 2021-2023 The Open Library Foundation This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information. From 007439e69dad674402dc6de4289be179f782b974 Mon Sep 17 00:00:00 2001 From: David Crossley Date: Wed, 28 Jun 2023 12:31:51 +1000 Subject: [PATCH 2/2] Use API-related Workflows FOLIO-3678 --- .github/workflows/api-schema-lint.yml | 40 +++++++++++++++++++++++++++ Jenkinsfile | 36 ------------------------ 2 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/api-schema-lint.yml delete mode 100644 Jenkinsfile diff --git a/.github/workflows/api-schema-lint.yml b/.github/workflows/api-schema-lint.yml new file mode 100644 index 0000000..f32e7dc --- /dev/null +++ b/.github/workflows/api-schema-lint.yml @@ -0,0 +1,40 @@ +name: api-schema-lint + +# https://dev.folio.org/guides/describe-schema/ + +# API_DIRECTORIES: string: The space-separated list of directories to search +# for JSON Schema files. +# e.g. 'src/main/resources/openapi' +# NOTE: -- Also add each separate path to each of the "on: paths:" sections. +# e.g. 'src/main/resources/openapi/**' +# +# API_EXCLUDES: string: The space-separated list of directories and files +# to exclude from traversal, in addition to the default exclusions. +# e.g. '' + +env: + API_DIRECTORIES: '.' + API_EXCLUDES: 'folio-tools' + +on: [push, pull_request] + +jobs: + api-schema-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + - name: Prepare folio-tools + run: | + git clone https://github.com/folio-org/folio-tools + cd folio-tools/api-schema-lint \ + && yarn install \ + && pip3 install -r requirements.txt + - name: Do api-schema-lint + run: | + python3 folio-tools/api-schema-lint/api_schema_lint.py \ + --loglevel info \ + --directories ${{ env.API_DIRECTORIES }} \ + --excludes ${{ env.API_EXCLUDES }} diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index d8ed194..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,36 +0,0 @@ -pipeline { - - options { - buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30')) - } - - agent { - node { - label 'jenkins-agent-java11' - } - } - - stages { - stage('Prep') { - steps { - script { - currentBuild.displayName = "#${env.BUILD_NUMBER}-${env.JOB_BASE_NAME}" - } - sendNotifications 'STARTED' - } - } - - stage('API schema lint') { - steps { - runApiSchemaLint('.', '') - } - } - - } // end stages - - post { - always { - sendNotifications currentBuild.result - } - } -}