Skip to content

Commit

Permalink
Nox session to build and push multiplatform images (#3324)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas <[email protected]>
Co-authored-by: Thomas <[email protected]>
  • Loading branch information
3 people authored May 29, 2023
1 parent f05c436 commit 8d424d3
Show file tree
Hide file tree
Showing 13 changed files with 276 additions and 104 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,15 @@ jobs:
strategy:
matrix:
session_name:
["isort", "black", "mypy", "pylint", "xenon", "check_install"]
[
"isort",
"black",
"mypy",
"pylint",
"xenon",
"check_install",
'"pytest(nox)"',
]
runs-on: ubuntu-latest
continue-on-error: true
steps:
Expand All @@ -91,6 +99,9 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Install Dev Requirements
run: pip install -r dev-requirements.txt

- name: Run Static Check
run: nox -s ${{ matrix.session_name }}

Expand Down Expand Up @@ -148,7 +159,6 @@ jobs:
- "ops-unit"
- "ops-integration"
- "lib"
- "nox"

runs-on: ubuntu-latest
timeout-minutes: 25
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/publish_docker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Build & Push
name: Publish Docker Images

on:
push:
Expand Down Expand Up @@ -28,9 +28,6 @@ jobs:
- name: Install Dev Requirements
run: pip install -r dev-requirements.txt

- name: Build Fides Image
run: nox -s "build(prod)"

- name: Push Fides Dev Tag
run: nox -s "push(dev)"

Expand Down
2 changes: 1 addition & 1 deletion clients/sample-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:16-alpine as prod

ENV DATABASE_HOST localhost
ENV DATABASE_PORT 5432
Expand Down
3 changes: 2 additions & 1 deletion noxfiles/ci_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Callable, Dict

import nox

from constants_nox import (
CONTAINER_NAME,
IMAGE_NAME,
Expand All @@ -11,7 +12,7 @@
START_APP,
WITH_TEST_CONFIG,
)
from test_setup_nox import pytest_ctl, pytest_lib, pytest_nox, pytest_ops
from setup_tests_nox import pytest_ctl, pytest_lib, pytest_nox, pytest_ops
from utils_nox import install_requirements


Expand Down
7 changes: 4 additions & 3 deletions noxfiles/dev_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
from pathlib import Path
from typing import Literal

from nox import Session, param, parametrize
from nox import session as nox_session
from nox.command import CommandFailed

from constants_nox import (
COMPOSE_SERVICE_NAME,
EXEC_IT,
Expand All @@ -11,9 +15,6 @@
START_APP_REMOTE_DEBUG,
)
from docker_nox import build
from nox import Session, param, parametrize
from nox import session as nox_session
from nox.command import CommandFailed
from run_infrastructure import ALL_DATASTORES, run_infrastructure
from utils_nox import install_requirements, teardown

Expand Down
Loading

0 comments on commit 8d424d3

Please sign in to comment.