Skip to content

Commit 81a6776

Browse files
committed
Make public and create balenaBlocks
This PR makes all on-device code and deployment framework public. Previous BitBucket commit history is not migrated. API, dashboard, deployment and management code will migrate from (private) BitBucket repositories soon...
1 parent e77f708 commit 81a6776

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+4995
-103
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!docker-compose.yml
2+
**

.githooks/pre-commit

-20
This file was deleted.

.github/workflows/balena.yml

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: publish to balenaCloud
3+
4+
on:
5+
pull_request:
6+
types: [opened, synchronize, closed]
7+
branches:
8+
- master
9+
10+
env:
11+
ENVIRONMENT: balena-cloud.com
12+
BLOCK_PREFIX: belodetek/unzoner
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: true
19+
matrix:
20+
arch:
21+
- aarch64
22+
- amd64
23+
- armv7hf
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
28+
- name: install additional dependencies
29+
run: |
30+
sudo apt install -y git-secret
31+
32+
- name: import GPG key
33+
id: import-gpg-key
34+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed'}}
35+
uses: crazy-max/ghaction-import-gpg@v4
36+
with:
37+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
38+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
39+
40+
- name: imported GPG key
41+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed'}}
42+
run: |
43+
echo 'fingerprint: ${{ steps.import-gpg-key.outputs.fingerprint }}'
44+
echo 'keyid: ${{ steps.import-gpg-key.outputs.keyid }}'
45+
echo 'name: ${{ steps.import-gpg-key.outputs.name }}'
46+
echo 'email: ${{ steps.import-gpg-key.outputs.email }}'
47+
48+
- name: reveal secrets
49+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed'}}
50+
run: |
51+
git secret reveal -fp '${{ secrets.GPG_PASSPHRASE }}'
52+
53+
# FIXME: https://github.com/balena-io/deploy-to-balena-action/issues/188
54+
- name: remove composition
55+
if: ${{ github.event_name == 'pull_request' && github.event.action != 'closed'}}
56+
run: |
57+
rm docker-compose.yml
58+
59+
- name: push draft or finalise release
60+
uses: balena-io/balena-ci@master
61+
with:
62+
balena_token: ${{ secrets.BALENA_API_KEY }}
63+
environment: ${{ env.ENVIRONMENT }}
64+
fleet: ${{ env.BLOCK_PREFIX }}-${{ matrix.arch }}
65+
github_token: ${{ secrets.GITHUB_TOKEN }}
66+
source: unzoner
67+
68+
deploy:
69+
runs-on: ubuntu-latest
70+
needs: publish
71+
strategy:
72+
fail-fast: true
73+
matrix:
74+
fleet:
75+
- belodetek/bbqemudev
76+
- belodetek/bbrpi3dev
77+
- belodetek/bbrpi4dev
78+
- belodetek/bbnucdev
79+
- belodetek/bbnuclive
80+
- belodetek/bbqemulive
81+
- belodetek/bbrpi3live
82+
83+
steps:
84+
- uses: actions/checkout@v3
85+
86+
- name: push draft or finalise release
87+
uses: balena-io/balena-ci@master
88+
with:
89+
balena_token: ${{ secrets.BALENA_API_KEY }}
90+
environment: ${{ env.ENVIRONMENT }}
91+
fleet: ${{ matrix.fleet }}
92+
github_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+28
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
11
.DS_Store
2+
._*
3+
*.tmp
4+
*.dist
5+
*.build
26
*.pyc
7+
__pycache__/
8+
*.exe
9+
*.pluginc
10+
*.enc
11+
*.tgz
12+
*.gz
13+
venv**
14+
src/plugin.py**
15+
src/tests/data
16+
src/tests/temp
17+
.gitsecret/keys/random_seed
18+
!*.secret
19+
unzoner/.env-blackbox-plugin
20+
unzoner/id_rsa.blackbox
21+
unzoner/mgmt.blackbox.ovpn
22+
unzoner/openvpn/client.blackbox.key
23+
unzoner/openvpn/server.blackbox.key
24+
unzoner/openvpn/ta.blackbox.key
25+
unzoner/openvpn/dh2048.blackbox.pem
26+
unzoner/openvpn/dh2048.blackbox.pem
27+
unzoner/openvpn/client.blackbox.key
28+
unzoner/openvpn/server.blackbox.key
29+
unzoner/openvpn/ta.blackbox.key
30+
unzoner/.balena/secrets/env

.gitsecret/keys/pubring.kbx

10.9 KB
Binary file not shown.

.gitsecret/keys/pubring.kbx~

9.01 KB
Binary file not shown.

.gitsecret/keys/trustdb.gpg

1.17 KB
Binary file not shown.

.gitsecret/paths/mapping.cfg

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
unzoner/id_rsa.blackbox:7efaea18eedb4a1b9f9298e0f3d92ceb3f2adc4c29a5e818009a7d88f847296f
2+
unzoner/mgmt.blackbox.ovpn:b81b41c4cf71cdd490feecadf4bb35c31ed8396ed0fdd61808d4efd73c3031de
3+
unzoner/openvpn/dh2048.blackbox.pem:7afe4bea0e57bc35bcd7cdd9e393692c43a88facc64c309a176dc69a66d5a029
4+
unzoner/openvpn/client.blackbox.key:1f2e908d2eac66568e4d4cc2c37967684c0da9cb32a24c970ee829f9113694fb
5+
unzoner/openvpn/server.blackbox.key:0817ed6b2ae19fdf1ddab8b507d70e7cbea29fa00674687eb845514539ad2c64
6+
unzoner/openvpn/ta.blackbox.key:61a616ec66587848c1a43cc92aa21ad0305e804581f9c2a437929713c4f4edb6
7+
unzoner/.balena/secrets/env:b581220016ab9a0e9bb870baa31c1407caac3ba674ad785d3bffc9cb407f756a
8+
unzoner/.env-blackbox-plugin:9d9f2cc91d124e1c4a995d0c99dfa67fda7fa98b6b9ab972c18e6c36dd3de7d2

Dockerfile.template

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://hub.balena.io/organizations/belodetek/blocks
2+
FROM bh.cr/belodetek/unzoner-%%BALENA_ARCH%%

0 commit comments

Comments
 (0)