Skip to content

Commit a94846a

Browse files
committed
refactor folder structure
1 parent a8d52c6 commit a94846a

File tree

40 files changed

+41
-18
lines changed

40 files changed

+41
-18
lines changed

.github/workflows/build_all_images.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
tag_latest: ${{ inputs.tag_latest }}
1818
docker_tag: ${{ inputs.docker_tag }}
1919
container_name: base
20-
package_non_base_docker_image:
20+
base_folder: "."
21+
package_language_docker_image:
2122
needs:
2223
- package_base_docker_image
2324
strategy:
@@ -33,9 +34,10 @@ jobs:
3334
tag_latest: ${{ inputs.tag_latest }}
3435
docker_tag: ${{ inputs.docker_tag }}
3536
container_name: ${{ matrix.container_name }}
36-
package_product_docker_image:
37+
base_folder: "languages"
38+
package_project_docker_image:
3739
needs:
38-
- package_non_base_docker_image
40+
- package_language_docker_image
3941
strategy:
4042
fail-fast: false
4143
matrix:
@@ -46,3 +48,4 @@ jobs:
4648
tag_latest: ${{ inputs.tag_latest }}
4749
docker_tag: ${{ inputs.docker_tag }}
4850
container_name: ${{ matrix.container_name }}
51+
base_folder: "projects"

.github/workflows/build_multi_arch_image.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ name: Build and push docker image
1111
container_name:
1212
required: true
1313
type: string
14+
base_folder:
15+
required: true
16+
type: string
1417

1518
jobs:
1619
build_and_push_image:
@@ -81,8 +84,8 @@ jobs:
8184
DOCKER_TAG: '${{ inputs.docker_tag }}'
8285
CONTAINER_NAME: '${{ inputs.container_name }}'
8386
BASE_VERSION: ${{ inputs.docker_tag}}
84-
PLATFORM: linux/${{ matrix.arch }}
8587
IMAGE_TAG: ":${{ inputs.docker_tag }}-${{ matrix.arch }}"
88+
BASE_FOLDER: "${{ inputs.base_folder }}"
8689
- name: Check docker vulnerabilities - json output
8790
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
8891
with:

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ install-node:
2121
install-hooks: install-python
2222
poetry run pre-commit install --install-hooks --overwrite
2323

24-
build-image: guard-CONTAINER_NAME guard-BASE_VERSION guard-PLATFORM
24+
build-image: guard-CONTAINER_NAME guard-BASE_VERSION guard-BASE_FOLDER
2525
npx devcontainer build \
26-
--workspace-folder ./src/$${CONTAINER_NAME}/ \
26+
--workspace-folder ./src/$${BASE_FOLDER}/$${CONTAINER_NAME} \
2727
--push false \
28-
--platform $${PLATFORM} \
2928
--image-name "${CONTAINER_PREFIX}$${CONTAINER_NAME}${IMAGE_TAG}"
3029

3130
scan-image: guard-CONTAINER_NAME

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,28 @@ For pull requests, an image is pushed with tag `pr-<pull-request-id>-<short comm
5757
On merges to main, a new release is created, and images are tagged with `latest` and the version of the release.
5858

5959
# Local testing
60-
For local testing, you can run
60+
For local testing, you can run this to build the base image
6161
```
62-
CONTAINER_NAME=base BASE_VERSION=latest make build-image
62+
CONTAINER_NAME=base \
63+
BASE_VERSION=latest \
64+
BASE_FOLDER=. \
65+
make build-image
6366
```
67+
or this to build a language image
68+
```
69+
CONTAINER_NAME=node_24_python_3_12 \
70+
BASE_VERSION=latest \
71+
BASE_FOLDER=languages \
72+
make build-image
73+
```
74+
or this to build a project image
75+
```
76+
CONTAINER_NAME=fhir_facade_api \
77+
BASE_VERSION=latest \
78+
BASE_FOLDER=projects \
79+
make build-image
80+
```
81+
6482
to build a local image, and then
6583
```
6684
CONTAINER_NAME=base BASE_VERSION=latest make scan-image

src/fhir_facade_api/trivy.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/node_24_python_3_12/.devcontainer/.tool-versions renamed to src/languages/node_24_python_3_12/.devcontainer/.tool-versions

File renamed without changes.

src/node_24_python_3_12/.devcontainer/devcontainer.json renamed to src/languages/node_24_python_3_12/.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "EPS Devcontainer node_24 python_3.13",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
66
"build": {
7-
"dockerfile": "../../common/Dockerfile",
7+
"dockerfile": "../../../common/Dockerfile",
88
"args": {
99
"BASE_VERSION": "${localEnv:BASE_VERSION}",
1010
"CONTAINER_NAME": "eps_devcontainer_node_24_python_3_13"

src/node_24_python_3_12/.devcontainer/scripts/root_install.sh renamed to src/languages/node_24_python_3_12/.devcontainer/scripts/root_install.sh

File renamed without changes.

src/node_24_python_3_12/.devcontainer/scripts/vscode_install.sh renamed to src/languages/node_24_python_3_12/.devcontainer/scripts/vscode_install.sh

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)