Skip to content

Commit

Permalink
Define standard CircleCI executors (#1750)
Browse files Browse the repository at this point in the history
Related tiny-pilot/tinypilot-pro#1229

In an effort to reduce repetition on our CircleCI config, this PR
defines standard CircleCI `executors` instead of redefining them on
every job.

Notes:
1. FYI, CircleCI's `cimg/base` is an Ubuntu image:
> `cimg/base` is an Ubuntu Docker image created by CircleCI with
continuous integration builds in mind. As its name suggests, this image
is designed to serve as a base image for other CircleCI Convenience
Images (images prefixed with cimg/).
1. This means that most jobs would use the same base image and are now
being upgraded to the latest available image (i.e., `cimg/base:2024.02`)
- <s>We can't upgrade the base images on all jobs because some rely on
very specific versions. For example:

https://github.com/tiny-pilot/tinypilot/blob/399637566b5b54d5c881dcf2cb43dfaa560ff236/.circleci/config.yml#L171-L173
       </s>


<a data-ca-tag
href="https://codeapprove.com/pr/tiny-pilot/tinypilot/1750"><img
src="https://codeapprove.com/external/github-tag-allbg.png" alt="Review
on CodeApprove" /></a>
  • Loading branch information
jdeanwallace authored Mar 11, 2024
1 parent 8266bdd commit 2e00d2d
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
version: 2.1
executors:
ubuntu:
docker:
- image: cimg/base:2024.02
python:
docker:
- image: cimg/python:3.9.17
node:
docker:
- image: cimg/node:18.16.1
jobs:
check_whitespace:
docker:
- image: cimg/base:2020.01
executor: ubuntu
steps:
- checkout
- run:
Expand All @@ -23,16 +32,14 @@ jobs:
name: Run static analysis on bash scripts
command: ./dev-scripts/check-bash
check_privilege_guard:
docker:
- image: cimg/base:2020.01
executor: ubuntu
steps:
- checkout
- run:
name: Check for unnecessary privilege escalation
command: ./dev-scripts/check-privilege-guard
lint_sql:
docker:
- image: cimg/python:3.9.17
executor: python
steps:
- checkout
- run:
Expand All @@ -45,8 +52,7 @@ jobs:
pip install --requirement dev_requirements.txt
./dev-scripts/lint-sql
check_style:
docker:
- image: cimg/node:18.16.1
executor: node
steps:
- checkout
- run:
Expand All @@ -56,8 +62,7 @@ jobs:
name: Check code style
command: ./dev-scripts/check-style
decode_edid:
docker:
- image: cimg/python:3.9.17
executor: python
resource_class: small
steps:
- checkout
Expand All @@ -74,8 +79,7 @@ jobs:
pip install --requirement requirements.txt
./dev-scripts/decode-edid
build_python:
docker:
- image: cimg/python:3.9.17
executor: python
steps:
- checkout
- run:
Expand All @@ -88,8 +92,7 @@ jobs:
pip install --requirement dev_requirements.txt
./dev-scripts/build-python
build_javascript:
docker:
- image: cimg/node:18.16.1
executor: node
steps:
- checkout
- run:
Expand All @@ -99,8 +102,7 @@ jobs:
name: Run build script
command: ./dev-scripts/build-javascript
build_bash:
docker:
- image: cimg/base:2024.01
executor: ubuntu
steps:
- checkout
- run:
Expand Down Expand Up @@ -151,8 +153,7 @@ jobs:
- store_artifacts:
path: e2e-results
build_debian_package:
docker:
- image: cimg/base:2023.06
executor: ubuntu
resource_class: arm.medium
steps:
- checkout
Expand All @@ -169,8 +170,7 @@ jobs:
paths:
- "*.deb"
lint_debian_package:
docker:
- image: cimg/base:2022.11-22.04
executor: ubuntu
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -198,8 +198,7 @@ jobs:
"${file}"
done < <(ls *.deb)
build_bundle:
docker:
- image: cimg/python:3.9.17
executor: python
steps:
- checkout
- attach_workspace:
Expand All @@ -214,8 +213,7 @@ jobs:
paths:
- ./dist
verify_bundle:
docker:
- image: cimg/base:2020.01
executor: ubuntu
steps:
- checkout
- attach_workspace:
Expand All @@ -224,8 +222,7 @@ jobs:
name: Verify bundle integrity
command: ./bundler/verify-bundle
upload_bundle:
docker:
- image: cimg/base:2024.02
executor: ubuntu
environment:
UPLOAD_PREFIX: community
steps:
Expand Down

0 comments on commit 2e00d2d

Please sign in to comment.