Skip to content

Commit

Permalink
tests(spread): proper setup/restore for remote-build
Browse files Browse the repository at this point in the history
Initialize git and setup the repo and teardown correctly on restore.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
  • Loading branch information
sergiusens committed Jan 19, 2024
1 parent 06ce37c commit 735817f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/spread/general/remote-build/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,21 @@ prepare: |
fi
snapcraft init
# Commit the project
git config --global --add safe.directory "$PWD"
git add snap/snapcraft.yaml
git commit -m "Initial Commit"
# Setup launchpad token
mkdir -p ~/.local/share/snapcraft/provider/launchpad/
echo -e "$LAUNCHPAD_TOKEN" >> ~/.local/share/snapcraft/provider/launchpad/credentials
restore: |
rm -f ./*.snap ./*.txt
rm -rf snap .git
execute: |
export SNAPCRAFT_REMOTE_BUILD_STRATEGY="$STRATEGY"
Expand Down

0 comments on commit 735817f

Please sign in to comment.