From 8352013d00a6b47307acc5a4e05a5dc80673a1d2 Mon Sep 17 00:00:00 2001 From: esavary Date: Thu, 31 Aug 2023 05:33:43 -0400 Subject: [PATCH 1/3] Add .circleci/config.yml --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4175da6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello From 9ae7bbf21c132469817da6dfad21e802b92cd617 Mon Sep 17 00:00:00 2001 From: esavary Date: Thu, 31 Aug 2023 05:37:52 -0400 Subject: [PATCH 2/3] Updated config.yml --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4175da6..c272cf8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,6 +2,10 @@ # See: https://circleci.com/docs/configuration-reference version: 2.1 +parameters: + pull_request: + type: boolean + default: false # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/configuration-reference/#jobs jobs: @@ -21,6 +25,13 @@ jobs: # Orchestrate jobs using workflows # See: https://circleci.com/docs/configuration-reference/#workflows workflows: - say-hello-workflow: + push: + unless: << pipeline.parameters.pull_request >> jobs: - say-hello + pull_request: + when: << pipeline.parameters.pull_request >> + jobs: + - say-hello + + From f2f6e0890274dbbfdf156b6ec185ddeb293a637c Mon Sep 17 00:00:00 2001 From: esavary Date: Fri, 1 Sep 2023 05:35:47 -0400 Subject: [PATCH 3/3] Updated config.yml --- .circleci/config.yml | 50 +++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c272cf8..5326b28 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,37 +1,31 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/configuration-reference version: 2.1 - -parameters: - pull_request: - type: boolean - default: false -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/configuration-reference/#jobs jobs: - say-hello: - # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/configuration-reference/#executor-job + build: docker: - - image: cimg/base:stable - # Add steps to the job - # See: https://circleci.com/docs/configuration-reference/#steps + - image: python:3.10 steps: - checkout - run: - name: "Say hello" - command: "echo Hello, World!" - -# Orchestrate jobs using workflows -# See: https://circleci.com/docs/configuration-reference/#workflows + name: Install system dependencies + command: | + apt-get update && apt-get install -y libcairo2-dev libpango1.0-dev libgdk-pixbuf2.0-dev + - run: + name: Create virtual environment + command: python -m venv myenv + - run: + name: Activate virtual environment + command: source myenv/bin/activate + - run: + name: Install requirements + command: python -m pip install -r requirements.txt + - run: + name: Build preview + command: python -m mkdocs build --site-dir _SOPs_preview + - store_artifacts: + path: _SOPs_preview workflows: - push: - unless: << pipeline.parameters.pull_request >> + version: 2 + commit: jobs: - - say-hello - pull_request: - when: << pipeline.parameters.pull_request >> - jobs: - - say-hello - + - build