Skip to content

Commit

Permalink
update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
aiqs4 committed Feb 20, 2020
1 parent bd4e4b9 commit f40f665
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,39 @@ environment:
# LANG: null
LC_ALL: C

LD_LIBRARY_PATH: $SNAP/usr/lib/runner:$LD_LIBRARY_PATH

apps:
gh-runner:
command: usr/runner/run.sh
command: usr/lib/runner/run.sh
gh-config:
command: usr/runner/config.sh
command: usr/lib/runner/config.sh
gh-env:
command: usr/runner/env.sh
command: usr/lib/runner/env.sh

hooks:
install:
plugs:
- mount-observe # to read /proc/*/mounts
- network # to connect to the db for running upgrades
post-refresh:
plugs:
- mount-observe # to read /proc/*/mounts
- network # to connect to the db for running upgrades

layout:
/var/lib/runner/_work:
bind: $SNAP/usr/lib/runner/_work
/var/lib/runner/_diag:
bind: $SNAP/usr/lib/runner/_diag
/var/lib/runner/.runner:
bind-file: $SNAP/usr/lib/runner/.runner
/var/lib/runner/.credentials_rsaparams:
bind-file: $SNAP/usr/lib/runner/.credentials_rsaparams
/var/lib/runner/.credentials:
bind-file: $SNAP/usr/lib/runner/.credentials
/var/lib/runner/svc.sh:
bind-file: $SNAP/usr/lib/runner/svc.sh

parts:
externals:
Expand All @@ -46,8 +72,14 @@ parts:
snapcraftctl build
override-stage: |
set -ex
mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/runner
cd ${SNAPCRAFT_PART_INSTALL}/usr/runner
mkdir -p ${SNAPCRAFT_PART_INSTALL}/usr/lib/runner
mkdir -p ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/_work
mkdir -p ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/_diag
touch ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/.runner
touch ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/.credentials
touch ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/.credentials_rsaparams
touch ${SNAPCRAFT_PART_INSTALL}/var/lib/runner/svc.sh
cd ${SNAPCRAFT_PART_INSTALL}/usr/lib/runner
tar xzf "${SNAPCRAFT_PART_BUILD}/_package/actions-runner-linux-x64-2.165.0.tar.gz"
snapcraftctl stage
build-packages:
Expand All @@ -62,4 +94,5 @@ parts:
#- libicu63
stage:
- usr/
- var/

0 comments on commit f40f665

Please sign in to comment.