-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
85 changed files
with
3,985 additions
and
1,761 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Checks | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
lint-job: | ||
name: Linting and Type checks (Python-${{ matrix.python-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: SCM Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: exasol/python-toolbox/.github/actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run Unit Tests | ||
run: poetry run nox -s test:unit | ||
|
||
- name: Run Lint | ||
run: poetry run nox -s lint:code | ||
|
||
- name: Run type-check | ||
run: poetry run nox -s lint:typing | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ".lint-python-${{ matrix.python-version }}.txt" | ||
path: .lint.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
default_stages: [ commit ] | ||
repos: | ||
|
||
- repo: local | ||
hooks: | ||
- id: code-format | ||
name: code-format | ||
types: [ python ] | ||
pass_filenames: false | ||
language: system | ||
entry: poetry run nox -s fix | ||
|
||
- repo: local | ||
hooks: | ||
- id: type-check | ||
name: type-check | ||
types: [ python ] | ||
pass_filenames: false | ||
language: system | ||
entry: poetry run nox -s type-check | ||
|
||
- repo: local | ||
hooks: | ||
- id: lint | ||
name: lint | ||
types: [ python ] | ||
pass_filenames: false | ||
language: system | ||
entry: poetry run nox -s lint | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# script-languages-container-ci-setup 1.6.0, tbd. | ||
|
||
Code name: tbd | ||
|
||
## Summary | ||
|
||
tbd | ||
|
||
## Bug Fixes | ||
|
||
n/a | ||
|
||
## Features / Enhancements | ||
|
||
n/a | ||
|
||
## Documentation | ||
|
||
n/a | ||
|
||
## Refactoring | ||
|
||
n/a | ||
|
||
## Dependencies | ||
|
||
n/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
from exasol_script_languages_container_ci_setup.cli.commands import ( | ||
health, | ||
generate_buildspec, | ||
generate_release_buildspec, | ||
deploy_source_credentials, | ||
deploy_ci_build, | ||
deploy_release_build, | ||
deploy_source_credentials, | ||
generate_buildspec, | ||
generate_release_buildspec, | ||
health, | ||
start_ci_build, | ||
start_release_build, | ||
start_test_release_build, | ||
validate_ci_build, | ||
validate_release_build, | ||
validate_source_credentials, | ||
start_release_build, | ||
start_test_release_build, | ||
start_ci_build | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 35 additions & 17 deletions
52
exasol_script_languages_container_ci_setup/cli/commands/generate_buildspec.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,51 @@ | ||
from pathlib import Path | ||
from typing import Tuple, Optional | ||
from typing import ( | ||
Optional, | ||
Tuple, | ||
) | ||
|
||
import click | ||
|
||
from exasol_script_languages_container_ci_setup.cli.cli import cli | ||
from exasol_script_languages_container_ci_setup.cli.common import add_options | ||
from exasol_script_languages_container_ci_setup.cli.options.logging import logging_options, set_log_level | ||
from exasol_script_languages_container_ci_setup.lib.run_generate_buildspec import run_generate_buildspec | ||
from exasol_script_languages_container_ci_setup.cli.options.logging import ( | ||
logging_options, | ||
set_log_level, | ||
) | ||
from exasol_script_languages_container_ci_setup.lib.run_generate_buildspec import ( | ||
run_generate_buildspec, | ||
) | ||
|
||
|
||
@cli.command() | ||
@add_options(logging_options) | ||
@click.option('--flavor-root-path', required=True, multiple=True, | ||
type=click.Path(file_okay=False, dir_okay=True, exists=True), | ||
help="Path where script language container flavors are located.") | ||
@click.option('--output-path', type=click.Path(file_okay=False, dir_okay=True, exists=True, writable=True), | ||
default="./aws-code-build/ci", show_default=True, | ||
help="Path where buildspec files will be deployed.") | ||
@click.option('--config-file', type=click.Path(file_okay=True, dir_okay=False, exists=True), | ||
help="Configuration file for build (project specific).") | ||
@click.option( | ||
"--flavor-root-path", | ||
required=True, | ||
multiple=True, | ||
type=click.Path(file_okay=False, dir_okay=True, exists=True), | ||
help="Path where script language container flavors are located.", | ||
) | ||
@click.option( | ||
"--output-path", | ||
type=click.Path(file_okay=False, dir_okay=True, exists=True, writable=True), | ||
default="./aws-code-build/ci", | ||
show_default=True, | ||
help="Path where buildspec files will be deployed.", | ||
) | ||
@click.option( | ||
"--config-file", | ||
type=click.Path(file_okay=True, dir_okay=False, exists=True), | ||
help="Configuration file for build (project specific).", | ||
) | ||
def generate_buildspecs( | ||
flavor_root_path: Tuple[str, ...], | ||
log_level: str, | ||
output_path: str, | ||
config_file: Optional[str] | ||
): | ||
flavor_root_path: Tuple[str, ...], | ||
log_level: str, | ||
output_path: str, | ||
config_file: Optional[str], | ||
): | ||
""" | ||
This command generates the buildspec file(s) for AWS CodeBuild based on the flavors located in path "flavor_root_path". | ||
""" | ||
set_log_level(log_level) | ||
run_generate_buildspec(flavor_root_path, output_path, config_file) | ||
|
Oops, something went wrong.