Skip to content

Commit

Permalink
Add test-private device repository
Browse files Browse the repository at this point in the history
Signed-off-by: Vipul Gupta (@vipulgupta2048) <vipulgupta2048@gmail.com>
  • Loading branch information
vipulgupta2048 committed Aug 8, 2024
1 parent 9862996 commit 5c9fdfa
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Raspberry Pi 3
name: Test Private

on:
# With these triggers the Yocto jobs will run
# in parallel with the Flowzone jobs, which is fine for now
# and allows us to better control what we want to test and when.
# It is expected that Flowzone could fail, but yocto jobs will run.
pull_request:
branches:
- "main"
Expand All @@ -9,39 +13,29 @@ on:
branches:
- "main"
- "master"

push:
tags:
- v[0-9]+.[0-9]+.[0-9]+\+?r?e?v?*
- v20[0-9][0-9].[0-1]?[1470].[0-9]+

workflow_dispatch:

jobs:
yocto:
name: Yocto
# Pin the workflow to a specific commit to prevent unexpected changes while
# I am learning.
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml@ad06820f4174568383678710fa68b2054da6db57
uses: balena-os/balena-yocto-scripts/.github/workflows/yocto-build-deploy.yml
# Prevent duplicate workflow executions for pull_request (PR) and pull_request_target (PRT) events.
# Both PR and PRT will be triggered for the same pull request, whether it is internal or from a fork.
# This condition will prevent the workflow from running twice for the same pull request while
# still allowing it to run for all other event types.
# - internal PR (true == true) ok
# - internal PRT (true != false) skip
# - fork PR (false != true) skip
# - fork PRT (false == false) ok
# - push (false == false) ok
# - workflow_dispatch (false == false) ok
# - any trigger other than PR/PRT (false == false) ok
if: (github.event.pull_request.head.repo.full_name == github.repository) == (github.event_name == 'pull_request')
secrets: inherit
with:
machine: raspberrypi3
machine: test-private
# Needed for testing - defaults to production
environment: balena-staging.com
deploy-hostapp: true # needed for testing deploy
test_matrix: >
{
"test_suite": ["os"],
"test_suite": ["os","cloud","hup"],
"environment": ["bm.balena-dev.com"],
"worker_type": ["testbot"],
}
"runs_on": [["ubuntu-latest"]]
}
11 changes: 11 additions & 0 deletions layers/meta-balena-raspberrypi/conf/machine/test-private.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#@TYPE: Machine
##@NAME: test-private
##@DESCRIPTION: Machine configuration for an extra configured genericx86-64 device


MACHINEOVERRIDES = "raspberrypi3:${MACHINE}"
include conf/machine/raspberrypi3.conf

# FIRMWARE_COMPRESSION ?= "1"

# MACHINE_FEATURES += " efi raid"
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#MACHINE ?= "raspberrypi"
#MACHINE ?= "raspberrypi2"
#MACHINE ?= "raspberrypi3"
#MACHINE ?= "test-private"
#MACHINE ?= "raspberrypi3-64"
#MACHINE ?= "revpi-connect"
#MACHINE ?= "revpi-connect-s"
Expand Down
42 changes: 42 additions & 0 deletions test-private.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
deviceTypesCommon = require '@resin.io/device-types/common'
{ networkOptions, commonImg, instructions } = deviceTypesCommon

module.exports =
version: 1
slug: 'test-private'
aliases: [ 'test-private' ]
name: 'Test Private'
arch: 'armv7hf'
state: 'released'
isDefault: true

imageDownloadAlerts: [
{
type: 'warning'
message: 'The Raspberry Pi 3 is not capable of connecting to 5GHz WiFi networks unless you use an external WiFi adapter that supports it. The Raspberry Pi 3 B+ is capable of connecting to both 5GHz and 2.4GHz networks.'
}
]

instructions: commonImg.instructions
gettingStartedLink:
windows: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'
osx: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'
linux: 'https://www.balena.io/docs/learn/getting-started/test-private/nodejs/'

options: [ networkOptions.group ]

yocto:
machine: 'test-private'
image: 'balena-image'
fstype: 'balenaos-img'
version: 'yocto-kirkstone'
deployArtifact: 'balena-image-test-private.balenaos-img'
compressed: true

configuration:
config:
partition:
primary: 1
path: '/config.json'

initialization: commonImg.initialization

0 comments on commit 5c9fdfa

Please sign in to comment.