Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ sphinx-rtd-theme = "^3.0.2"
gl-cname = "gardenlinux.features.cname_main:main"
gl-features-parse = "gardenlinux.features.__main__:main"
gl-flavors-parse = "gardenlinux.flavors.__main__:main"
gl-gh-release = "gardenlinux.github.release.__main__:main"
gl-oci = "gardenlinux.oci.__main__:main"
gl-s3 = "gardenlinux.s3.__main__:main"

Expand Down
2 changes: 1 addition & 1 deletion src/gardenlinux/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@

S3_DOWNLOADS_DIR = Path(os.path.dirname(__file__)) / ".." / "s3_downloads"

GL_DEB_REPO_BASE_URL = "https://packages.gardenlinux.io/gardenlinux"
GLVD_BASE_URL = (
"https://glvd.ingress.glvd.gardnlinux.shoot.canary.k8s-hana.ondemand.com/v1"
)
GL_DEB_REPO_BASE_URL = "https://packages.gardenlinux.io/gardenlinux"

GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME = "gardenlinux-github-releases"

Expand Down
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
from gardenlinux.constants import GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME
from gardenlinux.logger import LoggerSetup

from .release import create_github_release, upload_to_github_release_page, write_to_release_id_file
from .release_notes import create_github_release_notes
from . import (
create_github_release,
upload_to_github_release_page,
write_to_release_id_file,
)
from ..release_notes import create_github_release_notes

LOGGER = LoggerSetup.get_logger("gardenlinux.github", "INFO")

Expand All @@ -18,7 +22,7 @@ def main():
create_parser.add_argument("--repo", default="gardenlinux")
create_parser.add_argument("--tag", required=True)
create_parser.add_argument("--commit", required=True)
create_parser.add_argument('--latest', action='store_true', default=False)
create_parser.add_argument("--latest", action="store_true", default=False)
create_parser.add_argument("--dry-run", action="store_true", default=False)

upload_parser = subparsers.add_parser("upload")
Expand Down
10 changes: 5 additions & 5 deletions tests/github/test_github_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

import gardenlinux.github.__main__ as gh
import gardenlinux.github.release.__main__ as gh
from gardenlinux.constants import GARDENLINUX_GITHUB_RELEASE_BUCKET_NAME

from ..constants import TEST_GARDENLINUX_COMMIT, TEST_GARDENLINUX_RELEASE
Expand Down Expand Up @@ -44,7 +44,7 @@ def test_script_create_dry_run(monkeypatch, capfd):

monkeypatch.setattr(sys, "argv", ["gh", "create", "--owner", "gardenlinux", "--repo",
"gardenlinux", "--tag", TEST_GARDENLINUX_RELEASE, "--commit", TEST_GARDENLINUX_COMMIT, "--dry-run"])
monkeypatch.setattr("gardenlinux.github.__main__.create_github_release_notes",
monkeypatch.setattr("gardenlinux.github.release.__main__.create_github_release_notes",
lambda tag, commit, bucket: f"{tag} {commit} {bucket}")

gh.main()
Expand All @@ -57,9 +57,9 @@ def test_script_create_dry_run(monkeypatch, capfd):
def test_script_create(monkeypatch, caplog):
monkeypatch.setattr(sys, "argv", ["gh", "create", "--owner", "gardenlinux", "--repo",
"gardenlinux", "--tag", TEST_GARDENLINUX_RELEASE, "--commit", TEST_GARDENLINUX_COMMIT])
monkeypatch.setattr("gardenlinux.github.__main__.create_github_release_notes",
monkeypatch.setattr("gardenlinux.github.release.__main__.create_github_release_notes",
lambda tag, commit, bucket: f"{tag} {commit} {bucket}")
monkeypatch.setattr("gardenlinux.github.__main__.create_github_release",
monkeypatch.setattr("gardenlinux.github.release.__main__.create_github_release",
lambda a1, a2, a3, a4, a5, a6: TEST_GARDENLINUX_RELEASE)

gh.main()
Expand All @@ -71,7 +71,7 @@ def test_script_create(monkeypatch, caplog):
def test_script_upload_dry_run(monkeypatch, capfd):
monkeypatch.setattr(sys, "argv", ["gh", "upload", "--owner", "gardenlinux", "--repo",
"gardenlinux", "--release_id", TEST_GARDENLINUX_RELEASE, "--file_path", "foo", "--dry-run"])
monkeypatch.setattr("gardenlinux.github.__main__.upload_to_github_release_page",
monkeypatch.setattr("gardenlinux.github.release.__main__.upload_to_github_release_page",
lambda a1, a2, a3, a4, dry_run: print(f"dry-run: {dry_run}"))

gh.main()
Expand Down
4 changes: 2 additions & 2 deletions tests/github/test_upload_to_github_release_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import requests
import requests_mock

import gardenlinux.github.__main__ as gh
import gardenlinux.github.release.__main__ as gh
from gardenlinux.github.release import upload_to_github_release_page

from ..constants import TEST_GARDENLINUX_RELEASE
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_script_parse_args_upload_command_required_args(monkeypatch, capfd):
def test_script_upload_dry_run(monkeypatch, capfd):
monkeypatch.setattr(sys, "argv", ["gh", "upload", "--owner", "gardenlinux", "--repo",
"gardenlinux", "--release_id", TEST_GARDENLINUX_RELEASE, "--file_path", "foo", "--dry-run"])
monkeypatch.setattr("gardenlinux.github.__main__.upload_to_github_release_page",
monkeypatch.setattr("gardenlinux.github.release.__main__.upload_to_github_release_page",
lambda a1, a2, a3, a4, dry_run: print(f"dry-run: {dry_run}"))

gh.main()
Expand Down
Loading