Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
17b1b0f
feat: improve composite tasks logging
quantumsheep Mar 16, 2023
4b6ea67
fix: abandonate file description sharing
quantumsheep Mar 16, 2023
ef29e52
feat: use a file instead of a pipe
quantumsheep Mar 17, 2023
92f59f2
feat: improve tasks and cleanup cancelling
quantumsheep Mar 17, 2023
5db105e
go mod tidy
quantumsheep Mar 17, 2023
2a7d555
feat(container): implement deploy workflow
quantumsheep Mar 14, 2023
9d42850
feat: add dockerfile, build source and port arguments
quantumsheep Mar 14, 2023
4e498c8
refactor: separate each tasks
quantumsheep Mar 15, 2023
7c4e8fa
refactor: make linter happy
quantumsheep Mar 15, 2023
4248b81
docs: generate documentation
quantumsheep Mar 15, 2023
fb532d7
feat: improve logging and result feedback
quantumsheep Mar 16, 2023
14baf47
feat: use logger file description for json message stream
quantumsheep Mar 17, 2023
71f950b
go mod tidy
quantumsheep Mar 17, 2023
05e9b47
docs: add cache
quantumsheep Mar 17, 2023
abadf38
feat: add namespace argument
quantumsheep Mar 17, 2023
ab0937e
docs: regenerate documentation
quantumsheep Mar 17, 2023
350dff2
apply fixes
quantumsheep Mar 22, 2023
65592a4
test: add tests
quantumsheep Mar 22, 2023
e288f7f
update github.com/docker/docker
quantumsheep Mar 22, 2023
1f834e0
update documentation
quantumsheep Mar 22, 2023
4235708
update testdata
quantumsheep Mar 22, 2023
4bcf7c4
feat: use http client and allow tests to pass
quantumsheep Mar 23, 2023
6706147
update sdk-go
quantumsheep Mar 23, 2023
a9be584
Merge branch 'master' into feat/container-deploy
quantumsheep Mar 23, 2023
ec91406
rename socket transport
quantumsheep Mar 23, 2023
977ed52
replace `//./pipe/docker_engine` by `/var/run/docker.sock`
quantumsheep Mar 23, 2023
7c42c52
support for windows
quantumsheep Mar 23, 2023
73d72cd
fix error messages wrapping
quantumsheep Mar 23, 2023
b65ccb1
fix waiter retry interval
quantumsheep Mar 23, 2023
d8611fd
Merge branch 'master' into feat/container-deploy
quantumsheep Mar 23, 2023
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
24 changes: 24 additions & 0 deletions cmd/scw/testdata/test-all-usage-container-deploy-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Automatically build and deploy a container.

USAGE:
scw container deploy [arg=value ...]

ARGS:
[name] Name of the application (defaults to build-source's directory name)
[dockerfile=Dockerfile] Path to the Dockerfile
[build-source=.] Path to the build context
[cache=true] Use cache when building the image
[port=8080] Port to expose
[namespace-id] Container Namespace ID to deploy to
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

FLAGS:
-h, --help help for deploy

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
3 changes: 3 additions & 0 deletions cmd/scw/testdata/test-all-usage-container-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ AVAILABLE COMMANDS:
namespace Namespace management commands
token Token management commands

WORKFLOW COMMANDS:
deploy Deploy a container

FLAGS:
-h, --help help for container

Expand Down
28 changes: 28 additions & 0 deletions docs/commands/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Containers API.
- [Get a cron](#get-a-cron)
- [List all your crons](#list-all-your-crons)
- [Update an existing cron](#update-an-existing-cron)
- [Deploy a container](#deploy-a-container)
- [Domain management commands](#domain-management-commands)
- [Create a domain name binding](#create-a-domain-name-binding)
- [Delete a domain name binding](#delete-a-domain-name-binding)
Expand Down Expand Up @@ -329,6 +330,33 @@ scw container cron update <cron-id ...> [arg=value ...]



## Deploy a container

Automatically build and deploy a container.

Automatically build and deploy a container.

**Usage:**

```
scw container deploy [arg=value ...]
```


**Args:**

| Name | | Description |
|------|---|-------------|
| name | | Name of the application (defaults to build-source's directory name) |
| dockerfile | Default: `Dockerfile` | Path to the Dockerfile |
| build-source | Default: `.` | Path to the build context |
| cache | Default: `true` | Use cache when building the image |
| port | Default: `8080` | Port to expose |
| namespace-id | | Container Namespace ID to deploy to |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |



## Domain management commands

Domain management commands.
Expand Down
15 changes: 14 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require (
github.com/chzyer/readline v1.5.1
github.com/containerd/console v1.0.3
github.com/dnaeon/go-vcr v1.2.0
github.com/docker/docker v23.0.1+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.15.0
github.com/getsentry/raven-go v0.2.0
Expand All @@ -31,6 +32,8 @@ require (
)

require (
cloud.google.com/go v0.57.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/alecthomas/colour v0.1.0 // indirect
github.com/alecthomas/repr v0.0.0-20210801044451-80ca428c5142 // indirect
Expand All @@ -40,6 +43,8 @@ require (
github.com/containerd/typeurl v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/etdub/goparsetime v0.0.0-20160315173935-ea17b0ac3318 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand All @@ -51,12 +56,18 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-tty v0.0.3 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/signal v0.7.0 // indirect
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 // indirect
github.com/opencontainers/runc v1.1.3 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
Expand All @@ -71,12 +82,14 @@ require (
go.opentelemetry.io/otel/trace v1.4.1 // indirect
go.opentelemetry.io/proto/otlp v0.12.0 // indirect
golang.org/x/crypto v0.2.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/time v0.1.0 // indirect
google.golang.org/genproto v0.0.0-20220706185917-7780775163c4 // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gotest.tools/v3 v3.4.0 // indirect
)
Loading