portfolio-foundation
Reusable unprivileged Dagger foundation.
Installation
dagger install github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657bEntrypoint
Return Type
PortfolioFoundation ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
func (m *MyModule) Example() *dagger.PortfolioFoundation {
return dag.
Portfoliofoundation()
}@function
def example() -> dagger.PortfolioFoundation:
return (
dag.portfolio_foundation()
)@func()
example(): PortfolioFoundation {
return dag
.portfolioFoundation()
}Types
PortfolioFoundationCheckEvidence 🔗
Non-secret exact-green evidence safe to pass between Dagger modules.
repository() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
repositoryfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Repository(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.repository()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.repository()
}branch() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
branchfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Branch(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.branch()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.branch()
}commitSha() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
commit-shafunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Commitsha(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.commitsha()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.commitSha()
}workflowName() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-namefunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowname(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowname()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowName()
}workflowPath() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-pathfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowpath(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowpath()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowPath()
}checkName() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
check-namefunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Checkname(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.checkname()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.checkName()
}checkRunId() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
check-run-idfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Checkrunid(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.checkrunid()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.checkRunId()
}checkSuiteId() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
check-suite-idfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Checksuiteid(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.checksuiteid()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.checkSuiteId()
}workflowJobId() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-job-idfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowjobid(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowjobid()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowJobId()
}runAttempt() 🔗
Return Type
Integer ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
run-attemptfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) int {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Runattempt(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> int:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.runattempt()
)@func()
async example(githubToken: Secret, repository: string): Promise<number> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.runAttempt()
}checkStartedAt() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
check-started-atfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Checkstartedat(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.checkstartedat()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.checkStartedAt()
}checkCompletedAt() 🔗
Return Type
String Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
check-completed-atfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Checkcompletedat(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.checkcompletedat()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.checkCompletedAt()
}workflowRunId() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-run-idfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowrunid(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowrunid()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowRunId()
}workflowStartedAt() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-started-atfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowstartedat(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowstartedat()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowStartedAt()
}workflowCreatedAt() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-created-atfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowcreatedat(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowcreatedat()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowCreatedAt()
}workflowUpdatedAt() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
workflow-updated-atfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Workflowupdatedat(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.workflowupdatedat()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.workflowUpdatedAt()
}appId() 🔗
Return Type
Integer ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
app-idfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) int {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Appid(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> int:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.appid()
)@func()
async example(githubToken: Secret, repository: string): Promise<number> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.appId()
}serialization() 🔗
Return one canonical non-secret serialization of this evidence object.
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository string \
serializationfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string) string {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository).
Serialization(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str) -> str:
return await (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
.serialization()
)@func()
async example(githubToken: Secret, repository: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
.serialization()
}PortfolioFoundation 🔗
Expose typed foundations for unprivileged portfolio operations.
envelope() 🔗
Wrap a typed artifact with deterministic evidence.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| artifact | Directory ! | - | A directory. |
| consumerIdentity | String ! | - | No description provided |
| producingIdentity | String ! | - | No description provided |
| allowedRoots | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
envelope --artifact DIR_PATH --consumer-identity string --producing-identity string --allowed-roots string1 --allowed-roots string2func (m *MyModule) Example(artifact *dagger.Directory, consumerIdentity string, producingIdentity string, allowedRoots []string) *dagger.Directory {
return dag.
Portfoliofoundation().
Envelope(artifact, consumerIdentity, producingIdentity, allowedRoots)
}@function
def example(artifact: dagger.Directory, consumeridentity: str, producingidentity: str, allowedroots: List[str]) -> dagger.Directory:
return (
dag.portfolio_foundation()
.envelope(artifact, consumeridentity, producingidentity, allowedroots)
)@func()
example(artifact: Directory, consumerIdentity: string, producingIdentity: string, allowedRoots: string[]): Directory {
return dag
.portfolioFoundation()
.envelope(artifact, consumerIdentity, producingIdentity, allowedRoots)
}greenMain() 🔗
Resolve exact-green main evidence using a typed secret.
Return Type
PortfolioFoundationCheckEvidence !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubToken | Secret ! | - | A reference to a secret value, which can be handled more safely than the value itself. |
| repository | String ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
green-main --github-token env:MYSECRET --repository stringfunc (m *MyModule) Example(githubToken *dagger.Secret, repository string) *dagger.PortfolioFoundationCheckEvidence {
return dag.
Portfoliofoundation().
Greenmain(githubToken, repository)
}@function
def example(githubtoken: dagger.Secret, repository: str) -> dagger.PortfolioFoundationCheckEvidence:
return (
dag.portfolio_foundation()
.greenmain(githubtoken, repository)
)@func()
example(githubToken: Secret, repository: string): PortfolioFoundationCheckEvidence {
return dag
.portfolioFoundation()
.greenMain(githubToken, repository)
}guard() 🔗
Apply repository security checks to a bound source.
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | A directory. |
| repository | String ! | - | No description provided |
| commitSha | String ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
guard --source DIR_PATH --repository string --commit-sha stringfunc (m *MyModule) Example(source *dagger.Directory, repository string, commitSha string) *dagger.Container {
return dag.
Portfoliofoundation().
Guard(source, repository, commitSha)
}@function
def example(source: dagger.Directory, repository: str, commitsha: str) -> dagger.Container:
return (
dag.portfolio_foundation()
.guard(source, repository, commitsha)
)@func()
example(source: Directory, repository: string, commitSha: string): Container {
return dag
.portfolioFoundation()
.guard(source, repository, commitSha)
}source() 🔗
Bind a supplied workspace to a repository identity.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | A directory. |
| repository | String ! | - | No description provided |
| commitSha | String ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
source --source DIR_PATH --repository string --commit-sha stringfunc (m *MyModule) Example(source *dagger.Directory, repository string, commitSha string) *dagger.Directory {
return dag.
Portfoliofoundation().
Source(source, repository, commitSha)
}@function
def example(source: dagger.Directory, repository: str, commitsha: str) -> dagger.Directory:
return (
dag.portfolio_foundation()
.source(source, repository, commitsha)
)@func()
example(source: Directory, repository: string, commitSha: string): Directory {
return dag
.portfolioFoundation()
.source(source, repository, commitSha)
}verifyEnvelope() 🔗
Revalidate and return only a closed envelope’s artifact subtree.
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| envelope | Directory ! | - | A directory. |
| consumerIdentity | String ! | - | No description provided |
| producingIdentity | String ! | - | No description provided |
| allowedRoots | [String ! ] ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@6539b146c99208723848f5dea373ab255e22657b call \
verify-envelope --envelope DIR_PATH --consumer-identity string --producing-identity string --allowed-roots string1 --allowed-roots string2func (m *MyModule) Example(envelope *dagger.Directory, consumerIdentity string, producingIdentity string, allowedRoots []string) *dagger.Directory {
return dag.
Portfoliofoundation().
Verifyenvelope(envelope, consumerIdentity, producingIdentity, allowedRoots)
}@function
def example(envelope: dagger.Directory, consumeridentity: str, producingidentity: str, allowedroots: List[str]) -> dagger.Directory:
return (
dag.portfolio_foundation()
.verifyenvelope(envelope, consumeridentity, producingidentity, allowedroots)
)@func()
example(envelope: Directory, consumerIdentity: string, producingIdentity: string, allowedRoots: string[]): Directory {
return dag
.portfolioFoundation()
.verifyEnvelope(envelope, consumerIdentity, producingIdentity, allowedRoots)
}