Skip to content

Commit

Permalink
Updated Deployment workflow to only run one deployment at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMcGrath committed Jan 8, 2025
1 parent 6604684 commit c637a54
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
continue-on-error: true
needs: [connector-list, snyk]
strategy:
max-parallel: 1
matrix:
connector: ${{ fromJSON(needs.connector-list.outputs.connectors) }}

Expand Down
22 changes: 21 additions & 1 deletion base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
# Connector Base Stage
# --------------------
# This stage installs the base minimum that is common for every connector.
FROM python:3.12-alpine AS connector-base

ARG UV_SYSTEM_PYTHON=true
RUN pip install uv && uv pip install "tenint==0.9.0"


# Connector Build Stage
# ---------------------
# This stage installs both the connector code and the dependent libraries needed
# to ensure that the connector will run.
FROM connector-base AS build
ADD ./ /connector/
RUN uv pip install -r /connector/pyproject.toml


# Connector Test Stage
# --------------------
# In this stage we will install any required testing libraries and tools and
# run the following suite of security and testing tools:
#
# * ruff check :: Code linting and formatting
# * pytest :: Unit testing and test coverage
# * pip-audit :: Ensure none of the libraries installed have any security issues
# * bandit :: Check the code for any potential low-hanging security code issues
FROM build AS test
WORKDIR /connector/
RUN uv pip install "tenint[testing]" \
Expand All @@ -23,7 +39,11 @@ RUN tenint marketplace
RUN echo $(date '+Y-%m-%d %H:%M%S') > /tested_on


FROM python:3.12-alpine
# Final Image (publish) Stage
# ---------------------------
# In this stage we will pull the installed libraries and code from the relevent
# stages above and configure the image to use a non-root user.
FROM python:3.12-alpine AS publish

RUN addgroup -S connector && adduser connector -S -G connector -h /connector
USER connector:connector
Expand Down

0 comments on commit c637a54

Please sign in to comment.