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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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