34 lines
1.3 KiB
Python
34 lines
1.3 KiB
Python
# CI/CD Workshop
|
|
# Copyright (C) 2025 OpenBokeron
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
import os
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class RuntimeConfig:
|
|
app_version: str = os.getenv("APP_VERSION", "dev")
|
|
git_commit: str = os.getenv("GIT_COMMIT", "local")
|
|
build_number: str = os.getenv("BUILD_NUMBER", "-")
|
|
commit_author: str = os.getenv("COMMIT_AUTHOR", "local")
|
|
jenkins_base_url: str = os.getenv("JENKINS_BASE_URL", "localhost:8080")
|
|
jenkins_job_name: str = os.getenv("JENKINS_JOB_NAME", "")
|
|
jenkins_user: str = os.getenv("JENKINS_USER", "")
|
|
jenkins_token: str = os.getenv("JENKINS_TOKEN", "")
|
|
|
|
|
|
settings = RuntimeConfig()
|