Skip to content

Commit

Permalink
Build cli snap workflow (#151)
Browse files Browse the repository at this point in the history
* Add a github workflow to publish the cli snap

* Update the README.rst with more information about snap publication

* Also enable manual triggering of snap and server charm builds
  • Loading branch information
plars committed Nov 14, 2023
1 parent 5093a85 commit 0be502e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cli-publish-snap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Testflinger CLI snap to edge
on:
push:
branches: ["main"]
paths:
- cli/**
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: snapcore/action-build@v1
id: build
with:
path: cli
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
release: edge
1 change: 1 addition & 0 deletions .github/workflows/server-charm-release-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
paths:
- server/**
workflow_dispatch:

jobs:
build:
Expand Down
16 changes: 12 additions & 4 deletions cli/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ the status of them, and getting results.
Installation
------------

You can either run testflinger-cli from a checkout of the code, or
install it like any other python project.
It is recommended that you install testflinger-cli from the snap, however it
can also be installed with pip directly from the source.

To run it from a checkout, please make sure to first install python3-click
and python3-requests
To install testflinger using the snap:

.. code-block:: console
$ sudo snap install testflinger-cli
When changes are made to the CLI, the snap is automatically built and uploaded
to the `edge` channel. Once sufficient testing has been performed, this snap
is also published to the `stable` channel. If you prefer to use the latest
code, then you can specify `edge` instead in the command above.

To install it in a virtual environment:

Expand Down

0 comments on commit 0be502e

Please sign in to comment.