Skip to content

Commit e0eeb3d

Browse files
Merge branch 'main' into dependabot/github_actions/actions/checkout-5
2 parents d5dba26 + 0ce555b commit e0eeb3d

13 files changed

+154
-66
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @dvviktordelev
1+
* @dvviktordelev @puehringer

.github/actions/build-node-python/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ inputs:
8585
run_python_build:
8686
default: true
8787
required: false
88+
# Rust
89+
enable_rust:
90+
description: "enables the rust part of the action"
91+
default: false
92+
required: true
8893

8994
runs:
9095
using: "composite"
@@ -125,6 +130,29 @@ runs:
125130
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
126131
sudo apt-get install postgresql-16-pgvector -y
127132
shell: bash
133+
# Rust
134+
- name: Install Rust
135+
if: inputs.enable_rust == 'true'
136+
run: |
137+
if ! command -v rustup &> /dev/null ; then
138+
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain stable -y
139+
140+
# Resolve the correct CARGO_HOME path depending on OS
141+
if [[ "$RUNNER_OS" == "Windows" ]]; then
142+
echo "${CARGO_HOME:-$USERPROFILE/.cargo}/bin" | sed 's|/|\\|g' >> $GITHUB_PATH
143+
else
144+
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
145+
fi
146+
# Load cargo environment so cargo and rustc are available in this shell
147+
. "$HOME/.cargo/env"
148+
fi
149+
150+
# Ensure stable rust toolchain is installed
151+
rustup install stable
152+
153+
rustc --version
154+
cargo --version
155+
shell: bash
128156
# General
129157
- name: Git config
130158
if: inputs.github_ro_token != ''

.github/workflows/build-docker-artifacts-config.schema.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
"type": "boolean",
4040
"default": true,
4141
"description": "Scan the image for high severity vulnerabilities"
42+
},
43+
"build_args": {
44+
"type": "object",
45+
"description": "Build arguments to pass to Docker",
46+
"additionalProperties": {
47+
"type": "string"
48+
}
4249
}
4350
},
4451
"required": ["directory", "ecr_repository"]

.github/workflows/build-docker-artifacts.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ jobs:
114114
image_tag_branch_name: imageTagBranchName,
115115
ecr_respositories: flavor.components.map(component => component.ecr_repository),
116116
components: flavor.components.map(component => {
117+
// Format build arguments as build-args string
118+
const formattedBuildArgs = component.build_args ?
119+
Object.entries(component.build_args).map(([key, value]) => `${key}=${value}`).join('\n') : '';
120+
117121
return {
118122
...component,
119123
// Add metadata to the component object (will be used as matrix input),
@@ -123,6 +127,7 @@ jobs:
123127
build_time: buildTime,
124128
image_tag: imageTag,
125129
image_tag_branch_name: imageTagBranchName,
130+
formatted_build_args: formattedBuildArgs,
126131
};
127132
}),
128133
};
@@ -223,6 +228,7 @@ jobs:
223228
DATAVISYN_PYTHON_BASE_IMAGE=${{ env.DATAVISYN_PYTHON_BASE_IMAGE }}
224229
NODE_BASE_IMAGE=${{ env.NODE_BASE_IMAGE }}
225230
DATAVISYN_NGINX_BASE_IMAGE=${{ env.DATAVISYN_NGINX_BASE_IMAGE }}
231+
${{ matrix.component.formatted_build_args }}
226232
secrets:
227233
# Mount the token as secret mount: https://docs.docker.com/build/ci/github-actions/secrets/#secret-mounts
228234
"github_token=${{ secrets.CHECKOUT_TOKEN || github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}"
@@ -256,7 +262,7 @@ jobs:
256262
echo "severity=HIGH,CRITICAL" >> "$GITHUB_OUTPUT"
257263
fi
258264
- name: Run Trivy vulnerability scanner
259-
uses: aquasecurity/trivy-action@0.32.0
265+
uses: aquasecurity/trivy-action@0.33.1
260266
with:
261267
image-ref: ${{ vars.DV_AWS_ECR_REGISTRY }}/${{ matrix.component.ecr_repository }}:${{ matrix.component.image_tag }}
262268
# Disable scanning the current directory (defaults to .)

.github/workflows/build-node-python.yml

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,26 @@ on:
7979
required: false
8080
type: boolean
8181
default: false
82+
rust_enable:
83+
description: 'Enable Rust install'
84+
required: false
85+
type: boolean
86+
default: false
87+
cancel_in_progress:
88+
type: boolean
89+
default: true
8290
timeout:
8391
description: "Timeout for each job in minutes."
8492
type: number
8593
required: false
8694
default: 60
87-
95+
python_version:
96+
type: string
97+
required: false
98+
node_version:
99+
type: string
100+
required: false
101+
88102
secrets:
89103
DATAVISYN_BOT_REPO_TOKEN:
90104
required: false
@@ -101,10 +115,10 @@ on:
101115

102116
env:
103117
NPM_REGISTRY: "https://registry.npmjs.org/"
104-
NODE_VERSION: "20.9"
118+
NODE_VERSION: ${{ vars.NODE_VERSION || '20.9' }}
105119
PYPI_REGISTRY: "https://upload.pypi.org/legacy/"
106120
PYPI_USERNAME: "datavisyn"
107-
PYTHON_VERSION: "3.10"
121+
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.10' }}
108122
WORKFLOW_BRANCH: "main"
109123
POSTGRES_HOSTNAME: postgres_${{ github.job }}_${{ inputs.deduplication_id }}_${{ github.run_id }}_${{ github.run_attempt }}
110124

@@ -121,7 +135,7 @@ jobs:
121135
if: ${{ (!inputs.cypress_enable || (!inputs.cypress_run_because_flag && inputs.cypress_run_because_branch != 'true')) && (!inputs.playwright_enable || (!inputs.playwright_run_because_flag && inputs.playwright_run_because_branch != 'true')) }}
122136
concurrency:
123137
group: "node-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
124-
cancel-in-progress: true
138+
cancel-in-progress: ${{ inputs.cancel_in_progress }}
125139
permissions:
126140
id-token: write
127141
contents: write
@@ -144,10 +158,12 @@ jobs:
144158
with:
145159
enable_node: true
146160
enable_python: false
161+
# We probably won't need Rust on Node builds...
162+
# enable_rust: ${{ inputs.rust_enable }}
147163
run_parallel: ${{ inputs.run_parallel }}
148-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
164+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
149165
npm_registry: ${{ env.NPM_REGISTRY }}
150-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
166+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
151167
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
152168
run_node_bundle: ${{ inputs.node_run_webpack }}
153169
enable_node_cache: ${{ inputs.runs_on != 'self-hosted' }}
@@ -161,7 +177,7 @@ jobs:
161177
if: ${{ (!inputs.cypress_enable || (!inputs.cypress_run_because_flag && inputs.cypress_run_because_branch != 'true')) && (!inputs.playwright_enable || (!inputs.playwright_run_because_flag && inputs.playwright_run_because_branch != 'true')) }}
162178
concurrency:
163179
group: "python-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
164-
cancel-in-progress: true
180+
cancel-in-progress: ${{ inputs.cancel_in_progress }}
165181
permissions:
166182
id-token: write
167183
contents: write
@@ -183,10 +199,11 @@ jobs:
183199
with:
184200
enable_node: false
185201
enable_python: true
202+
enable_rust: ${{ inputs.rust_enable }}
186203
run_parallel: ${{ inputs.run_parallel }}
187-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
204+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
188205
npm_registry: ${{ env.NPM_REGISTRY }}
189-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
206+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
190207
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
191208
run_node_bundle: ${{ inputs.node_run_webpack }}
192209
enable_node_cache: ${{ inputs.runs_on != 'self-hosted' }}
@@ -199,7 +216,7 @@ jobs:
199216
if: ${{ inputs.cypress_enable && (inputs.cypress_run_because_flag || inputs.cypress_run_because_branch == 'true') }}
200217
concurrency:
201218
group: "node-python-cypress-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
202-
cancel-in-progress: true
219+
cancel-in-progress: ${{ inputs.cancel_in_progress }}
203220
permissions:
204221
id-token: write
205222
contents: write
@@ -273,10 +290,11 @@ jobs:
273290
- name: Build node and python
274291
uses: ./tmp/github-workflows/.github/actions/build-node-python
275292
with:
293+
enable_rust: ${{ inputs.rust_enable }}
276294
run_parallel: ${{ inputs.run_parallel }}
277-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
295+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
278296
npm_registry: ${{ env.NPM_REGISTRY }}
279-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
297+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
280298
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
281299
run_node_bundle: false # Disable the build here and call afterwards, as otherwise the yarn run env:decrypt will fail due to a missing yarn install
282300
enable_node_cache: ${{ inputs.cypress_runs_on != 'self-hosted' && inputs.runs_on != 'self-hosted' }}
@@ -339,7 +357,7 @@ jobs:
339357
if: ${{ inputs.playwright_enable && (inputs.playwright_run_because_flag || inputs.playwright_run_because_branch == 'true') }}
340358
concurrency:
341359
group: "node-python-playwright-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
342-
cancel-in-progress: true
360+
cancel-in-progress: ${{ inputs.cancel_in_progress }}
343361
permissions:
344362
id-token: write
345363
contents: write
@@ -415,10 +433,11 @@ jobs:
415433
- name: Build node and python
416434
uses: ./tmp/github-workflows/.github/actions/build-node-python
417435
with:
436+
enable_rust: ${{ inputs.rust_enable }}
418437
run_parallel: ${{ inputs.run_parallel }}
419-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
438+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
420439
npm_registry: ${{ env.NPM_REGISTRY }}
421-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
440+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
422441
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
423442
run_node_bundle: false # Disable the build here and call afterwards, as otherwise the yarn run env:decrypt will fail due to a missing yarn install
424443
run_playwright_browser_install: true
@@ -441,12 +460,13 @@ jobs:
441460
env:
442461
VISYN_CORE__SENTRY__FRONTEND_DSN: ${{ vars.PLAYWRIGHT__VISYN_CORE__SENTRY__FRONTEND_DSN }}
443462
VISYN_CORE__SENTRY__BACKEND_DSN: ${{ vars.PLAYWRIGHT__VISYN_CORE__SENTRY__BACKEND_DSN }}
444-
- name: Upload bundle
445-
uses: actions/upload-artifact@v4
446-
if: always()
447-
with:
448-
name: "bundles-${{ inputs.branch || github.sha }}"
449-
path: bundles/
463+
# Disable upload of bundles as there is no real value...
464+
# - name: Upload bundle
465+
# uses: actions/upload-artifact@v4
466+
# if: always()
467+
# with:
468+
# name: "bundles-${{ inputs.branch || github.sha }}"
469+
# path: bundles/
450470
- name: Upload playwright report
451471
uses: actions/upload-artifact@v4
452472
if: always()

.github/workflows/build-node.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
type: string
2222
required: false
2323
default: "ubuntu-22.04"
24+
node_version:
25+
type: string
26+
required: false
27+
2428
secrets:
2529
DATAVISYN_BOT_REPO_TOKEN:
2630
required: false
@@ -31,7 +35,7 @@ on:
3135

3236
env:
3337
NPM_REGISTRY: "https://registry.npmjs.org/"
34-
NODE_VERSION: "20.9"
38+
NODE_VERSION: ${{ vars.NODE_VERSION || '20.9' }}
3539
WORKFLOW_BRANCH: "main"
3640

3741
permissions:
@@ -69,7 +73,7 @@ jobs:
6973
with:
7074
enable_node: true
7175
enable_python: false
72-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
76+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
7377
npm_registry: ${{ env.NPM_REGISTRY }}
7478
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
7579
run_node_bundle: ${{ inputs.node_run_webpack }}

.github/workflows/build-product.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ concurrency:
3030

3131
env:
3232
TIME_ZONE: "Europe/Vienna"
33-
NODE_VERSION: "20.9"
34-
PYTHON_VERSION: "3.10"
33+
NODE_VERSION: ${{ vars.NODE_VERSION || '20.9' }}
34+
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.10' }}
3535
WORKFLOW_BRANCH: "main"
3636
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"
3737
DATAVISYN_PYTHON_BASE_IMAGE: "188237246440.dkr.ecr.eu-central-1.amazonaws.com/datavisyn/base/python:main"

.github/workflows/build-python.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
type: string
1212
required: false
1313
default: "ubuntu-22.04"
14+
python_version:
15+
type: string
16+
required: false
17+
1418
secrets:
1519
DATAVISYN_BOT_REPO_TOKEN:
1620
required: false
@@ -20,7 +24,7 @@ on:
2024
env:
2125
PYPI_REGISTRY: "https://upload.pypi.org/legacy/"
2226
PYPI_USERNAME: "test"
23-
PYTHON_VERSION: "3.10"
27+
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.10' }}
2428
WORKFLOW_BRANCH: "main"
2529

2630
permissions:
@@ -58,5 +62,5 @@ jobs:
5862
enable_node: false
5963
enable_python: true
6064
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
61-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
65+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
6266
enable_python_cache: ${{ inputs.runs_on != 'self-hosted' }}

.github/workflows/build-single-product-part.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ on:
5252
default: "ubuntu-22.04"
5353
env:
5454
TIME_ZONE: "Europe/Vienna"
55-
NODE_VERSION: "20.9"
56-
PYTHON_VERSION: "3.10"
55+
NODE_VERSION: ${{ vars.NODE_VERSION || '20.9' }}
56+
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.10' }}
5757
WORKFLOW_BRANCH: "main"
5858
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"
5959
DATAVISYN_PYTHON_BASE_IMAGE: "188237246440.dkr.ecr.eu-central-1.amazonaws.com/datavisyn/base/python:main"

.github/workflows/build-workspace-product-part.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,37 @@ on:
1818
GITLAB_HOST:
1919
required: false
2020
inputs:
21-
component:
22-
description: "component that should be built"
23-
required: true
24-
type: string
25-
image_tag1:
26-
description: "image tag 1 to push the image"
27-
required: true
28-
type: string
29-
image_tag2:
30-
description: "image tag 2 for labeling"
31-
required: true
32-
type: string
33-
build_time:
34-
description: "actually build time (in RFC 3339)"
35-
required: true
36-
type: string
37-
stage:
38-
description: "stage for the image (develop or production) depending on the branch name"
39-
required: true
40-
type: string
41-
timeout:
42-
description: "Timeout for each job in minutes."
43-
type: number
44-
required: false
45-
default: 60
21+
component:
22+
description: "component that should be built"
23+
required: true
24+
type: string
25+
image_tag1:
26+
description: "image tag 1 to push the image"
27+
required: true
28+
type: string
29+
image_tag2:
30+
description: "image tag 2 for labeling"
31+
required: true
32+
type: string
33+
build_time:
34+
description: "actually build time (in RFC 3339)"
35+
required: true
36+
type: string
37+
stage:
38+
description: "stage for the image (develop or production) depending on the branch name"
39+
required: true
40+
type: string
41+
timeout:
42+
description: "Timeout for each job in minutes."
43+
type: number
44+
required: false
45+
default: 60
46+
4647
env:
4748
VISYN_SCRIPTS_VERSION: "v7" # visyn_scripts@v7 is the last version with workspace support
4849
TIME_ZONE: "Europe/Vienna"
49-
NODE_VERSION: "20.9"
50-
PYTHON_VERSION: "3.10"
50+
NODE_VERSION: ${{ vars.NODE_VERSION || '20.9' }}
51+
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || '3.10' }}
5152
WORKFLOW_BRANCH: "main"
5253
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"
5354
DATAVISYN_PYTHON_BASE_IMAGE: "188237246440.dkr.ecr.eu-central-1.amazonaws.com/datavisyn/base/python:main"

0 commit comments

Comments
 (0)