-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:noqdev/iambic
* 'main' of github.com:noqdev/iambic: (22 commits) Bump version Change sbom to json Bump version Bump version Trivy without exit code Use load_templates which support wrapping yaml problems and validation problems Bump version Clean up action files Publish job Wrap ValidationError with file path information Upload artifact give security-events write skip aws.mdx logout docker give write access to content NT Test temp GHA Trivy Scan and SBOM support Bump version Implement traceback in the git plan/apply workflow ...
- Loading branch information
Showing
18 changed files
with
335 additions
and
30 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
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,30 @@ | ||
name: Publish Release | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
security-events: write | ||
statuses: write | ||
discussions: write | ||
steps: | ||
- name: bootstrap | ||
run: | | ||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b /usr/local/bin v0.37.3 | ||
- uses: actions/checkout@v3 | ||
- name: scan container | ||
id: scan-container | ||
run: | | ||
docker logout ghcr.io | ||
make trivy_scan | ||
make trivy_sbom | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: iambic.sbom.json |
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
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
Empty file.
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,57 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from pydantic import Field | ||
|
||
from iambic.core.context import ExecutionContext | ||
from iambic.core.models import ( | ||
BaseModel, | ||
BaseTemplate, | ||
ExpiryModel, | ||
TemplateChangeDetails, | ||
) | ||
|
||
EXAMPLE_LOCAL_DATABASE_TEMPLATE_TYPE = "NOQ::Example::LocalDatabase" | ||
|
||
if TYPE_CHECKING: | ||
from iambic.plugins.v0_1_0.example.iambic_plugin import ExampleConfig | ||
|
||
|
||
class ExampleLocalDatabaseTemplateProperties(BaseModel): | ||
name: str = Field(..., description="name of Local Database") | ||
|
||
@property | ||
def resource_type(self) -> str: | ||
return "example:local_database:properties" | ||
|
||
@property | ||
def resource_id(self) -> str: | ||
return self.name | ||
|
||
|
||
class ExampleLocalDatabaseTemplate(BaseTemplate, ExpiryModel): | ||
template_type = EXAMPLE_LOCAL_DATABASE_TEMPLATE_TYPE | ||
properties: ExampleLocalDatabaseTemplateProperties = Field( | ||
..., description="Properties for Example Local Database Template" | ||
) | ||
name: str = Field(..., description="name of Local Database") | ||
|
||
@property | ||
def resource_type(self) -> str: | ||
return "example:local_database" | ||
|
||
@property | ||
def resource_id(self) -> str: | ||
return self.name | ||
|
||
async def apply( | ||
self, config: ExampleConfig, context: ExecutionContext | ||
) -> TemplateChangeDetails: | ||
template_changes = TemplateChangeDetails( | ||
resource_id=self.resource_id, | ||
resource_type=self.template_type, | ||
template_path=self.file_path, | ||
) | ||
template_changes.proposed_changes = [] | ||
return template_changes |
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
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "iambic" | ||
version = "0.1.57" | ||
version = "0.1.63" | ||
description = "The python package used to generate, parse, and execute noqform yaml templates." | ||
authors = ["Noq Software <[email protected]>"] | ||
readme = "README.md" | ||
|
Oops, something went wrong.