with readme
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2022-10-29 01:33:27 +02:00
parent 96f639c056
commit b77e7e0d69
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23
8 changed files with 50 additions and 0 deletions

13
README.md Normal file
View File

@ -0,0 +1,13 @@
# dagger drone test
Simply run below command to test your pipeline, can also be used through a
trusted repository in Droneci. But as we are using docker and dagger, this can
be done locally just as well
```bash
export dagger-tag=$(openssl rand -hex 12)
docker build -t dagger-test-builder:${dagger-tag} .
docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-test-builder:${dagger-tag} ./dagger 'https://github.com/kpenfound/greetings-api.git'
```
![recording of above command](assets/demo.gif)

BIN
assets/demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

2
recordings/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
scripts/
output/

10
recordings/record.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
rm -rf recordings/scripts
rm -rf recordings/output/
mkdir -p recordings/output
git clone https://github.com/paxtonhare/demo-magic recordings/scripts
asciinema rec recordings/output/output.cast --overwrite -c "recordings/script.sh"
agg recordings/output/output.cast assets/demo.gif

13
recordings/script.sh Executable file
View File

@ -0,0 +1,13 @@
. recordings/scripts/demo-magic.sh -w1
clear
pe "echo 'lets build a docker:dind which includes dagger-go-sdk for defining our pipeline and then lets run it =D'"
pe "cat test.fish"
pe "cat main.go"
pe "./test.fish"
exit

5
test.fish Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env fish
set dagger_tag (openssl rand -hex 12)
docker build -t dagger-test-builder:$dagger_tag .
docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-test-builder:$dagger_tag ./dagger 'https://github.com/kpenfound/greetings-api.git'

7
test.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
dagger_tag=$(openssl rand -hex 12)
docker build -t dagger-test-builder:${dagger_tag} .
docker run -v /var/run/docker.sock:/var/run/docker.sock dagger-test-builder:${dagger_tag} ./dagger 'https://github.com/kpenfound/greetings-api.git'