Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci/cd base #1028

Merged
merged 24 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/snap-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release jimmctl snap

on:
workflow_dispatch:
push:
tags:
- 'v1*'


# Note this workflow requires a Github secret to provide auth against snapstore.
# snapcraft export-login --snaps=PACKAGE_NAME --acls package_access,package_push,package_update,package_release exported.txt
# check this: https://github.com/snapcore/action-publish

jobs:
build:
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: scripts
run: |
mkdir -p ./snap
cp ./snaps/jimmctl/snapcraft.yaml ./snap/
- uses: snapcore/action-build@v1
id: snapcraft
- uses: actions/upload-artifact@v2
with:
name: ${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}

publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: ${{needs.build.outputs.snap}}
mina1460 marked this conversation as resolved.
Show resolved Hide resolved
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
store_login: ${{ secrets.STORE_LOGIN }}
snap: ${{needs.build.outputs.snap}}
release: '1/edge'

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ local/vault/roleid.txt
*.crt
*.key
*.csr
jimmctl
/jimmctl
qa-controller
11 changes: 7 additions & 4 deletions snaps/jaas/snapcraft.yaml → snaps/jimmctl/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: jaas
name: jimmctl
version: git
summary: JAAS client
description: Client for controlling JAAS multi-cloud juju controllers.
Expand All @@ -19,20 +19,23 @@ apps:
- dot-local-share-juju
- network


parts:
jimmctl:
plugin: go
source: ../..
source: ./
source-type: git
prime:
- bin/jimmctl
override-build: |
set -e
go install -mod readonly -p 16 -ldflags '-linkmode=external' github.com/canonical/jimm/cmd/jimmctl
go install -mod readonly -ldflags '-linkmode=external' github.com/canonical/jimm/cmd/jimmctl
files:
plugin: dump
source: files
source: snaps/jimmctl/files/
source-type: local
organize:
jimmctl.wrapper: bin/wrappers/jimmctl
prime:
Expand Down