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

feature/cli installer v2 #721

Merged
merged 189 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
3481a24
remove require-optional
hugomontero Mar 13, 2024
5b1218f
add pkg as dev dependency
hugomontero Mar 13, 2024
e7bf9d2
ignore build folder
hugomontero Mar 13, 2024
0261d3b
add pkg configuration
hugomontero Mar 13, 2024
7a115b3
use new particle pkg cli for e2e tests
hugomontero Mar 13, 2024
e77e3e0
make npm build runs before e2e tests
hugomontero Mar 13, 2024
0c82e19
package just host for e2e tests
hugomontero Mar 13, 2024
0720977
add missing assets for project creation
hugomontero Mar 19, 2024
e885b12
add macos arm64 platform for packaging
hugomontero Mar 19, 2024
8fb7000
add macos arm64 into builds to run e2e tests on this platform
hugomontero Mar 20, 2024
89c08a5
remove commented code
hugomontero Mar 20, 2024
dc9876b
remove unused required optional
hugomontero Mar 26, 2024
a3b14f0
allow e2e tests run on windows
hugomontero Mar 26, 2024
37c6dab
test new docker image
hugomontero Mar 25, 2024
97f2d36
attempt to build package trhu circle-ci
hugomontero Mar 26, 2024
d32e7ee
sign explicitly the executables
hugomontero Mar 26, 2024
d20bb93
add sudo to sign
hugomontero Mar 26, 2024
682bb6d
remove bytecode generation to keep the same hash
hugomontero Mar 26, 2024
63682f3
verify ldid and build dir
hugomontero Mar 26, 2024
553b931
external assets requires bytecode
hugomontero Mar 26, 2024
4170dc4
update docker image with a different ldid installation
hugomontero Mar 26, 2024
6ff27d0
update docker version
hugomontero Mar 26, 2024
25ed6fa
fix sign with new ldid
hugomontero Mar 26, 2024
61da33d
add not signed packages to build
hugomontero Mar 27, 2024
c753329
remove signing
hugomontero Mar 27, 2024
d42fd68
remove optional dependencies and transform it to dependencies
hugomontero Mar 27, 2024
c5b16e3
Merge pull request #719 from particle-iot/feature/sc-126213/package-c…
hugomontero Mar 27, 2024
ebf1ba6
Update serialport to 12
monkbroc Mar 28, 2024
4f4861e
Update serialport interface per upgrade guide
monkbroc Mar 28, 2024
8b74c7a
Package up serialport bindings for all platforms
monkbroc Mar 28, 2024
cf69d8f
Merge pull request #723 from particle-iot/feature/sc-126683/upgrade-s…
monkbroc Apr 1, 2024
34134e1
add sign script for win
hugomontero Apr 1, 2024
79b1f71
update img with osslsigncode
hugomontero Apr 2, 2024
d131ded
rename output to sign it (doesnt allow overwrite)
hugomontero Apr 2, 2024
5ae0108
Merge pull request #724 from particle-iot/feature/sc-126219/sign-cli-…
hugomontero Apr 2, 2024
abd4996
publish artifacts to s3
hugomontero Apr 2, 2024
d2c3c82
add right environments depending on the tags
hugomontero Apr 3, 2024
f8647fa
fix tag filters
hugomontero Apr 3, 2024
3fbff31
add script to generate manifest and restructure output directory
hugomontero Apr 4, 2024
417bf35
add generate manifest command and push to s3 after that
hugomontero Apr 4, 2024
c3a45a0
add checkout and npm i to publish package workflow
hugomontero Apr 5, 2024
c9c538b
clean version tag
hugomontero Apr 5, 2024
c1db7ec
add binaries url for manifest json
hugomontero Apr 5, 2024
25eb1aa
fix url filename from manifest
hugomontero Apr 8, 2024
836048d
fix platform name for windows
hugomontero Apr 8, 2024
b770590
add cache control with max-age to 0
hugomontero Apr 8, 2024
c0e0d98
add windows installer
hugomontero Apr 10, 2024
46b5d74
allow win-sing to pass the executable to be signed
hugomontero Apr 10, 2024
6fdcd28
add script in package for windows installer
hugomontero Apr 10, 2024
0af8738
add generate installer step for build job
hugomontero Apr 10, 2024
4b0e625
add commands for enable and disable updates
hugomontero Apr 10, 2024
86253ae
add win installer to release
hugomontero Apr 10, 2024
8f00801
remove unsused files from installer
hugomontero Apr 10, 2024
45696a5
update license from windows installer
hugomontero Apr 10, 2024
77ff059
update README from windows installer
hugomontero Apr 10, 2024
67f992b
add installer to s3 push
hugomontero Apr 10, 2024
47f6a8e
fix keep=copy instead of move
hugomontero Apr 10, 2024
5e246d8
remove unused file for getting windows version
hugomontero Apr 11, 2024
d780405
remove sha1 from manifest info
hugomontero Apr 11, 2024
4d4e528
add update-cli enable-updates and disable-updates option
hugomontero Apr 11, 2024
3c2102d
change download to installing since ossl now is being stracted
hugomontero Apr 11, 2024
088b629
Merge pull request #725 from particle-iot/feature/sc-126221/upload-ar…
hugomontero Apr 11, 2024
a234dcc
wip: unix installer
hugomontero Apr 12, 2024
c4ac81f
fix oss installation for windows installer
hugomontero Apr 12, 2024
055bbe1
add cli installer for unix
hugomontero Apr 12, 2024
8f290bf
zip files on each build
hugomontero Apr 15, 2024
d3602d0
change manifest to use .zip extension
hugomontero Apr 15, 2024
289c7ca
fix extension for moving files
hugomontero Apr 15, 2024
a0137e8
use gzip given that is standard
hugomontero Apr 15, 2024
698859d
change extension for gz to generate manifest
hugomontero Apr 15, 2024
9a822ce
add unzip to installer for linux and mac
hugomontero Apr 15, 2024
2c49025
upload install-cli to s3 on publish
hugomontero Apr 16, 2024
1fc6f7e
fix install-cli path in s3
hugomontero Apr 16, 2024
4f8dfbd
fix adding ParticleCLISetup installer latest to root installer dir
hugomontero Apr 16, 2024
db9ebe5
point to the right url
hugomontero Apr 16, 2024
65cea09
Tweaks to fail with a nice error message when version doesn't exist
monkbroc Apr 16, 2024
28d9eb7
Update explanation
monkbroc Apr 16, 2024
87f794a
Merge pull request #727 from particle-iot/feature/sc-126216/update-li…
hugomontero Apr 17, 2024
acb9b24
update settings for enable/disable auto updates
hugomontero Apr 17, 2024
b0f00b5
add version param for update-cli command
hugomontero Apr 18, 2024
591580f
add update cli process to use manifest in order to download the lates…
hugomontero Apr 18, 2024
8e3385e
change update check interval
hugomontero Apr 18, 2024
c200ab4
change update-check to call update-cli
hugomontero Apr 18, 2024
0ed0e23
Update error messages for better user understanding
hugomontero Apr 18, 2024
f91d1ca
add platform mapping for win case
hugomontero Apr 18, 2024
cc94849
pick the installation path depending on the platform
hugomontero Apr 18, 2024
b37e234
fix comment regarding time for update check interval
hugomontero Apr 18, 2024
d85e48a
update s3 upload cache control to ensure be cached
hugomontero Apr 18, 2024
bf05dd4
add detached and cleanup to options in order to make independant the …
hugomontero Apr 19, 2024
2f2c7b0
use process.pkg to verify if is being packaged or not
hugomontero Apr 19, 2024
a43da1b
fix: on linux/darwin the APPLOCAL is undefined and cannot be part of …
hugomontero Apr 19, 2024
f8c1e1c
add manifestHost to settings
hugomontero Apr 19, 2024
7089080
add sha validation for downloaded file
hugomontero Apr 19, 2024
abbe4b0
Merge pull request #729 from particle-iot/feature/sc-126217/implement…
hugomontero Apr 22, 2024
0b69d42
Merge branch 'master' into feature/cli-installer-v2
hugomontero May 8, 2024
c040850
change urls to publish on test tags
hugomontero Apr 23, 2024
c549c82
test 3.23.0
hugomontero Apr 23, 2024
83ae3df
fix role assignation
hugomontero Apr 23, 2024
b101486
sc-127517 downgrade serialport since there is a bug for 10.5.x versio…
hugomontero Apr 25, 2024
4dc88ab
check for specific value, since the majority of the current users wil…
hugomontero Apr 26, 2024
944ac4d
add armv7 as pkg target
hugomontero Apr 30, 2024
ccddfe5
use os.platform and arch and remove custom platform/arch names
hugomontero Apr 30, 2024
4a3d129
use the actual os.platform instead of a custom one
hugomontero Apr 30, 2024
3fe4e68
target to dev test tags
hugomontero Apr 30, 2024
7132676
exclude unsigned files to release binaries
hugomontero Apr 30, 2024
b192b48
add win unsigned installer as excluded files
hugomontero Apr 30, 2024
61f45f1
add validation for unkown files
hugomontero Apr 30, 2024
38c9918
fix release dir and excluded files
hugomontero Apr 30, 2024
c1178cc
remove ossl as part of windows installer
hugomontero Apr 30, 2024
45637ef
add installer manifest to keep all intaller versions
hugomontero May 1, 2024
0c1ebb7
fix manifest url for installers
hugomontero May 1, 2024
bcd3a22
in case of arm just return it without the version
hugomontero May 1, 2024
a66be21
wip: update-cli now uses the execPath instead of the default one
hugomontero May 1, 2024
42b7c27
fix update-cli check for pkg stragegy
hugomontero May 2, 2024
3ee83d5
use linux-arm for compatibility
hugomontero May 2, 2024
8e8aa1b
use tmp dir for udev rules since now is a single package
hugomontero May 2, 2024
78929b6
Add prebuilt version of Node 16 for armv7
monkbroc May 2, 2024
f8ee218
Enable QEMU
monkbroc May 2, 2024
9b3d129
Leave JS code as is (no bytecode) to be compatible with ARM
monkbroc May 2, 2024
eb91fa4
Try GitHub Actions
monkbroc May 2, 2024
385af34
Enable QEMU on GitHub Actions
monkbroc May 2, 2024
c3de771
setup ldid
hugomontero May 2, 2024
4797b1b
add tests workflow
hugomontero May 2, 2024
37aad90
omit update check tests
hugomontero May 2, 2024
899823f
use chained workflows
hugomontero May 2, 2024
83672b3
workflo_run just works on default branches
hugomontero May 2, 2024
a1cc0e3
add e2e tests to tests workflow
hugomontero May 3, 2024
5ed1859
define required env variables for e2e tests
hugomontero May 3, 2024
d9ea05d
use tests workflow as reusable
hugomontero May 3, 2024
38488b8
add job dependencies
hugomontero May 3, 2024
680a8ae
add job dependencies
hugomontero May 3, 2024
9d2c294
Map aarch64 to amd64 in unix installer
monkbroc May 3, 2024
be1aff6
Build Linux ARM64
monkbroc May 3, 2024
56b1405
inherint configuration to reusable tests workflow
hugomontero May 3, 2024
b357843
sign windows and generate installer
hugomontero May 3, 2024
288e657
Fix udev install
monkbroc May 3, 2024
55fab1d
install nsis to sign packages
hugomontero May 3, 2024
0e240ac
add osslsigncode binary to sign win exec
hugomontero May 5, 2024
cba623b
add dev tests workflow for all push commits
hugomontero May 6, 2024
e73fc76
transform build as reusable workflow
hugomontero May 6, 2024
da07111
remove linuxstatic mapping since is not longer necessary
hugomontero May 6, 2024
56bab24
create publish-v2 reusable workflow
hugomontero May 6, 2024
14e687e
add staging workflow
hugomontero May 6, 2024
19b9766
change staging branch for testing purposes
hugomontero May 6, 2024
584356e
add environment to workflow
hugomontero May 6, 2024
fa3079b
passing build job_id to download artifacts
hugomontero May 6, 2024
6fcfb84
read version directly from package.json
hugomontero May 6, 2024
3270af1
fix variable call for base_url
hugomontero May 6, 2024
b79820a
fix download path for build
hugomontero May 6, 2024
c4a0305
add file compression before publish it
hugomontero May 6, 2024
56e6924
change order first compress, then move files
hugomontero May 7, 2024
746bc76
upload binaries to s3
hugomontero May 7, 2024
2f7a585
add workflows for different stages
hugomontero May 7, 2024
ff43208
add permissions for id-token
hugomontero May 7, 2024
017ac33
add publish to npm workflow
hugomontero May 7, 2024
a05931c
fix generate manifest to rename the file when generating release folder
hugomontero May 7, 2024
7f5205b
remove console.logs from update-cli
hugomontero May 7, 2024
c1e7614
rename workflows to prefix reusable ones
hugomontero May 7, 2024
45df858
remove circle ci configuration
hugomontero May 7, 2024
18a3ba1
add execution permissions for particle-cli files
hugomontero May 7, 2024
3d95fd3
remove circleci folder
hugomontero May 8, 2024
b7d1aef
3.23.1
hugomontero May 8, 2024
4bf2e24
ignore errors opening the browser for SSO login
monkbroc May 8, 2024
1db5f11
Remove forked package openurl
monkbroc May 8, 2024
90737b0
unref spawn to background updates
hugomontero May 8, 2024
b44db5e
Merge branch 'feature/sc-126222/update-the-particle-cli-executable-in…
hugomontero May 8, 2024
eb662c3
fix lint for openurl
hugomontero May 8, 2024
da9f091
import openurl from new file
hugomontero May 8, 2024
906197f
remove shell on spawn for updatecli since is not required
hugomontero May 8, 2024
83bb991
Merge pull request #730 from particle-iot/feature/sc-126222/update-th…
hugomontero May 8, 2024
c2b8b85
Merge branch 'master' into feature/cli-installer-v2
hugomontero May 9, 2024
685cb56
use serial identify in case the device does not support control request
hugomontero May 9, 2024
f153515
use fwVersion to choose which command use
hugomontero May 9, 2024
b6a4c65
Update installer README
monkbroc May 9, 2024
f240d35
UNIX: Turn off automatic updates when installing a specific version
monkbroc May 9, 2024
7a1fd32
Merge pull request #732 from particle-iot/bug/sc-127690/imei-missing-…
hugomontero May 9, 2024
79d24e5
3.23.2
hugomontero May 9, 2024
22aa6a8
fix update-cli path is removing the extension that make windows updat…
hugomontero May 9, 2024
159eb2c
fix: add win sign env variables
hugomontero May 9, 2024
fd0f326
3.23.3
hugomontero May 9, 2024
9de6914
Fix UNIX: Turn off automatic updates
monkbroc May 10, 2024
c898639
add right workflow name to staging/production workflows
hugomontero May 10, 2024
ba01fbe
Merge branch 'feature/cli-installer-v2' of github.com:particle-iot/pa…
hugomontero May 10, 2024
15960d4
add invalidate cache to cloudfront
hugomontero May 10, 2024
bc74a6f
fix cloudfront comand
hugomontero May 10, 2024
8294921
3.23.4
hugomontero May 10, 2024
be2d826
update readme with new pkg structure
hugomontero May 14, 2024
55c6c60
run tests on merging to main branch
hugomontero May 14, 2024
ff4ee61
Merge pull request #738 from particle-iot/chore/sc-126682/update-readme
hugomontero May 14, 2024
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
196 changes: 0 additions & 196 deletions .circleci/config.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Run Tests on Branch
on:
push:
branches:
- '**'
- '!staging'
jobs:
call-tests:
uses: ./.github/workflows/reusable-tests.yml
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy to production
on:
push:
tags:
- v*
jobs:
call-tests:
uses: ./.github/workflows/reusable-tests.yml
secrets: inherit
call-build:
uses: ./.github/workflows/reusable-build.yml
secrets: inherit
needs: call-tests
call-publish-v2:
uses: ./.github/workflows/reusable-publish-v2.yml
secrets: inherit
needs: call-build
with:
environment: production
call-publish-npm:
uses: ./.github/workflows/reusable-publish-npm.yml
secrets: inherit
needs: call-publish-v2
102 changes: 102 additions & 0 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build Package

on: [workflow_call]
env:
E2E_DEVICE_ID: ${{ secrets.E2E_DEVICE_ID }}
E2E_DEVICE_NAME: ${{ secrets.E2E_DEVICE_NAME }}
E2E_DEVICE_PLATFORM_ID: ${{ secrets.E2E_DEVICE_PLATFORM_ID }}
E2E_DEVICE_PLATFORM_NAME: ${{ secrets.E2E_DEVICE_PLATFORM_NAME }}
E2E_FOREIGN_DEVICE_ID: ${{ secrets.E2E_FOREIGN_DEVICE_ID }}
E2E_FOREIGN_DEVICE_NAME: ${{ secrets.E2E_FOREIGN_DEVICE_NAME }}
E2E_FOREIGN_DEVICE_PLATFORM_ID: ${{ secrets.E2E_FOREIGN_DEVICE_PLATFORM_ID }}
E2E_FOREIGN_DEVICE_PLATFORM_NAME: ${{ secrets.E2E_FOREIGN_DEVICE_PLATFORM_NAME }}
E2E_FOREIGN_PASSWORD: ${{ secrets.E2E_FOREIGN_PASSWORD }}
E2E_FOREIGN_USERNAME: ${{ secrets.E2E_FOREIGN_USERNAME }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
E2E_PRODUCT_01_DEVICE_01_GROUP: ${{ secrets.E2E_PRODUCT_01_DEVICE_01_GROUP }}
E2E_PRODUCT_01_DEVICE_01_ID: ${{ secrets.E2E_PRODUCT_01_DEVICE_01_ID }}
E2E_PRODUCT_01_DEVICE_01_NAME: ${{ secrets.E2E_PRODUCT_01_DEVICE_01_NAME }}
E2E_PRODUCT_01_DEVICE_01_PLATFORM_ID: ${{ secrets.E2E_PRODUCT_01_DEVICE_01_PLATFORM_ID }}
E2E_PRODUCT_01_DEVICE_01_PLATFORM_NAME: ${{ secrets.E2E_PRODUCT_01_DEVICE_01_PLATFORM_NAME }}
E2E_PRODUCT_01_DEVICE_02_GROUP: ${{ secrets.E2E_PRODUCT_01_DEVICE_02_GROUP }}
E2E_PRODUCT_01_DEVICE_02_ID: ${{ secrets.E2E_PRODUCT_01_DEVICE_02_ID }}
E2E_PRODUCT_01_DEVICE_02_NAME: ${{ secrets.E2E_PRODUCT_01_DEVICE_02_NAME }}
E2E_PRODUCT_01_DEVICE_02_PLATFORM_ID: ${{ secrets.E2E_PRODUCT_01_DEVICE_02_PLATFORM_ID }}
E2E_PRODUCT_01_DEVICE_02_PLATFORM_NAME: ${{ secrets.E2E_PRODUCT_01_DEVICE_02_PLATFORM_NAME }}
E2E_PRODUCT_01_ID: ${{ secrets.E2E_PRODUCT_01_ID }}
E2E_PRODUCT_01_NAME: ${{ secrets.E2E_PRODUCT_01_NAME }}
E2E_USERNAME: ${{ secrets.E2E_USERNAME }}
PARTICLE_WINDOWS_SIGNING_CERT: ${{ secrets.PARTICLE_WINDOWS_SIGNING_CERT }}
PARTICLE_WINDOWS_SIGNING_PASS: ${{ secrets.PARTICLE_WINDOWS_SIGNING_PASS }}
jobs:
build:
runs-on: ubuntu-latest # Choose an appropriate runner
steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Configure NPM Token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: npm install

- name: Restore Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: node16-pkg-${{ github.run_id }}
restore-keys: node16-pkg-

- name: Add pre-built Node for armv7
run: |
mkdir -p ~/.pkg-cache/v3.4
cp .prebuild/built-v16.16.0-linux-armv7 ~/.pkg-cache/v3.4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64

- name: Set up ldid
uses: MOZGIII/install-ldid-action@v1
with:
tag: v2.1.5-procursus7

- name: Build Package
run: npm run build

- name: 'Install makensis (apt)'
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi

- name: Download and unzip osslsigncode binary
run: |
mkdir osslsigncode
curl -LJO https://github.com/mtrojnar/osslsigncode/releases/download/2.6/osslsigncode-2.6-ubuntu-20.04.zip
unzip osslsigncode-2.6-ubuntu-20.04.zip -d osslsigncode
chmod +x osslsigncode/bin/osslsigncode

- name: Sign Windows package
run: |
npm run sign:win -- particle-cli-win-x64 $(pwd)/osslsigncode/bin/osslsigncode

- name: Generate Windows installer
run: |
npm run generate:win-installer $(pwd)/osslsigncode/bin/osslsigncode

- name: Save Cache
uses: actions/cache@v3
with:
path: ~/.pkg-cache
key: node16-pkg-${{ github.run_id }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: package
path: build/

19 changes: 19 additions & 0 deletions .github/workflows/reusable-publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build Package

on: [workflow_call]

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Configure NPM Token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: npm install
- name: Publish package
run: npm publish ${{github.ref_name}}
Loading
Loading