Skip to content

Commit 6423c50

Browse files
committed
refactor(docker): Externalize versions to an .env file
Dotenv [1] makes it easier to share / handle environment variable key-value pairs across tools. [1]: https://www.dotenv.org/ Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent b318bb7 commit 6423c50

File tree

7 files changed

+35
-36
lines changed

7 files changed

+35
-36
lines changed

.env.versions

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ANDROID_CMD_VERSION=13114758
2+
ASKALONO_VERSION=0.5.0
3+
BAZELISK_VERSION=1.20.0
4+
BOWER_VERSION=1.8.14
5+
COCOAPODS_VERSION=1.16.2
6+
COMPOSER_VERSION=2.8.4
7+
CONAN_VERSION=1.66.0
8+
CONAN2_VERSION=2.14.0
9+
DART_VERSION=2.18.4
10+
DOTNET_VERSION=6.0
11+
GO_VERSION=1.24.5
12+
HASKELL_STACK_VERSION=2.13.1
13+
JAVA_VERSION=21
14+
LICENSEE_VERSION=9.18.0
15+
NODEJS_VERSION=22.13.0
16+
NUGET_INSPECTOR_VERSION=0.9.12
17+
PHP_VERSION=8.3
18+
PIP_VERSION=25.0.1
19+
PYENV_GIT_TAG=v2.6.3
20+
PYTHON_INSPECTOR_VERSION=0.14.3
21+
PYTHON_PIPENV_VERSION=2023.12.1
22+
PYTHON_POETRY_VERSION=2.1.3
23+
PYTHON_POETRY_PLUGIN_EXPORT_VERSION=1.9.0
24+
PYTHON_SETUPTOOLS_VERSION=74.1.3
25+
PYTHON_VERSION=3.13.5
26+
RUBY_VERSION=3.4.4
27+
RUST_VERSION=1.87.0
28+
SBT_VERSION=1.10.0
29+
SCANCODE_VERSION=32.4.1
30+
SWIFT_VERSION=6.0.3
31+
UBUNTU_VERSION=jammy

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
with:
8989
submodules: recursive
9090
- name: Set tool version environment variables
91-
run: sed "s/^ARG //" docker/versions.dockerfile >> $GITHUB_ENV
91+
run: cat .env.versions >> $GITHUB_ENV
9292
- name: Install required tools
9393
run: |
9494
# Install git-repo.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# SPDX-License-Identifier: Apache-2.0
2020
# License-Filename: LICENSE
2121

22-
INCLUDE docker/versions.dockerfile
22+
INCLUDE_ARGS .env.versions
2323

2424
# Use OpenJDK Eclipe Temurin Ubuntu LTS
2525
FROM eclipse-temurin:$JAVA_VERSION-jdk-$UBUNTU_VERSION AS base

REUSE.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ SPDX-FileCopyrightText = "2021 The ORT Project Authors (see <https://github.com/
8181
SPDX-License-Identifier = "Apache-2.0"
8282

8383
[[annotations]]
84-
path = "docker/versions.dockerfile"
84+
path = ".env.versions"
8585
SPDX-FileCopyrightText = "2024 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>)"
8686
SPDX-License-Identifier = "Apache-2.0"
8787

buildSrc/src/main/kotlin/LicenseUtils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ object CopyrightableFiles {
2828
"REUSE.toml",
2929
"gradlew",
3030
"gradle/",
31-
"docker/versions.dockerfile",
3231
"examples/",
3332
"integrations/completions/",
3433
"plugins/reporters/asciidoc/src/main/resources/pdf-theme/pdf-theme.yml",

docker/versions.dockerfile

Lines changed: 0 additions & 31 deletions
This file was deleted.

scripts/docker_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DOCKER_IMAGE_ROOT="${DOCKER_IMAGE_ROOT:-ghcr.io/oss-review-toolkit}"
2626
echo "Setting ORT_VERSION to $ORT_VERSION."
2727

2828
# shellcheck disable=SC2046
29-
export $(sed "s/^ARG //" "$GIT_ROOT/docker/versions.dockerfile" | xargs)
29+
export $(cat "$GIT_ROOT/.env.versions" | xargs)
3030

3131
# ---------------------------
3232
# image_build function

0 commit comments

Comments
 (0)