Skip to content

Latest commit

 

History

History
86 lines (56 loc) · 2.09 KB

dagger.md

File metadata and controls

86 lines (56 loc) · 2.09 KB

stuttgart-things/docs/dagger

SNIPPETS

CALL HELP FUNCTION (OF SUBCOMMAND)
dagger call -m "github.com/sagikazarmark/daggerverse/gh@main" release create --help
INIT MODULE
dagger init --sdk=go --source=./cicd --name cicd
CALL LOCAL MODULE
dagger call -m cicd/ go-pipeline --src ./
INSTALL DEPENDECY/b>
dagger install github.com/stuttgart-things/dagger/[email protected]
CALL FUNCTION (FROM DAGGERVERSE)
# OUTPUT TEXT
dagger call -m github.com/shykes/daggerverse/[email protected] hello --giant=false --name=pat

# SCAN IMAGE REF W/ AQUA TRIVY
dagger call -m github.com/jpadams/daggerverse/[email protected] scan-image --image-ref alpine/git:latest

# BUILD GO BINARY
dagger call -m github.com/felipecruz91/daggerverse/go build --source . --goVersion 1.23.1 -o bin

# LINT DOCKERFILE
dagger call -m github.com/disaster37/dagger-library-go/image lint --source . --dockerfile images/sthings-packer/Dockerfile

# BUILD & PUSH CONTAINER IMAGE
dagger call -m github.com/disaster37/dagger-library-go/image build --source . --dockerfile images/sthings-packer/Dockerfile push --repository-name stuttgart-things/test --registry-url ttl.sh --version 60m

# CLONE A GITHUB REPO
export GITHUB_TOKEN=whatever
dagger call --progress plain -m github.com/sagikazarmark/daggerverse/gh@main \
repo clone \
--repository stuttgart-things/stuttgart-things \
--token=env:GITHUB_TOKEN export --path=/tmp/repo/sthings
INSTALL DAGGER-CLI
curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
BASIC COMMANDS

https://docs.dagger.io/quickstart/daggerize

# CREATE MODULE (GO); SOURCE: ./hello; NAME: modules
dagger init --sdk=go --source=./hello --name modules

# RUN PIPELINE (PUBLISH=METHOD NAME)
dagger call publish --source=.