Skip to content

Commit

Permalink
Merge pull request #15 from kpenfound/demo_ci_traces
Browse files Browse the repository at this point in the history
Demo Traces
  • Loading branch information
kpenfound committed May 24, 2024
2 parents 01751b3 + dd679ff commit 08fc0ae
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
command: cd /usr/local && { curl -L https://dl.dagger.io/dagger/install.sh | sudo sh; cd -; }
- run:
name: Dagger Test Pipeline
command: dagger call --progress plain ci --source https://github.com/kpenfound/greetings-api\#${CIRCLE_SHA1}
command: dagger call --progress plain all --source https://github.com/kpenfound/greetings-api\#${CIRCLE_SHA1}
workflows:
test:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Dagger
uses: kpenfound/dagger-action@main
with:
args: ci --source https://github.com/kpenfound/greetings-api\#${GITHUB_REF_NAME} --release --tag $GITHUB_REF_NAME --infisical-token ${{ secrets.INFISICAL_TOKEN }} --infisical-project 6545b34313c9b9239b0f7183
args: all --source https://github.com/kpenfound/greetings-api\#${GITHUB_REF_NAME} --release --tag $GITHUB_REF_NAME --infisical-token ${{ secrets.INFISICAL_TOKEN }} --infisical-project 6545b34313c9b9239b0f7183
module: github.com/kpenfound/greetings-api
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
version: "0.10.2"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
- name: Dagger
uses: kpenfound/dagger-action@main
with:
args: ci --source https://github.com/kpenfound/greetings-api\#${GITHUB_REF_NAME}
args: all --source https://github.com/kpenfound/greetings-api\#${GITHUB_REF_NAME}
module: github.com/kpenfound/greetings-api
cloud-token: ${{ secrets.DAGGER_CLOUD_TOKEN }}
4 changes: 2 additions & 2 deletions DEMO.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ Secrets are retrieved at runtime from Infisical, a SaaS Secret Manager

Create a release of the project

`dagger call ci --source . --release --infisical-token $TOKEN`
`dagger call all --source . --release --infisical-token $TOKEN`

### CI without cloning the project/branch

Run the CI without even checking out a branch

`dagger -m github.com/kpenfound/greetings-api call ci --source https://github.com/kpenfound/greetings-api#main --release --infisical-token $TOKEN`
`dagger -m github.com/kpenfound/greetings-api call all --source https://github.com/kpenfound/greetings-api#main --release --infisical-token $TOKEN`
2 changes: 1 addition & 1 deletion ci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (g *Greetings) Deploy(ctx context.Context, source *Directory, flyToken *Sec
}

// Run the whole CI pipeline
func (g *Greetings) Ci(
func (g *Greetings) All(
ctx context.Context,
source *Directory,
// +optional
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ func main() {
}

func greeting() string {
greeting := "Hello Daggernauts!"
greeting := "Greetings Daggernauts!"
return fmt.Sprintf("{\"greeting\":\"%s\"}", greeting)
}
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func TestGreeting(t *testing.T) {
g := greeting()
should := "{\"greeting\":\"Hello Daggernauts!\"}"
should := "{\"greeting\":\"Greetings Daggernauts!\"}"

assert.Equal(t, should, g)
}

0 comments on commit 08fc0ae

Please sign in to comment.