Donal McBreen
fb3353084f
Default to deploying the config version
...
If we don't supply a version when deploying we'll use the result of
docker image ls to decide which image to boot. But that doesn't
necessarily correspond to the one we have just built.
E.g. if you do something like:
```
mrsk deploy # deploys git sha AAAAAAAAAAAAAA
git commit --amend # update the commit message
mrsk deploy # deploys git sha BBBBBBBBBBBBBB
```
In this case running `docker image ls` will give you the same image
twice (because the contents are identical) with tags for both SHAs but
the image we have just built will not be returned first. Maybe the order
is random, but it always seems to come second as far as I have seen.
i.e you'll get something like:
```
REPOSITORY TAG IMAGE ID CREATED SIZE
foo/bar AAAAAAAAAAAAAA 6272349a9619 31 minutes ago 791MB
foo/bar BBBBBBBBBBBBBB 6272349a9619 31 minutes ago 791MB
```
Since we already know what version we want to deploy from the config,
let's just pass that through.
2023-03-22 16:14:50 +00:00
David Heinemeier Hansson
d0c4030257
Merge pull request #128 from calmyournerves/utils-tests
...
Tests for `Mrsk::Utils`
2023-03-20 02:28:42 -04:00
Samuel Sieg
c3d0382935
Add another assertion for escape_shell_value
2023-03-17 16:31:10 +01:00
Samuel Sieg
2de5250486
Add tests for Mrsk::Utils
2023-03-17 16:29:25 +01:00
David Heinemeier Hansson
d167e48584
Merge pull request #122 from calmyournerves/add-cli-tests
...
Add CLI tests for remaining commands that are not tested yet
2023-03-16 09:31:28 -04:00
David Heinemeier Hansson
d071246865
Merge pull request #119 from ylecuyer/active_support-yle
...
Minor: Properly require active_support
2023-03-16 09:29:34 -04:00
Samuel Sieg
dae8b14469
Fix indentation
2023-03-16 08:35:12 +01:00
Samuel Sieg
b166f3fbf4
Don't report exception here too
2023-03-16 08:29:10 +01:00
Samuel Sieg
d33b723afb
Don't report exception
2023-03-16 08:24:54 +01:00
Samuel Sieg
aae290cefc
Add CLI tests for remaining commands that are not tested yet
2023-03-15 16:48:12 +01:00
Yoann Lecuyer
85a0267447
Minor: Properly require active_support
2023-03-14 23:29:00 +01:00
David Heinemeier Hansson
c282461265
Merge pull request #116 from tbuehlmann/traefik-command-options
...
Properly pass traefik command options
2023-03-14 15:08:27 -04:00
David Heinemeier Hansson
dcbe038555
Merge pull request #117 from calmyournerves/cli-main-tests
...
Add tests for main CLI commands
2023-03-14 15:07:07 -04:00
Samuel Sieg
3fd2f3f2c5
Improve comments
2023-03-14 16:05:57 +01:00
Samuel Sieg
46dad1ee6c
Add tests for main CLI commands
2023-03-14 15:58:12 +01:00
Tobias Bühlmann
3ca5bc50b6
Properly pass traefik command options
...
Traefik command options need to be passed as `--key=value`, not `--key value`.
2023-03-14 15:04:33 +01:00
David Heinemeier Hansson
b668ce3f25
Merge pull request #111 from calmyournerves/deploy-without-build-push
2023-03-14 07:32:27 -04:00
David Heinemeier Hansson
253d4ac37b
Merge pull request #115 from intrip/fix-traefik-default-middleware
2023-03-14 07:31:20 -04:00
Jacopo
50ee954ca9
Fix Traefik retry middleware
...
As per [Traefik docs](https://doc.traefik.io/traefik/middlewares/overview/#configuration-example )
a middleware to be activated needs to be applied to a route. Change the default settings
to apply the `retry` middleware on every role with Traefik enabled.
2023-03-14 12:15:00 +01:00
Samuel Sieg
0ac2cd2a4b
Add tests for deploy/redeploy commands
2023-03-14 11:49:31 +01:00
Samuel Sieg
577cf2cec9
Merge branch 'main' into deploy-without-build-push
2023-03-13 16:11:38 +01:00
Samuel Sieg
5010850b86
Merge branch 'main' into deploy-without-build-push
2023-03-13 16:10:31 +01:00
David Heinemeier Hansson
fa07c2403c
Merge pull request #113 from moomerman/fix-healthcheck-test
...
Fix healthcheck test
2023-03-13 16:10:17 +01:00
Samuel Sieg
c29d1ddeba
Fix
2023-03-13 16:05:21 +01:00
Samuel Sieg
cb15800d25
Move option to deploy/redeploy, rename to skip-push
2023-03-13 16:02:24 +01:00
Richard Taylor
3e0b71b631
Fix healthcheck test
...
Looks like the tests started failing on the options healthcheck PR
after merging the container name env var PR.
2023-03-13 14:51:54 +00:00
David Heinemeier Hansson
9b666e54f3
Update README.md
2023-03-13 10:43:44 -04:00
David Heinemeier Hansson
bf3d3f3ba7
Merge pull request #101 from davegudge/fix-docker-publish
...
fix: GitHub Workflow: Docker Publish
2023-03-13 15:14:06 +01:00
David Heinemeier Hansson
20733a4493
Merge pull request #102 from moomerman/cmd-options-for-healthcheck
...
Use custom web options for healthcheck
2023-03-13 15:12:25 +01:00
David Heinemeier Hansson
a267c1e835
Merge pull request #103 from 99linesofcode/fix-dockerfile-buildx
...
Install buildx inside container
2023-03-13 15:11:37 +01:00
David Heinemeier Hansson
c1c26a154d
Merge pull request #104 from moomerman/add-container-name-env-var
...
Add container name env var for containers
2023-03-13 15:10:02 +01:00
David Heinemeier Hansson
5969ff66d5
Merge pull request #107 from clowder/order-options-dig
...
Avoid `[ActiveSupport::OrderedOptions#dig]`
2023-03-13 15:08:31 +01:00
David Heinemeier Hansson
b1f5165dc0
Merge pull request #108 from clowder/patch-1
...
Update `accessory remove` description and warning
2023-03-13 15:07:47 +01:00
David Heinemeier Hansson
cce0fafdc4
Merge pull request #110 from kjellberg/patch-1
...
Update README.md to reflect backtick escaping in Utils.optionize
2023-03-13 15:07:09 +01:00
Samuel Sieg
6232175ef8
Undo changes from experimenting
2023-03-12 10:56:12 +01:00
Samuel Sieg
47af6d9483
Is a global option better?
2023-03-12 10:53:29 +01:00
Samuel Sieg
ff0170076e
Simplify
2023-03-12 10:44:33 +01:00
Samuel Sieg
9b39f2f3ab
Keep it simple for the proposal
2023-03-12 10:41:04 +01:00
Rasmus Kjellberg
600902ef5e
Update README.md
...
Backticks are handled by `Utils.optionize`
2023-03-12 07:39:07 +01:00
Richard Taylor
bb241dea43
Add container name env var for containers
...
Because the container name is generated it isn't possible to
determine this inside the container.
This adds the MRSK_CONTAINER_NAME env var when running the
container so it can be read by the service running inside the
container.
2023-03-11 10:14:41 +00:00
Chris Lowder
f26beeaa9f
Update accessory remove description and warning
...
Make it clear the accessory's data directory will also be removed.
2023-03-10 20:51:14 +00:00
Chris Lowder
41a5cb2a04
Avoid [ActiveSupport::OrderedOptions#dig]
...
The implementation has been updated upstream[^1] to expect symbolized
keys. MRSK relies heavily on the fact that nested keys are strings, so
we're removing existing uses of `#dig`.
[^1]: 5c15b586aa
2023-03-10 19:45:35 +00:00
Chris Lowder
643cb2c520
Include edge Rails in the build matrix
...
Highlighting an incompatibility with the new implementation of
`[ActiveSupport::OrderedOptions#dig]`.
[^1]: 5c15b586aa
2023-03-10 19:40:57 +00:00
Jordy Schreuders
b2c819fe32
Add README section on running MRSK from Docker
2023-03-10 19:23:14 +02:00
Jordy Schreuders
439b681308
Neglected to install buildx inside container
2023-03-10 18:13:32 +02:00
Richard Taylor
e5c5e89232
Use custom web options for healthcheck
...
If the web role has custom options, ensure these are used for the
healthcheck.
2023-03-10 15:55:04 +00:00
Samuel Sieg
4bf77ccd1b
Allow deploy/deliver without building and pushing the image
2023-03-10 11:26:35 +01:00
Dave Gudge
57e9231c5e
fix: Github Workflow: Docker Publish
...
The workflow was failing with:
```
The workflow is not valid. .github/workflows/docker-publish.yml (Line: 22, Col: 14): Unexpected symbol: '|'. Located at position 12 within expression: github.ref | replace('refs/tags/', '')
```
The `set-output` command is deprecated, so the issue has been fixed by utilising the `github.ref_name` context to retrieve the version tag that triggered the workflow.
> `github.ref_name`: The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on GitHub. For example, `feature-branch-1`.
https://docs.github.com/en/actions/learn-github-actions/contexts
2023-03-10 10:02:33 +00:00
David Heinemeier Hansson
3026a92c98
Merge pull request #71 from tbuehlmann/destination-awareness
...
Destination aware container names
2023-03-09 13:25:49 +00:00
David Heinemeier Hansson
ab7c6c6540
Use compact.join strategy here too
2023-03-09 14:24:19 +01:00