portfolio-foundation
Reusable unprivileged Dagger foundation.
Installation
dagger install github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bfEntrypoint
Return Type
PortfolioFoundation ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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()
}PortfolioFoundationGreenMainDecision 🔗
Deploy-or-skip verdict for one requested commit; evidence exists only for main HEAD.
action() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
actionfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, commitSha string) string {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Action(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> str:
return await (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.action()
)@func()
async example(githubToken: Secret, repository: string, commitSha: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.action()
}commitSha() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
commit-shafunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, commitSha string) string {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Commitsha(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> str:
return await (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.commitsha()
)@func()
async example(githubToken: Secret, repository: string, commitSha: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.commitSha()
}mainSha() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
main-shafunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, commitSha string) string {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Mainsha(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> str:
return await (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.mainsha()
)@func()
async example(githubToken: Secret, repository: string, commitSha: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.mainSha()
}message() 🔗
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
messagefunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, commitSha string) string {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Message(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> str:
return await (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.message()
)@func()
async example(githubToken: Secret, repository: string, commitSha: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.message()
}evidence() 🔗
Return Type
PortfolioFoundationCheckEvidence Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
evidencefunc (m *MyModule) Example(githubToken *dagger.Secret, repository string, commitSha string) *dagger.PortfolioFoundationCheckEvidence {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Evidence()
}@function
def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> dagger.PortfolioFoundationCheckEvidence:
return (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.evidence()
)@func()
example(githubToken: Secret, repository: string, commitSha: string): PortfolioFoundationCheckEvidence {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.evidence()
}serialization() 🔗
Return one canonical serialization; read it once, the call is uncached.
Return Type
String ! Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha string \
serializationfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, commitSha string) string {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha).
Serialization(ctx)
}@function
async def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> str:
return await (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
.serialization()
)@func()
async example(githubToken: Secret, repository: string, commitSha: string): Promise<string> {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
.serialization()
}PortfolioFoundation 🔗
Expose typed foundations for unprivileged portfolio operations.
docsOnly() 🔗
Return true only when base…head changes nothing but plain Markdown docs.
Pass the pull request base SHA. With no base (push, schedule, dispatch) the answer is always false, so main and delivery paths always run the full gate.
Return Type
Boolean !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repository | String ! | - | No description provided |
| headSha | String ! | - | No description provided |
| baseSha | String ! | "" | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
docs-only --repository string --head-sha string --base-sha stringfunc (m *MyModule) Example(ctx context.Context, repository string, headSha string, baseSha string) bool {
return dag.
Portfoliofoundation().
Docsonly(ctx, repository, headSha, baseSha)
}@function
async def example(repository: str, headsha: str, basesha: str) -> bool:
return await (
dag.portfolio_foundation()
.docsonly(repository, headsha, basesha)
)@func()
async example(repository: string, headSha: string, baseSha: string): Promise<boolean> {
return dag
.portfolioFoundation()
.docsOnly(repository, headSha, baseSha)
}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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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)
}greenMainDecision() 🔗
Deploy commit_sha only if it is main’s exact-green HEAD; skip it if main moved on.
A deploy triggered for an older commit gets action “skip” (exit success, no evidence) so it can never overwrite the newer commit’s deploy. A HEAD commit without a green Dagger attempt still fails closed.
Return Type
PortfolioFoundationGreenMainDecision !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 |
| commitSha | String ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
green-main-decision --github-token env:MYSECRET --repository string --commit-sha stringfunc (m *MyModule) Example(githubToken *dagger.Secret, repository string, commitSha string) *dagger.PortfolioFoundationGreenMainDecision {
return dag.
Portfoliofoundation().
Greenmaindecision(githubToken, repository, commitSha)
}@function
def example(githubtoken: dagger.Secret, repository: str, commitsha: str) -> dagger.PortfolioFoundationGreenMainDecision:
return (
dag.portfolio_foundation()
.greenmaindecision(githubtoken, repository, commitsha)
)@func()
example(githubToken: Secret, repository: string, commitSha: string): PortfolioFoundationGreenMainDecision {
return dag
.portfolioFoundation()
.greenMainDecision(githubToken, repository, commitSha)
}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 |
| httpAuthHeader | Secret | null | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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)
}releaseLineage() 🔗
Prove a release candidate run was built from main before anything publishes it.
Return Type
String !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 |
| runId | Integer ! | - | No description provided |
| headSha | String ! | - | No description provided |
| publishRunId | Integer ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
release-lineage --github-token env:MYSECRET --repository string --run-id integer --head-sha string --publish-run-id integerfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repository string, runId int, headSha string, publishRunId int) string {
return dag.
Portfoliofoundation().
Releaselineage(ctx, githubToken, repository, runId, headSha, publishRunId)
}@function
async def example(githubtoken: dagger.Secret, repository: str, runid: int, headsha: str, publishrunid: int) -> str:
return await (
dag.portfolio_foundation()
.releaselineage(githubtoken, repository, runid, headsha, publishrunid)
)@func()
async example(githubToken: Secret, repository: string, runId: number, headSha: string, publishRunId: number): Promise<string> {
return dag
.portfolioFoundation()
.releaseLineage(githubToken, repository, runId, headSha, publishRunId)
}releaseProvenance() 🔗
Prove lineage, then return npm’s provenance context for the publish run.
Return Type
File !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 |
| runId | Integer ! | - | No description provided |
| headSha | String ! | - | No description provided |
| publishRunId | Integer ! | - | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf call \
release-provenance --github-token env:MYSECRET --repository string --run-id integer --head-sha string --publish-run-id integerfunc (m *MyModule) Example(githubToken *dagger.Secret, repository string, runId int, headSha string, publishRunId int) *dagger.File {
return dag.
Portfoliofoundation().
Releaseprovenance(githubToken, repository, runId, headSha, publishRunId)
}@function
def example(githubtoken: dagger.Secret, repository: str, runid: int, headsha: str, publishrunid: int) -> dagger.File:
return (
dag.portfolio_foundation()
.releaseprovenance(githubtoken, repository, runid, headsha, publishrunid)
)@func()
example(githubToken: Secret, repository: string, runId: number, headSha: string, publishRunId: number): File {
return dag
.portfolioFoundation()
.releaseProvenance(githubToken, repository, runId, headSha, publishRunId)
}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 |
| httpAuthHeader | Secret | null | No description provided |
Example
dagger -m github.com/hseshadr/ci/modules/portfolio-foundation@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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@4d48302e30d3a54ec71364d43aada5c0d4b1f9bf 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)
}