From 9e031b6da762f2c2666359570a6cc41275058175 Mon Sep 17 00:00:00 2001 From: Philip de Nier Date: Tue, 14 Nov 2023 14:26:09 +0000 Subject: [PATCH] gha: remove Jenkinsfile and add doc refs --- Jenkinsfile | 185 ----------------------------------------------- Jenkinsfile.json | 14 ---- README.md | 7 +- 3 files changed, 2 insertions(+), 204 deletions(-) delete mode 100644 Jenkinsfile delete mode 100644 Jenkinsfile.json diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 0d845b9..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,185 +0,0 @@ -@Library("rd-apmm-groovy-ci-library@v1.x") _ - -/* - - This file was autogenerated using tooling in commontooling - - DO NOT MANUALLY EDIT THIS FILE - - Instead make necessary changes to Jenkinsfile.json and then - regenerate this file with `make static-files` before checking - the resulting file into git. - - */ - -pipeline { - agent { - label "ubuntu&&apmm-agent" - } - options { - ansiColor('xterm') // Add support for coloured output - buildDiscarder(logRotator(numToKeepStr: '10')) // Discard old builds - } - triggers { - cron(env.BRANCH_NAME == 'main' ? 'H H(0-8) * * *' : '') // Build main some time every morning - } - parameters { - booleanParam(name: "FORCE_DOCSUPLOAD", defaultValue: false, description: "Force API docs upload") - booleanParam(name: "FORCE_PYPIUPLOAD", defaultValue: false, description: "Force upload of python wheels to pypi") - string(name: "PYTHON_VERSION", defaultValue: "3.10", description: "Python version to make available in tox") - string(name: "COMMONTOOLING_BRANCH", defaultValue: "main") - } - environment { - FORGE_CERT = "/etc/pki/tls/private/client_crt_key.pem" - http_proxy = "http://www-cache.rd.bbc.co.uk:8080" - https_proxy = "http://www-cache.rd.bbc.co.uk:8080" - PATH = "$HOME/.pyenv/bin:$PATH" - TOX_WORK_DIR="/tmp/${sh(script: "basename ${WORKSPACE}", , returnStdout: true).trim()}" - WITH_DOCKER = "true" - TOX_ENV = "py${(params.PYTHON_VERSION =~ /(\d+)\.(\d+).*/)[0][1..2].join('')}" - DOCKER_CONFIG = "$WORKSPACE/docker-config/" - } - stages { - stage("Setup Environment") { - steps { - bbcStageSetupEnvironment() - } - post { - always { - bbcGithubNotify(context: "prepcode", status: env.result) - } - } - } - stage ("make check-static-files") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'check-static-files' - } - } - post { - always { - bbcGithubNotify(context: "check-static-files", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("make lint") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'lint' - } - } - post { - always { - bbcGithubNotify(context: "lint", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("make mypy") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'mypy' - } - } - post { - always { - bbcGithubNotify(context: "mypy", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("make docs") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'docs' - } - } - post { - always { - bbcGithubNotify(context: "docs", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("make test") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'test' - } - } - post { - always { - bbcGithubNotify(context: "test", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("make wheel") { - steps { - withBBCCloudfitPipConfFile { - bbcMake 'wheel' - } - } - post { - always { - bbcGithubNotify(context: "wheel", status: env.result) - bbcSh "rm -f ${WORKSPACE}/.pip.conf" - } - } - } - stage ("Upload to PyPi") { - when { - anyOf { - expression { return params.FORCE_PYPIUPLOAD } - expression { env.TAG_NAME != null } - expression { - bbcShouldUploadArtifacts(branches: ["main"]) - } - } - } - steps { - withCredentials([usernamePassword(credentialsId: "5f2c0fcd-cf71-494a-a642-aa072100171b", - passwordVariable: 'TWINE_REPO_PASSWORD', - usernameVariable: 'TWINE_REPO_USERNAME')]) { - withEnv(["TWINE_REPO=https://upload.pypi.org/legacy/"]) { - withBBCCloudfitPipConfFile { - bbcMake "upload-wheels" - } - } - } - } - post { - always { - bbcGithubNotify(context: "upload-wheels", status: env.result) - } - } - } - stage ("Upload Docs") { - when { - anyOf { - expression { return params.FORCE_DOCSUPLOAD } - expression { env.TAG_NAME != null } - expression { - bbcShouldUploadArtifacts(branches: ["main"]) - } - } - } - steps { - withBBCStatusRecording(context: 'upload/docs') { - bbcAPMMDocsUpload(sourceFiles: "./docs", recursive: true) - } - } - post { - always { - bbcGithubNotify(context: "upload/docs", status: env.result) - } - } - } - } - post { - always { - bbcSlackNotify(channel: "#apmm-cloudfit") - } - } -} diff --git a/Jenkinsfile.json b/Jenkinsfile.json deleted file mode 100644 index e3bd693..0000000 --- a/Jenkinsfile.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "docker": true, - "stages": [ - "@setup", - "@make check-static-files", - "@make lint", - "@make mypy", - "@make docs", - "@make test", - "@make wheel", - "@upload pypi", - "@upload docs-recursive ./docs" - ] -} diff --git a/README.md b/README.md index 49239a0..d8557a8 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The API is well documented in the docstrings of the module mediajson, to view: ```bash make docs ``` -This command will render documentation as HTML in the `/docs` directory. +This command will render documentation as HTML in the `/docs` directory. A rendered version of this documentation is available [here](https://bbc.github.io/rd-apmm-python-lib-mediajson/mediajson/mediajson.html). ## Development ### Commontooling @@ -67,10 +67,7 @@ $ make test ### Continuous Integration -This repository includes a Jenkinsfile which makes use of custom steps defined in a BBC internal -library for use on our own Jenkins instances. As such it will not be immediately useable outside -of a BBC environment, but may still serve as inspiration and an example of how to implement CI -for this package. +This repository includes [GitHub Actions workflows](./.github/workflows/) for CI. The shared workflows are centrally managed and should not be modified. ## Versioning