Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngerakines/deployer-tools
https://github.com/ngerakines/deployer-tools
continuous-delivery continuous-deployment docker-swarm golang
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ngerakines/deployer-tools
- Owner: ngerakines
- License: mit
- Created: 2017-01-29T21:26:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T20:01:32.000Z (almost 8 years ago)
- Last Synced: 2024-06-20T15:01:54.656Z (6 months ago)
- Topics: continuous-delivery, continuous-deployment, docker-swarm, golang
- Language: Go
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deployer-tools
A utility that evaluates a mapping of project branches to services in clusters, outputting docker swarm actions.
## Usage
```
Usage: deployer-tools [options]
Helps deploy things.
Options:
-dry
Prefixes all output with '#' characters.
-event string
The location of the event file.
-host-template string
The template used to build the host DNS entry.
-mapping string
The location of the mapping file.
-test
Use to test scripts.
```Ideal usage is to pipe the output into bash.
$ ./deployer-tools -event event.json -mapping mapping.json | sh
Using the `-dry` flag will prefix all output with '# '.
$ ./deployer-tools -event event.json -mapping mapping.json -dry
# docker -H manager01.greeting.internal:2375 service update --image ngerakines/hello-world-nodejs:CI1 hello
# docker -H manager01.greeting.internal:2375 service update --image ngerakines/hello-world-nodejs:CI1 goodbyeUsing `-test` will output several echo lines used for script testing.
$ ./deployer-tools -test
echo 'deployer-tools test'### Example 1
With the following mapping:
```json
{
"hello-world": {
"master": {
"greeting": ["hello"]
}
},
"project": {
"branch": {
"cluster": ["service"]
}
}
}
```With this event:
```json
{
"Project":"hello-world",
"Branch":"master",
"Container":"ngerakines/hello-world-nodejs:CI1"
}
```$ ./deployer-tools -mapping mapping.json -event event.json
docker -H manager01.greeting.internal:2375 service update --image ngerakines/hello-world-nodejs:CI1 hello### Example 2
With the following mapping:
```json
{
"hello-world": {
"master": {
"greeting": ["hello", "goodbye"]
}
},
"project": {
"branch": {
"cluster": ["service"]
}
}
}
```With this event:
```json
{
"Project":"hello-world",
"Branch":"master",
"Container":"ngerakines/hello-world-nodejs:CI1"
}
```$ ./deployer-tools -mapping mapping.json -event event.json
docker -H manager01.greeting.internal:2375 service update --image ngerakines/hello-world-nodejs:CI1 hello
docker -H manager01.greeting.internal:2375 service update --image ngerakines/hello-world-nodejs:CI1 goodbye### Example 3
With the following mapping:
```json
{
"hello-world": {
"master": {
"greeting": ["hello", "goodbye"]
}
},
"project": {
"branch": {
"cluster": ["service"]
}
}
}
```With this event:
```json
{
"Project":"hello-world",
"Branch":"feature-1234",
"Container":"ngerakines/hello-world-nodejs:CI1"
}
```$ ./deployer-tools -mapping mapping.json -event event.json
There is no output.