feat: update to shuttle tag instead of branch
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Kasper Juul Hermansen 2023-05-05 23:41:55 +02:00
parent 9613ec57a4
commit 2d3c1a898a
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
2 changed files with 15 additions and 4 deletions

View File

@ -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("master"). 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,18 @@ 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",
}).
WithExec([]string{
"bash", "-c", "curl https://sh.rustup.rs -sSf | bash -s -- -y",
}).
WithExec([]string{
"bash", "-c", "echo 'source $HOME/.cargo/env' >> $HOME/.bashrc",
}).
WithWorkdir("/app"). WithWorkdir("/app").
WithFile("/usr/local/bin/shuttle", shuttle). WithFile("/usr/local/bin/shuttle", shuttle).
WithExec([]string{"shuttle", "version"}) WithExec([]string{"shuttle", "version"})
@ -113,7 +125,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

View File

@ -19,7 +19,7 @@ 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:1683322851258
volumes: volumes:
- name: dockersock - name: dockersock
path: /var/run path: /var/run