Commit Graph

64 Commits

Author SHA1 Message Date
Cameron Diver
d249ac168a
Fix the not-enough-unicorns bug
Add successful build indicator in the form of a unicorn.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-04 13:18:25 +01:00
Cameron Diver
3ff5880ae3
Allow resin-cli deploy to also upload build logs if present
If build is ran through `resin deploy`, then logs will be stored and
uploaded to the database, where the dashboard can display them

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-05-04 13:11:50 +01:00
Cameron Diver
f50ae65560
Add cloud-builder builder output parity to build and deploy
Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-25 13:13:11 +01:00
Cameron Diver
4fa1a9c1c6
Share nocache and tag build options between build and deploy
`resin build` had access to the `--nocache` and `--tag` options for
building with docker, but `resin deploy` did not. This commit adds the
options to the shared dockerUtils.appendOptions function.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-24 20:05:18 +01:00
Cameron Diver
9050cb1975
Respect source parameter in resin build
Upon changing the name of the source parameter from `context`, some
places weren't changed, this commit fixes that.

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-24 16:41:15 +01:00
Cameron Diver
d3772386bf
Add ability to build and deploy image locally using resin-cli
Using `resin build` a user can now build an image on their own docker
daemon. The daemon can be accessed via a local socket, a remote host and
a remote host over a TLS socket. Project type resolution is supported.
Nocache and tagging of images is also supported.

Using `resin deploy` a user can now deploy an image to their fleet. The
image can either be built by `resin-cli`, plain Docker, or from a remote
source.

Change-type: minor
Signed-off-by: Cameron Diver <cameron@resin.io>
2017-04-23 14:31:45 +01:00
Eugene Mirotin
77b30409bb update resin-device-init to pull in etcher-image-write 2017-03-28 14:37:13 +03:00
Eugene Mirotin
08b3db717e use individual methods promisification instead of promisifyAll 2017-03-27 12:14:55 +03:00
Eugene Mirotin
6cf32e445a isolate the sudo-runnable command 2017-03-27 11:43:35 +03:00
Kostas Lekkas
f940d7428c
Point to forums instead of gitter
change-type: patch
2017-03-23 12:19:59 +02:00
Tim Perry
b629ee6164
Move to preconfigured resin sdk 2017-01-25 19:33:43 +01:00
Tim Perry
7a4de5357e
Fix some issues with Resin-SDK usage after initial testing 2017-01-25 19:25:12 +01:00
Eugene Mirotin
f17cbb1205
use the new SDK factory 2017-01-25 19:25:12 +01:00
Kostas Lekkas
16a1741374 resin sync: always display device selection dialog when uuid is not passed as an argument
Closes #375
2016-09-15 13:09:25 +03:00
Kostas Lekkas
e0a2217b94 resin sync/ssh: always display selection dialog, even for a single online device
Closes #373
2016-09-15 13:09:25 +03:00
Juan Cruz Viotti
8b485b5ad5 Attempt to get device type from the image first partition
New images will ship a `device-type.json` file in the first partition,
which we can use instead of querying the API for certain configuration
and initialisation commands.

If the file is not found, or is malformed, we still fallback to the API.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
2016-09-14 11:06:17 -07:00
Kostas Lekkas
68808e760e resin sync: filter out offline devices in interactive choosing dialog 2016-07-07 19:12:39 +03:00
Juan Cruz Viotti
4a05ce3f53 Attempt to infer the device uuid in resin sync
This PR adds functionality to `resin sync` to try to infer what the
device uuid is as follows:

- If the argument to `resin sync` is an app, get all the devices from
that application. If there is only one, auto-select it, otherwise show
an interactive drive selection widget.

- If the argument to `resin sync` is a uuid, use it directly, without
trying to infer anything.

- If no argument is passed to `resin sync`, display an interactive
selection widget showing all your devices from all your applications.

Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
2016-04-25 08:57:19 -04:00
Juan Cruz Viotti
c5692f8b13 Only throw "Invalid 2FA code" if we're sure that's the cause
Currently, such error will be thrown when
`resin.auth.twoFactor.challenge()` rejects, but an invalid code is not
the only thing this function can reject for.
2016-03-17 15:37:02 -04:00
Juan Cruz Viotti
30663b0301 Force update alert to be always shown
If `updateCheckInterval` has any meanginful value, the alert will be
shown one out of ten times, or something like that, making the user
likely to miss updates.

The underlying issue is that `update-notifier`, if it detects a cached
update notification, it deletes it, and only attempts to show it back if
`updateCheckInterval` is greater than `Date.now() - lastUpdateCheck`.
2016-03-08 09:23:03 -04:00
Juan Cruz Viotti
bee523828a Improve awaitDevice success message 2016-01-25 08:59:09 -04:00
Juan Cruz Viotti
4645ad06bc Redirect users to signup from login if they don't have an account 2016-01-13 00:25:31 -04:00
Juan Cruz Viotti
c3a5998d5c Reuse messages 2016-01-12 10:45:32 -04:00
Juan Cruz Viotti
78ab2af8ba Print verbose help in resin help command 2016-01-12 10:39:29 -04:00
Juan Cruz Viotti
8d709aea7d Implement purely interactive login command
The new login command interactively asks the user if he wants to login
using web/credentials/token.
2016-01-12 09:08:03 -04:00
Juan Cruz Viotti
70ea8dd1a3 Redirect users to GitHub and Gitter in case of errors
Users will ge a better experience by knowing exactly where to go for
help if things go wrong.
2016-01-12 08:31:40 -04:00
Juan Cruz Viotti
9cfce68489 Change license to Apache 2.0 2016-01-03 23:58:51 -04:00
Juan Cruz Viotti
abc8399260 Explain why we need the computer password on device init 2015-12-02 11:15:20 -04:00
Juan Cruz Viotti
e08c3752f9 Show device types when selecting applications
Some CLI commans prompt to select an existing application, presending a
dropdown with all the application names, however it's hard to remember
which application belon to which device type, which makes it easier to
select the wrong application.
2015-11-23 09:23:08 -04:00
Juan Cruz Viotti
c3b5a768e1 Handle Windows permissions elevation automatically 2015-11-12 13:30:48 -04:00
Juan Cruz Viotti
ba318f2939 Implement device move command
This command allows to user to move a device to another application he
owns.
2015-11-12 07:47:16 -04:00
Juan Cruz Viotti
c866f6e46c Use president to provide sudo functionality 2015-10-26 09:47:49 -04:00
Juan Cruz Viotti
de83a06db8 Clarify the need of computer password during sudo
Since we only prompt "Password:", it might be confusing for some users
that think they have to enter their Resin.io password instead.

Fixes: https://github.com/resin-io/resin-cli/issues/239
2015-10-26 08:49:41 -04:00
Juan Cruz Viotti
363f12f81b Refer to the correct waiting stream function
We recently changed to using `rindle`, however looks like we forgot
to replace this particular instance.
2015-10-26 08:34:07 -04:00
Juan Cruz Viotti
fc5fe6cf68 Fix validation module require typo 2015-10-21 13:28:51 -04:00
Juan Cruz Viotti
8fe08642f5 Merge pull request #245 from resin-io/jviotti/feature/simplify-quickstart
Remove project directory creation in quickstart
2015-10-21 13:20:35 -04:00
Juan Cruz Viotti
822632718f Merge pull request #247 from resin-io/jvioti/refactor/os
Remove unused getOperatingSystem function
2015-10-21 11:43:19 -04:00
Juan Cruz Viotti
f66cd00646 Remove project directory creation in quickstart
The last part of `quickstart` feels weird. By consensus, we remove the
part that attempts to create a project directory and leave that step to
the user.
2015-10-21 11:18:29 -04:00
Juan Cruz Viotti
965fd8fc19 Remove unused getOperatingSystem function 2015-10-21 10:20:38 -04:00
Juan Cruz Viotti
7a4f551a47 Use rindle instead of custom waitStream 2015-10-21 10:17:10 -04:00
Juan Cruz Viotti
c1e6a28640 Refactor validation to a single place 2015-10-21 09:37:25 -04:00
Juan Cruz Viotti
8913fb515b Implement user/password login with 2FA support 2015-10-21 08:28:20 -04:00
Juan Cruz Viotti
ff81c1e514 Merge pull request #234 from resin-io/jviotti/feature/advanced-options
Ignore advanced configuration questions by default
2015-10-20 09:12:38 -04:00
Juan Cruz Viotti
ec28bd9c9e Ignore advanced configuration questions by default
The advanced questions can be enabled by passing `--advanced` in `os
configure`.
2015-10-19 14:02:57 -04:00
Juan Cruz Viotti
0b7e2a2c8c Require application name to have at least 4 characters
We get a weird error message from pine otherwise:

	ResinRequestError: Request error: It is necessary that each app name
	that is of a user (Auth), has a Length (Type) that is greater than or
	equal to 4.
2015-10-19 10:56:02 -04:00
Juan Cruz Viotti
1cfbd4197d Improve the way the update notifier is shown
Current has the following problems:

- Our custom message gets printed even if the notifier doesn't contain
an update.

- The notifier box is deferred, therefore it's printed at the end of the
command. Since our custom message is printed at the beginning, it makes
no sense at all.
2015-10-15 09:18:45 -04:00
Juan Cruz Viotti
adf4aef517 Clarify the need for admin privileges on update
Fixes: https://github.com/resin-io/resin-cli/issues/223
2015-10-14 13:45:08 -04:00
Juan Cruz Viotti
3149464c7a Shorten the length of await device message
If the spinner message doesn't fit in your terminal, each spinner
position will be printed in different lines.

We mitigate this by dramatically shortenning the message.
2015-10-07 11:38:59 -04:00
Juan Cruz Viotti
97d9b7816f Merge pull request #214 from resin-io/jviotti/feature/plugin-warn-red
Print plugin warnings in red as other errors
2015-10-06 19:18:33 -04:00
Juan Cruz Viotti
ec77437080 Print plugin warnings in red as other errors
For the sake of consistency.
2015-10-06 18:51:17 -04:00