-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(system): Include opentrons api server from external tree
- Adds a BR2_EXTERNAL tree from the monorepo (Opentrons/opentrons#3217) and pulls in the opentrons api server to the build. - Fixes some issues in systemd services and targets. Codebuild rewrites broken (and maybe non-broken) absolute links to fit inside its chroot jail, which was breaking the absolute links that aren’t supposed to be valid until they’re on the robot - Add a VERSIONS file taken from a combination of the buildroot version (from git) and opentrons api server versions (from package.json) and save to /etc/VERSIONS.json - VERSIONS.json is a new artifact and also zipped up with the full images and update images when uploaded to s3 Closes Opentrons/opentrons#2877
- Loading branch information
1 parent
9afb692
commit 9e5f614
Showing
18 changed files
with
100 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
*.rej | ||
*~ | ||
*.pyc | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/var/run/dropbear | ||
../var/run/dropbear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...overlay/etc/systemd/system/NetworkManager.service.wants/opentrons-init-connection.service
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...verlay/etc/systemd/system/NetworkManager.service.wants/opentrons-init-connections.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../opentrons-init-connections.service |
2 changes: 1 addition & 1 deletion
2
board/opentrons/ot2/rootfs-overlay/etc/systemd/system/default.target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/etc/systemd/system/opentrons.target | ||
./opentrons.target |
4 changes: 2 additions & 2 deletions
4
board/opentrons/ot2/rootfs-overlay/etc/systemd/system/opentrons-init-connections.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
board/opentrons/ot2/rootfs-overlay/etc/systemd/system/opentrons-run-boot-scripts.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ons/ot2/rootfs-overlay/etc/systemd/system/opentrons.target.wants/jupyter-notebook.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/etc/systemd/system/jupyter-notebook.service | ||
../jupyter-notebook.service |
2 changes: 1 addition & 1 deletion
2
...otfs-overlay/etc/systemd/system/opentrons.target.wants/opentrons-run-boot-scripts.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
/etc/systemd/system/opentrons-run-boot-scripts.service | ||
../opentrons-run-boot-scripts.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import json | ||
import os | ||
import sys | ||
import subprocess | ||
import argparse | ||
|
||
try: | ||
br_version = subprocess.check_output( | ||
['git', 'describe', '--tags', '--always'], | ||
stderr=subprocess.STDOUT).decode().strip() | ||
except subprocess.CalledProcessError as cpe: | ||
print("{}: {}: {}".format(cpe.cmd, cpe.returncode, cpe.stdout)) | ||
print("Defaulting to (unknown)") | ||
br_version = 'unknown' | ||
|
||
try: | ||
br_sha = subprocess.check_output( | ||
['git', 'rev-parse', 'HEAD'], | ||
stderr=subprocess.STDOUT).decode().strip() | ||
except subprocess.CalledProcessError as cpe: | ||
print("{}: {}: {}".format(cpe.cmd, cpe.returncode, cpe.stdout)) | ||
print("Defaulting to (unknown)") | ||
br_sha = 'unknown' | ||
|
||
try: | ||
br_branch_from_git = subprocess.check_output( | ||
['git', 'rev-parse', '--abbrev-ref', 'HEAD'], | ||
stderr=subprocess.STDOUT).decode().strip() | ||
except subprocess.CalledProcessError as cpe: | ||
print("{}: {}: {}".format(cpe.cmd, cpe.returncode, cpe.stdout)) | ||
print("Defaulting to (unknown)") | ||
br_branch = 'unknown' | ||
|
||
br_branch = os.getenv('CODEBUILD_SOURCE_VERSION', br_branch_from_git) | ||
build_id = os.getenv('CODEBUILD_BUILD_ID', 'dev') | ||
|
||
parser = argparse.ArgumentParser(description='Write a version file to buildroot') | ||
parser.add_argument('in_versions', metavar='IN_VERSIONS', | ||
type=argparse.FileType('r'), nargs='+', | ||
help='A list of files to read versions from. These should ' | ||
'be json files with non-overlapping keys that will be' | ||
' unified (along with the buildroot version from git)' | ||
' into the final product.') | ||
parser.add_argument('outfile', metavar='OUT', type=argparse.FileType('w'), | ||
help='The file to write to') | ||
args = parser.parse_args() | ||
|
||
version_dict = {'buildroot_version': br_version, | ||
'buildroot_sha': br_sha, | ||
'buildroot_branch': br_branch, | ||
'buildroot_buildid': build_id} | ||
|
||
for f in args.in_versions: | ||
version_dict.update(json.load(f)) | ||
|
||
json.dump(version_dict, args.outfile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters