Skip to content
Merged
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
46 changes: 7 additions & 39 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,41 +29,9 @@ jobs:
- name: run unit tests
run: go test ./pkg/... -v

integration:
deploy:
needs: test
runs-on: ubuntu-24.04-arm
permissions:
contents: read
id-token: write
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.RELEVANT_BRANCH }}

- name: setup docker
uses: ./.github/actions/docker

- name: setup stage
uses: ./.github/actions/stages
with:
stage: build
account: prod

- name: ecr login
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: build
run: |
GIT_BRANCH=${{ env.RELEVANT_BRANCH }} \
GIT_SHA=${{ env.RELEVANT_SHA }} \
docker buildx bake echo --push

deployment:
needs: integration
runs-on: ubuntu-24.04-arm
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -91,12 +59,13 @@ jobs:
ecr_registry_id: 677771948337
ecr_registry_region: us-west-2

- name: deploy
- name: deploy e2e actor
run: |
go run cmd/monad/main.go deploy \
--chdir e2e/echo \
--env .env.tmpl \
--policy policy.json.tmpl \
--service e2e \
--image bkeane/actress/src:main \
--env e2e/.env.tmpl \
--policy e2e/policy.json.tmpl \
--bus default \
--memory 256 \
--disk 1024 \
Expand All @@ -109,10 +78,9 @@ jobs:

e2e:
runs-on: ubuntu-24.04-arm
needs: deployment
needs: deploy
env:
TERM: xterm-color
MONAD_SERVICE: echo
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: destroy
run: |
go run cmd/monad/main.go \
--chdir e2e/echo \
--chdir e2e \
--branch ${{ env.RELEVANT_BRANCH }} \
destroy

Expand Down
16 changes: 15 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,26 @@ archives:
- goos: windows
formats: [zip]

brews:
homebrew_casks:
- name: monad
repository:
owner: bkeane
name: taps
token: "{{ .Env.GITHUB_PERSONAL_AUTH_TOKEN }}"
directory: Casks
homepage: "https://github.com/bkeane/monad"
description: "Monad CLI tool"
license: "MIT"
binary: monad
url:
verified: github.com/bkeane/monad
commit_author:
name: goreleaserbot
email: bot@goreleaser.com
commit_msg_template: "Brew cask update for {{ .ProjectName }} version {{ .Tag }}"
skip_upload: auto
test: |
system "#{bin}/monad", "--version"

changelog:
sort: asc
Expand Down
12 changes: 12 additions & 0 deletions cmd/monad/desc/desc.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,15 @@ Examples:

Use --owner='*', --repo='*', --branch='*' for unfiltered results (quotes required).`
}

// EcrList returns a description for the ecr list command with filtering information
func EcrList() string {
return `List ECR artifacts filtered by current git context.

Examples:
monad ecr list # Current repo/service only
monad ecr list --service='*' # All services (note quotes)
monad ecr list --owner='*' --repo='*' --service='*' # All artifacts

Use --owner='*', --repo='*', --service='*' for unfiltered results (quotes required).`
}
21 changes: 20 additions & 1 deletion cmd/monad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func main() {
},
{
Name: "tag",
Usage: "print basis image",
Usage: "print tag",
Action: func(ctx context.Context, cmd *cli.Command) error {
basis, err := pkg.Basis(ctx)
if err != nil {
Expand All @@ -179,6 +179,25 @@ func main() {
return nil
},
},
{
Name: "list",
Usage: "list artifacts",
Description: desc.EcrList(),
Action: func(ctx context.Context, cmd *cli.Command) error {
registry, err := pkg.Registry(ctx)
if err != nil {
return err
}

table, err := registry.Table(ctx)
if err != nil {
return err
}

fmt.Println(table)
return nil
},
},
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/vue/src/components/Artifact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import basic from '../../assets/diagrams/deployment-basic-1.png'
<p>
<NewThought>OCI Images stored on ECR</NewThought> are the deployable artifact of Monad.
If convention is followed these artifacts have an entrypoint of a webserver. So
even though Monad is a serverless deployment approach, it's standard artifact is compatible
even though Monad is a serverless deployment approach, its standard artifact is compatible
with any container runtime capable of managing containerized webservers<Sidenote>
<a href="https://github.com/awslabs/aws-lambda-web-adapter">AWS Lambda Web Adapter</a>
</Sidenote>.
Expand Down
24 changes: 10 additions & 14 deletions docs/vue/src/components/Event.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import worker from '../../assets/diagrams/deployment-event-1.png';

<section id="rule">
<h2>Rule</h2>
<p>By default the lambda will be invoked by events matching a unicast pattern...</p>
<p>The default rule used provided you have also declared a bus is:</p>
<CodeBlock language="json">
{{`{
"source": [{
Expand All @@ -47,17 +47,18 @@ import worker from '../../assets/diagrams/deployment-event-1.png';
}
}`}}
</CodeBlock>
<p>... roughly translated:</p>
<ul>
<li>source: any service within this repository & branch</li>
<li>destination: this service on this branch</li>
</ul>
<p>The rule flag can be used to customize event matching rules<Sidenote><a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html">eventbridge rule</a></Sidenote><Sidenote><a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-pattern-sandbox.html">eventBridge sandbox</a></Sidenote>:</p>
<p>Which approximates unicast behavior.</p>
<p>The rule flag can be used to provide your own custom event matching rule:<Sidenote><a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html">eventbridge rule</a></Sidenote><Sidenote><a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-pattern-sandbox.html">eventbridge sandbox</a></Sidenote>:</p>
<CodeBlock language="bash">
{{`monad deploy --bus $bus --rule ./rule.json.tmpl`}}
</CodeBlock>
<h3>Example</h3>
<p>Let's say you wanted broadcast behavior instead of the afformentioned unicast behavior</p>
<p>Or rules:</p>
<CodeBlock language="bash">
{{`monad deploy --bus $bus --rule ./s3_events.json.tmpl --rule cron.tmpl`}}
</CodeBlock>
<h3>Unicast & Multicast</h3>
<p>The default rule above is a unicast style rule, with a broadcast domain of the repo & branch.</p>
<p>Let's say you wanted multicast behavior instead of the afformentioned unicast behavior:</p>
<CodeBlock language="json">
{{`{
"source": [{
Expand All @@ -71,11 +72,6 @@ import worker from '../../assets/diagrams/deployment-event-1.png';
}
`}}
</CodeBlock>
<p>... roughly translated:</p>
<ul>
<li>source: any service except for itself</li>
<li>destination: any service within this repository & branch</li>
</ul>
</section>

<section id="configuration">
Expand Down
File renamed without changes.
89 changes: 0 additions & 89 deletions e2e/echo/.dockerignore

This file was deleted.

11 changes: 0 additions & 11 deletions e2e/echo/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions e2e/echo/requirements.txt

This file was deleted.

42 changes: 0 additions & 42 deletions e2e/echo/src/cloudwatch.py

This file was deleted.

Loading
Loading