Compare commits
80 Commits
5adf004721
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
331e54efd7
|
|||
|
cc540bcca0
|
|||
|
ddc1126bd8
|
|||
|
a0e1fe5f95
|
|||
|
f3a4fcae62
|
|||
|
75cd3f9478
|
|||
|
390fef106d
|
|||
|
467b94fb5a
|
|||
|
57cf758a56
|
|||
|
97beda7482
|
|||
|
97433e5a7a
|
|||
|
7e1f53b5b0
|
|||
|
d44f678f2c
|
|||
|
25a77d941f
|
|||
|
34834e8c9b
|
|||
|
0732890cb3
|
|||
|
a4d2016752
|
|||
|
59cf673c80
|
|||
|
e1fafc8063
|
|||
|
8ec42c53a2
|
|||
|
c8e677c1e7
|
|||
|
7e085d15f2
|
|||
|
a63da99d5d
|
|||
|
2a983b9cdc
|
|||
|
e563bbfd0d
|
|||
|
4ff3acb1d3
|
|||
|
ed7e71e1c8
|
|||
|
55e125c3a4
|
|||
|
6e8ada5f5f
|
|||
|
09c5fd8870
|
|||
|
23f0be8b22
|
|||
| 7e1a56c38c | |||
| 590a27d1ba | |||
| 470fc1a23f | |||
| 41c035ea2a | |||
| 22f710549d | |||
| 7e52c75e8d | |||
| b33a3c50e8 | |||
| 98d6388409 | |||
| d3dac68402 | |||
| a09d5d6841 | |||
| 068e1ec8e0 | |||
| 734480962e | |||
| 8c65532aa7 | |||
| 0177540fc2 | |||
| 4c1a75ce23 | |||
| 8012a1db92 | |||
| 5785061ba9 | |||
| 1205ee63f3 | |||
| e2a478d1d8 | |||
| 707b10658a | |||
| a1519ace60 | |||
| 88da202a00 | |||
| 639ce47541 | |||
| 551b310670 | |||
| 64b3e32eb4 | |||
| e6ffb1a0c5 | |||
| 63de141cea | |||
|
b0b73434f0
|
|||
|
14539d2517
|
|||
| 2e43e6ce07 | |||
| 62484dc804 | |||
|
25092f613a
|
|||
|
dd4e6f6fcc
|
|||
|
0e914322f4
|
|||
|
9f6acb0f13
|
|||
|
2d3c1a898a
|
|||
|
9613ec57a4
|
|||
|
eaf13c82ef
|
|||
|
a7e7d082b4
|
|||
|
508c1e2025
|
|||
|
9cd7004f10
|
|||
|
ed5d4674d7
|
|||
|
fccc6f2433
|
|||
|
797de688d7
|
|||
|
f46847a523
|
|||
|
7d4f4cc700
|
|||
|
8e63b8ca02
|
|||
|
488955aaa5
|
|||
|
580653f3de
|
54
.drone.yml
54
.drone.yml
@@ -2,13 +2,13 @@ type: docker
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: "shuttle-drone-templates"
|
name: "shuttle-drone-templates"
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: "wait for dind"
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
environment:
|
environment:
|
||||||
#DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
DOCKER_USERNAME:
|
DOCKER_USERNAME:
|
||||||
@@ -19,22 +19,31 @@ steps:
|
|||||||
- sleep 10
|
- sleep 10
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME"
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME"
|
||||||
- name: "build"
|
- name: "build"
|
||||||
image: docker.io/kasperhermansen/shuttle-drone:1680894029336
|
image: docker.io/kasperhermansen/shuttle-drone:1690561756917
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
environment:
|
environment:
|
||||||
#DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
DOCKER_USERNAME:
|
DOCKER_USERNAME:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: gitea_id_ed25519
|
||||||
|
DRONE_TOKEN:
|
||||||
|
from_secret: drone_token
|
||||||
commands:
|
commands:
|
||||||
- ls /var/run
|
- exit 0
|
||||||
- set -eu
|
- set -eu
|
||||||
- sleep 10
|
- eval `ssh-agent`
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
||||||
|
- chmod -R 600 ~/.ssh
|
||||||
|
- ssh-add
|
||||||
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
||||||
- shuttle run build
|
- shuttle run build
|
||||||
|
- shuttle run ci
|
||||||
services:
|
services:
|
||||||
- name: docker
|
- name: docker
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
@@ -45,3 +54,36 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
temp: {}
|
temp: {}
|
||||||
|
---
|
||||||
|
type: docker
|
||||||
|
kind: pipeline
|
||||||
|
name: "release-please"
|
||||||
|
steps:
|
||||||
|
- name: release
|
||||||
|
image: marcoieni/release-plz:0.3.16
|
||||||
|
commands:
|
||||||
|
- mkdir -p .cargo
|
||||||
|
- |
|
||||||
|
cat <<EOF >> .cargo/config.toml
|
||||||
|
[registry]
|
||||||
|
default = "gitea"
|
||||||
|
|
||||||
|
[registries.gitea]
|
||||||
|
index = "https://git.kjuulh.io/kjuulh/_cargo-index.git"
|
||||||
|
|
||||||
|
#[net]
|
||||||
|
#git-fetch-with-cli = true
|
||||||
|
EOF
|
||||||
|
- |
|
||||||
|
cat <<EOF >> .cargo/credentials.toml
|
||||||
|
[registries.gitea]
|
||||||
|
token = "Bearer $GIT_TOKEN"
|
||||||
|
EOF
|
||||||
|
- release-plz release-pr --git-token="$GIT_TOKEN" --backend gitea --registry gitea
|
||||||
|
environment:
|
||||||
|
GIT_TOKEN:
|
||||||
|
from_secret: gitea_token
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
|||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1 +1,9 @@
|
|||||||
.shuttle/
|
.shuttle/
|
||||||
|
.env
|
||||||
|
|
||||||
|
|
||||||
|
# Added by cargo
|
||||||
|
|
||||||
|
/target
|
||||||
|
.cargo/config.toml
|
||||||
|
.cargo/credentials.toml
|
||||||
|
|||||||
8
Cargo.toml
Normal file
8
Cargo.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[package]
|
||||||
|
name = "shuttle-drone-templates"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
@@ -35,10 +35,10 @@ func Build(ctx context.Context) error {
|
|||||||
ctx = context.Background()
|
ctx = context.Background()
|
||||||
|
|
||||||
shuttleGit := client.
|
shuttleGit := client.
|
||||||
Git("git@github.com:kjuulh/shuttle.git", dagger.GitOpts{
|
Git("git@github.com:lunarway/shuttle.git", dagger.GitOpts{
|
||||||
KeepGitDir: true,
|
KeepGitDir: true,
|
||||||
}).
|
}).
|
||||||
Branch("shuttletask").
|
Tag("v0.17.2").
|
||||||
Tree(dagger.GitRefTreeOpts{
|
Tree(dagger.GitRefTreeOpts{
|
||||||
SSHAuthSocket: client.Host().UnixSocket(os.Getenv("SSH_AUTH_SOCK")),
|
SSHAuthSocket: client.Host().UnixSocket(os.Getenv("SSH_AUTH_SOCK")),
|
||||||
})
|
})
|
||||||
@@ -77,6 +77,29 @@ func Build(ctx context.Context) error {
|
|||||||
Platform: platform,
|
Platform: platform,
|
||||||
}).
|
}).
|
||||||
From("golang:1.20.3").
|
From("golang:1.20.3").
|
||||||
|
WithExec([]string{
|
||||||
|
"apt", "update",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"apt", "install", "-y", "curl", "build-essential",
|
||||||
|
}).
|
||||||
|
WithEnvVariable("RUSTUP_HOME", "/usr/local/rustup").
|
||||||
|
WithEnvVariable("CARGO_HOME", "/usr/local/cargo").
|
||||||
|
WithExec([]string{
|
||||||
|
"bash", "-c", "curl https://sh.rustup.rs -sSf | bash -s -- -y",
|
||||||
|
})
|
||||||
|
|
||||||
|
path, err := image.EnvVariable(ctx, "PATH")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
image = image.
|
||||||
|
WithEnvVariable(
|
||||||
|
"PATH", fmt.Sprintf("/usr/local/cargo/bin:%s", path),
|
||||||
|
).
|
||||||
|
WithExec([]string{"rustup", "toolchain", "install", "nightly"}).
|
||||||
|
WithExec([]string{"rustup", "default", "nightly"}).
|
||||||
WithWorkdir("/app").
|
WithWorkdir("/app").
|
||||||
WithFile("/usr/local/bin/shuttle", shuttle).
|
WithFile("/usr/local/bin/shuttle", shuttle).
|
||||||
WithExec([]string{"shuttle", "version"})
|
WithExec([]string{"shuttle", "version"})
|
||||||
@@ -85,6 +108,11 @@ func Build(ctx context.Context) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if _, err := image.WithExec([]string{"cargo", "--version"}).ExitCode(ctx); err != nil {
|
||||||
|
log.Printf("%v", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
image = image.WithFile("/usr/bin/docker", docker)
|
image = image.WithFile("/usr/bin/docker", docker)
|
||||||
if _, err := image.ExitCode(ctx); err != nil {
|
if _, err := image.ExitCode(ctx); err != nil {
|
||||||
log.Printf("%v", err)
|
log.Printf("%v", err)
|
||||||
@@ -113,7 +141,6 @@ func Build(ctx context.Context) error {
|
|||||||
dagger.ContainerPublishOpts{
|
dagger.ContainerPublishOpts{
|
||||||
PlatformVariants: containers,
|
PlatformVariants: containers,
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("%v", err)
|
log.Printf("%v", err)
|
||||||
return err
|
return err
|
||||||
91
actions/ci.go
Normal file
91
actions/ci.go
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
"path"
|
||||||
|
|
||||||
|
"dagger.io/dagger"
|
||||||
|
"github.com/joho/godotenv"
|
||||||
|
"golang.org/x/sync/errgroup"
|
||||||
|
)
|
||||||
|
|
||||||
|
func Ci(ctx context.Context) error {
|
||||||
|
_ = godotenv.Load()
|
||||||
|
|
||||||
|
client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
defer client.Close()
|
||||||
|
|
||||||
|
drone := client.
|
||||||
|
Container(dagger.ContainerOpts{Platform: "linux/amd64"}).
|
||||||
|
From("debian").
|
||||||
|
WithExec([]string{
|
||||||
|
"apt", "update",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"apt", "install", "-y", "wget", "tar",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"wget", "https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"tar", "-xvf", "drone_linux_amd64.tar.gz",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"mv", "drone", "/usr/local/bin",
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"drone", "--version",
|
||||||
|
})
|
||||||
|
|
||||||
|
_, err = drone.ExitCode(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
templates := client.Host().Directory("templates")
|
||||||
|
droneTemplates := drone.
|
||||||
|
WithEnvVariable("DRONE_SERVER", "https://ci.i.kjuulh.io").
|
||||||
|
WithEnvVariable("DRONE_TOKEN", os.Getenv("DRONE_TOKEN")).
|
||||||
|
WithExec([]string{"drone", "info"}).
|
||||||
|
WithMountedDirectory("/mnt/templates", templates).
|
||||||
|
WithWorkdir("/mnt/templates")
|
||||||
|
|
||||||
|
entries, err := templates.Entries(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
egrp, _ := errgroup.WithContext(ctx)
|
||||||
|
for _, entry := range entries {
|
||||||
|
entry := entry
|
||||||
|
egrp.Go(func() error {
|
||||||
|
name := path.Base(entry)
|
||||||
|
namespace := "kjuulh"
|
||||||
|
|
||||||
|
log.Printf("running for: %s", entry)
|
||||||
|
|
||||||
|
_, err := droneTemplates.
|
||||||
|
WithExec([]string{
|
||||||
|
"sh", "-c", fmt.Sprintf("drone template add --namespace %s --name %s --data @%s || true", namespace, name, name),
|
||||||
|
}).
|
||||||
|
WithExec([]string{
|
||||||
|
"drone", "template", "update", "--namespace", namespace, "--name", name, "--data", fmt.Sprintf("@%s", name),
|
||||||
|
}).
|
||||||
|
ExitCode(ctx)
|
||||||
|
|
||||||
|
return err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := egrp.Wait(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
@@ -1,32 +1,31 @@
|
|||||||
module shuttletask
|
module actions
|
||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
replace github.com/lunarway/shuttle => github.com/kjuulh/shuttle v0.0.0-20230407180512-4877329375cb
|
|
||||||
|
|
||||||
require (
|
require (
|
||||||
dagger.io/dagger v0.6.0
|
dagger.io/dagger v0.6.0
|
||||||
github.com/containerd/containerd v1.7.0
|
github.com/containerd/containerd v1.7.3
|
||||||
github.com/stretchr/testify v1.8.2
|
github.com/joho/godotenv v1.5.1
|
||||||
golang.org/x/sync v0.1.0
|
github.com/stretchr/testify v1.8.4
|
||||||
|
golang.org/x/sync v0.3.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Khan/genqlient v0.5.0 // indirect
|
github.com/Khan/genqlient v0.5.0 // indirect
|
||||||
github.com/adrg/xdg v0.4.0 // indirect
|
github.com/adrg/xdg v0.4.0 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/golang/protobuf v1.5.2 // indirect
|
github.com/golang/protobuf v1.5.3 // indirect
|
||||||
github.com/iancoleman/strcase v0.2.0 // indirect
|
github.com/iancoleman/strcase v0.2.0 // indirect
|
||||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
|
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||||
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
|
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
|
||||||
golang.org/x/mod v0.7.0 // indirect
|
golang.org/x/mod v0.9.0 // indirect
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
golang.org/x/sys v0.7.0 // indirect
|
||||||
golang.org/x/tools v0.5.0 // indirect
|
golang.org/x/tools v0.7.0 // indirect
|
||||||
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
|
||||||
google.golang.org/grpc v1.53.0 // indirect
|
google.golang.org/grpc v1.53.0 // indirect
|
||||||
google.golang.org/protobuf v1.28.1 // indirect
|
google.golang.org/protobuf v1.29.1 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
@@ -18,6 +18,10 @@ github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdK
|
|||||||
github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
|
github.com/bradleyjkemp/cupaloy/v2 v2.6.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0=
|
||||||
github.com/containerd/containerd v1.7.0 h1:G/ZQr3gMZs6ZT0qPUZ15znx5QSdQdASW11nXTLTM2Pg=
|
github.com/containerd/containerd v1.7.0 h1:G/ZQr3gMZs6ZT0qPUZ15znx5QSdQdASW11nXTLTM2Pg=
|
||||||
github.com/containerd/containerd v1.7.0/go.mod h1:QfR7Efgb/6X2BDpTPJRvPTYDE9rsF0FsXX9J8sIs/sc=
|
github.com/containerd/containerd v1.7.0/go.mod h1:QfR7Efgb/6X2BDpTPJRvPTYDE9rsF0FsXX9J8sIs/sc=
|
||||||
|
github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo=
|
||||||
|
github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI=
|
||||||
|
github.com/containerd/containerd v1.7.3 h1:cKwYKkP1eTj54bP3wCdXXBymmKRQMrWjkLSWZZJDa8o=
|
||||||
|
github.com/containerd/containerd v1.7.3/go.mod h1:32FOM4/O0RkNg7AjQj3hDzN9cUGtu+HMvaKUNiqCZB8=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
@@ -27,12 +31,16 @@ github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8
|
|||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
|
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||||
|
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||||
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
|
github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0=
|
||||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||||
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
|
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||||
@@ -70,6 +78,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
|
|||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||||
|
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||||
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||||
github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||||
github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
|
||||||
@@ -86,6 +96,8 @@ golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
|
|||||||
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
|
||||||
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
|
golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
|
||||||
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
|
golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs=
|
||||||
|
golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
@@ -97,6 +109,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
|
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||||
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@@ -111,6 +125,8 @@ golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
|
||||||
|
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
@@ -124,6 +140,8 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
|
|||||||
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||||
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
|
golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4=
|
||||||
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
|
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
|
||||||
|
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
|
||||||
|
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
@@ -136,6 +154,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
|||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
|
google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM=
|
||||||
|
google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
|
||||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
3
renovate.json
Normal file
3
renovate.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||||
|
}
|
||||||
3
src/main.rs
Normal file
3
src/main.rs
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
||||||
57
templates/drone-template.yaml
Normal file
57
templates/drone-template.yaml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: "drone-template"
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: load_secret
|
||||||
|
image: debian:buster-slim
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
path: /root/.ssh/
|
||||||
|
environment:
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: gitea_id_ed25519
|
||||||
|
commands:
|
||||||
|
- mkdir -p $HOME/.ssh/
|
||||||
|
- echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519
|
||||||
|
|
||||||
|
- name: build
|
||||||
|
image: kasperhermansen/cuddle:b58597e25d
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
path: /root/.ssh/
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
commands:
|
||||||
|
- git remote set-url origin $DRONE_GIT_SSH_URL
|
||||||
|
- eval `ssh-agent`
|
||||||
|
- chmod -R 600 ~/.ssh
|
||||||
|
- ssh-add
|
||||||
|
- cuddle x ci
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
CUDDLE_SECRETS_PROVIDER: 1password
|
||||||
|
CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci"
|
||||||
|
CUDDLE_SSH_AGENT: "true"
|
||||||
|
CUDDLE_ONE_PASSWORD_INJECT: "{{`DOCKER_USERNAME={{ op://application/docker_hub_credentials/username }},DOCKER_PASSWORD={{ op://application/docker_hub_credentials/password }}`}}"
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: gitea_id_ed25519
|
||||||
|
OP_SERVICE_ACCOUNT_TOKEN:
|
||||||
|
from_secret: op_service_account_token
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- "load_secret"
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: docker
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
temp: {}
|
||||||
|
- name: dockersock
|
||||||
|
temp: {}
|
||||||
@@ -1,18 +1,47 @@
|
|||||||
type: docker
|
type: docker
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: "drone-dagger-test"
|
name: "shuttle-drone-templates"
|
||||||
steps:
|
steps:
|
||||||
- name: "build"
|
- name: "wait for dind"
|
||||||
image: docker.io/kjuulh/shuttle-drone
|
image: docker:dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run
|
path: /var/run
|
||||||
environment:
|
environment:
|
||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
commands:
|
commands:
|
||||||
- sleep 5
|
- ls /var/run
|
||||||
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username="$${DOCKER_USERNAME}" "$${DOCKER_HOST}"
|
- set -eu
|
||||||
- shuttle run build
|
- sleep 10
|
||||||
|
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username="$${DOCKER_USERNAME}"
|
||||||
|
- name: "build"
|
||||||
|
image: docker.io/kasperhermansen/shuttle-drone:1683325750924
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DRONE_TOKEN:
|
||||||
|
from_secret: drone_token
|
||||||
|
SSH_KEY:
|
||||||
|
from_secret: gitea_id_ed25519
|
||||||
|
commands:
|
||||||
|
- set -eu
|
||||||
|
- eval `ssh-agent`
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
|
||||||
|
- chmod -R 600 ~/.ssh
|
||||||
|
- ssh-add
|
||||||
|
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
|
||||||
|
- shuttle run ci
|
||||||
services:
|
services:
|
||||||
- name: docker
|
- name: docker
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
|
|||||||
Reference in New Issue
Block a user