Commit Graph

41 Commits

Author SHA1 Message Date
Roman Mazur
36fa23ab7d
Add mocha tests linter
A simple script that detects presence of .only statements in tests.
The idea is to avoid comitting them, so that all the tests are run with npm test.

Change-type: patch
Signed-off-by: Roman Mazur <roman@balena.io>
2019-06-29 16:40:41 +03:00
Cameron Diver
4e779608a3 Add debug build infrastructure and configuration
Change-type: minor
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-05-15 12:41:27 +01:00
Pagan Gazzard
9af416c7c0 Parallelise cache pulling for builds
Change-type: patch
2019-03-28 13:39:16 +00:00
Pagan Gazzard
019190646e Update pinejs-client to pinejs-client-request 5.x
Change-type: patch
2018-12-19 17:54:53 +00:00
Pablo Carranza Velez
7ffac14bb3 Rename package to balena-supervisor and push to balena repos in DockerHub
Change-type: minor
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
2018-11-01 14:59:41 -07:00
Petros Angelatos
bba1da370b
logger: Remove pubnub leftovers
Change-type: minor
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2018-07-18 12:31:10 -07:00
Pablo Carranza Velez
348ff66cee
Replace the gosuper component with a node module that handles communication with systemd, and stop using an init system in the supervisor container
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-22 15:55:15 +00:00
Pablo Carranza Velez
3fa567ae88 automation: Use ssh instead of https to PR to meta-resin
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-15 14:14:32 -03:00
Pablo Carranza Velez
2f0fcff8ef Start using an externally built resin/$ARCH-supervisor-base:v1.1.0 as base image, which adds the verbatim option to dns.lookup
Depends-on: https://github.com/resin-io/resin-supervisor-base/pull/5
Change-Type: minor
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-07 07:01:43 -08:00
Pablo Carranza Velez
c463f7fa5b Since armel builds are disabled, do not pull an armel node base image, and ensure we never deploy an armel supervisor
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-02-27 08:40:43 -08:00
Pablo Carranza Velez
03c58a2bfa Use i386-nlp for supervisor releases for quark boards
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-01-24 09:08:37 -08:00
Pablo Carranza Velez
64372e9cc9 Do the webpack build in an amd64 image to improve build times
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-12-14 03:06:19 -08:00
Pablo Carranza Velez
acf3771ea8 automation: Always try to cache using the latest master build
This change makes us always try to use the latest master builds of the intermediate images
for the --cache-from option in our docker build of the supervisor.

This prevents cache misses when we're rebasing a branch and a PR has been merged that modifies a component that we're not modifying
in the current branch.
For example:
Branch 1 modifies the base image. Branch 2 only modifies the nodejs code. Branch 1 gets merged before Branch 2, so in our Branch2 PR we
rebase from master - in the next build for Branch 2, we'll have a cache miss on the base image, unless we're using the last master for caching.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-11-01 18:15:33 -07:00
Trong Nghia Nguyen
01c39f33b5 Fixes #511, add support for new supervisor image for x86 with quark cpu
boards.

Change-Type: minor
Signed-off-by: Trong Nghia Nguyen <nghiant2710@gmail.com>
2017-11-01 03:33:43 -07:00
Akis Kesoglou
e2914012c0 Deploy all archs by default to Resin
Change-Type: patch
2017-08-25 23:36:31 +03:00
Pablo Carranza Velez
925112bd13 Fix references in deploy-to-resin.js and use github credentials when pushing in pr-to-meta-resin.sh
deploy-to-resin.js had a few references to variables that are no longer defined.

In pr-to-meta-resin.sh, the passing of GitHub credentials was wrongly placed and messy.

As per @Page-'s advice, we use the credentials as part of the remote url when pushing (we don't do it when
cloning to avoid the github password being visible with a `git remote -v`).

We change GITHUB_USERNAME to GITHUB_USER as hub will automatically pick it up, avoiding the need
to pass the credentials when creating the PR.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-08-07 12:17:02 -03:00
Pablo Carranza Velez
d9605c71dd automation/build.sh: build base, nodesuper and gosuper before supervisor, and use them for cache
Otherwise the step where we build them doesn't reuse what was built when building the supervisor,
because we're explicitly setting `--cache-from` options.

We also push the images as soon as they're built.

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
d7f7a0bf57 Disable armel builds, and make the automation build without using docker-in-docker
Changelog-Entry: Disable armel builds
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
fa8116d97c Disable pushing to registry.resinstaging.io, and use build environment to login to dockerhub
Also, avoid building the dind builder twice, and try to get a reusable docker instance.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
29de3ceeb2 Add a script to automate the creation of meta-resin PRs
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
60a8ab85f4 Add a deploy-to-resin.js and automatically deploy to the Resin API on master builds
Also, make all of the arch builds part of the Circle workflow.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
e28e770fd7 Replace the Jenkins build with a CircleCI build that uses the new multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
829284e83a Make cleanup in jenkins build less aggressive, but remove all created tags
We've been deleting images by id and forcing removal, which might not play
nicely with other processes using images with shared parents. Now we don't force removal
and remove by tag and not by id, which should play more nicely with others. We also ensure
all the tags we use/create are removed so that images are actually deleted if not used.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-06-21 17:22:28 -07:00
Pagan Gazzard
a3649fa6ec Switch to generating the BASE_IMAGE_VERSION in the makefile, so that the makefile targets can use an accurate version by default
Fixes #422

Change-type: minor
2017-06-05 16:03:50 -07:00
Pablo Carranza Velez
9540ed415b Make the base image hash more deterministic
We've been using tar directly on the base image folder, and this makes
the file ordering unpredictable between filesystems, so we use find and
sort so that the files are always tarred in the same order, producing the same
hash in different filesystems.

We also now set the mtime to the specific Unix timestamp 0, to avoid differences
due to timezones.

Also remove the dest folder before calculating the hash.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2016-12-17 15:37:22 -03:00
Pablo Carranza Velez
9e327bf7a6 Build the base image together with the supervisor
This commit changes the automation scripts so that the base image
is built together with the rest of the supervisor. We use a hash of
the contents of the base-image folder as tag for the base image so
that unnecessary rebuilds are avoided.

The build scripts are also modified to always clean up the resulting base image
and the image used to build it. We use docker pull and push to enable caching.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2016-12-16 16:25:49 -03:00
Pablo Carranza Velez
914dedc453 Clean up after build to avoid polluting the Jenkins server 2016-10-27 12:14:34 -03:00
Pablo Carranza Velez
5e5a281307 Remove unused Jenkins build step 2016-10-05 19:49:53 +00:00
Pablo Carranza Velez
5e91436661 Force tagging of intermediate cache images and don't fail builds for them 2016-10-05 19:29:03 +00:00
Pablo Carranza Velez
d2f2622660 Cache intermediate images in the build to allow faster builds 2016-10-04 18:54:06 -03:00
Petros Angelatos
0546ba51d9 invoke the linter using npm 2016-09-14 22:33:36 +00:00
Petros Angelatos
488ca41621 build: implement multi-Dockerfile build process
This build strategy lends itself to how Rockerfiles work. In the build
Dockerfile all the build utilities (e.g gcc, python) are installed and
run the build process to produce some build artifacts. There are two
build Dockerfiles, one for the nodejs part and one for the golang part.
The build artifacts of these are combined into the runtime Dockerfile.
For all this to work there is some minimal glue implemented in the
Makefile.

Part of this commit is a switch of the base image the runtime is based
on to the minimal OpenEmbedded one produced by #198

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:35 +00:00
Pagan Gazzard
8715534d84 Run the linting automatically as part of the jenkins build. 2016-07-19 14:37:46 -07:00
Trong Nghia Nguyen
7ff638585c Add alpine supervisor build info 2016-05-17 11:59:39 +07:00
Pablo Carranza Velez
6c8c8a86bd Deploy supervisor to the Resin registry too 2016-01-06 11:16:18 -03:00
Pablo Carranza Vélez
33d402c3c0 Default PubNub and Mixpanel keys are now passed at build time 2015-10-14 16:53:33 -03:00
Pablo Carranza Vélez
53668647c8 Integration test is now working.
* More work on the integration test
* Correctly get supervisor IP
* Use Fatal for test errors
* test-integration working separate from run-supervisor
* Use jenkins' JOB_NAME to identify and remove containers with their volumes
* Document testing procedure
* Document the assume-unchanged tip
* Use /mnt/root for data path
* Nicer secret assignment
2015-10-13 13:43:36 -03:00
Pablo Carranza Vélez
300067febe Correctly integrate Go unit tests with Jenkins 2015-10-13 13:43:36 -03:00
Pagan Gazzard
0703759782 Try to populate the docker cache before building. 2015-10-13 13:43:35 -03:00
Pagan Gazzard
e8b6889d46 Take the ARCH param from jenkins, so that the different archs can be separate projects (and parallelise builds) 2015-10-13 13:39:38 -03:00
James
6c6f7e2af5 Add Jenkins Build Script 2015-10-13 13:39:37 -03:00