move snap build to vol

This commit is contained in:
Boshi Lian 2022-04-03 23:33:35 +00:00
parent 7f745ed3ee
commit 8fe1e9cb7a
3 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View file

@ -24,7 +24,6 @@ _testmain.go
*.test
*.prof
sshpiperd/example/sshpiperd_key*
sshpiperd/snap
sshpiperd/sshpiperd
sshpiperd/__debug_bin
sshpiperd/sshpiperd.ini

View file

@ -1,4 +0,0 @@
#!/bin/bash
snapcraft clean
snapcraft

View file

@ -5,12 +5,17 @@ services:
image: snapcore/snapcraft
volumes:
- build:/build
- .:/stage
- stage:/stage
- ./snapcraft.yaml:/stage/snapcraft.yaml
- ./snap:/stage/snap
- .:/output
working_dir: /stage
depends_on:
- piper
command:
- "./build.sh"
command:
- "/bin/sh"
- "-c"
- "snapcraft clean && snapcraft && cp /stage/*.snap /output"
piper:
build:
context: ../..
@ -23,4 +28,5 @@ services:
- "-c"
- "/bin/cp /sshpiperd /build/sshpiperd && /build/sshpiperd version && sleep 1h"
volumes:
build:
build:
stage: