Compare commits

...
44 Commits
Author SHA1 Message Date
CyberShell 5f6459d5be v0.13.1
ci/woodpecker/push/publish-docs Pipeline is pending
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
2026-08-15 09:53:03 -05:00
CyberShell 1d2a3a8306 v0.13.0
ci/woodpecker/push/publish-docs Pipeline failed
ci/woodpecker/tag/gitea Pipeline failed
ci/woodpecker/tag/publish-docs Pipeline failed
2026-08-15 00:35:57 -05:00
CyberShell 045dedef67 v0.13.0
ci/woodpecker/push/go-lint Pipeline failed
2026-08-15 00:34:13 -05:00
CyberShell 60989a3905 fix error hooks and add listing everything
ci/woodpecker/push/go-lint Pipeline failed
2026-08-15 00:30:55 -05:00
CyberShell e789924547 fix error hooks and add listing everything
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
2026-08-15 00:16:05 -05:00
CyberShell 62ac2934dc v0.12.1
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
ci/woodpecker/push/go-lint Pipeline failed
2026-03-23 11:30:32 -05:00
CyberShell c078632691 remove shell history boolean
ci/woodpecker/push/publish-docs Pipeline was successful
2026-02-14 18:57:37 -06:00
CyberShell 52e25aad77 v0.12.0
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
2026-02-11 13:18:46 -06:00
CyberShell 9f996f60c6 internal logic handling for cron webserver 2026-02-11 13:18:06 -06:00
CyberShell 4c152f8089 internal logic handling for cron webserver 2026-02-11 13:17:15 -06:00
CyberShell 4d2e4ce533 v0.11.5
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
2026-02-10 12:01:11 -06:00
CyberShell 9e3960ce9f Command.Type: scriptFile no longer requests psudoterminal
ci/woodpecker/push/go-lint Pipeline failed
2026-02-10 12:00:08 -06:00
CyberShell b2d89352a3 v0.11.4
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2026-02-01 07:21:20 -06:00
CyberShell 765ef2ee36 v0.11.3
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
2026-01-31 01:06:18 -06:00
CyberShell 995e4f91b5 update docs
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
2025-12-27 00:59:57 -06:00
CyberShell fa62bc1ec6 v0.11.2
ci/woodpecker/push/publish-docs Pipeline failed
2025-12-27 00:45:54 -06:00
CyberShell 2766ac997a update CI Configs
ci/woodpecker/push/go-lint Pipeline failed
2025-12-27 00:03:39 -06:00
CyberShell d0b4c0b9df update CI Configs
ci/woodpecker/push/go-lint Pipeline failed
2025-12-26 23:55:13 -06:00
CyberShell beabe9f041 Upgraded GoCron; web ui viewer for viewing cron jobs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2025-12-26 23:04:25 -06:00
CyberShell 3a038eeab4 Upgraded GoCron; web ui viewer for viewing cron jobs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2025-12-26 22:58:08 -06:00
CyberShell a95f903e72 more work on integration testing
ci/woodpecker/push/go-lint Pipeline failed
2025-12-15 13:50:20 -06:00
CyberShell 61add23efb v0.11.1
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/tag/publish-docs Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline was successful
ci/woodpecker/push/go-lint Pipeline failed
2025-12-08 18:17:48 -06:00
CyberShell b228fca371 update docs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2025-12-08 18:15:40 -06:00
CyberShell e5a9003ed6 start integration testing
ci/woodpecker/push/go-lint Pipeline failed
2025-12-08 18:13:58 -06:00
CyberShell 803b039849 start integration testing
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
2025-12-08 18:12:31 -06:00
CyberShell 2824f8c703 inject ssh env vars by apppending them to the script
ci/woodpecker/push/go-lint Pipeline failed
2025-12-08 10:08:44 -06:00
CyberShell cfc00262ff inject ssh env vars by apppending them to the script
ci/woodpecker/push/go-lint Pipeline failed
2025-11-29 20:55:11 -06:00
CyberShell fd019bc407 v0.11.0
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
ci/woodpecker/tag/gitea Pipeline was successful
ci/woodpecker/release/publish-docs Pipeline is pending
ci/woodpecker/tag/publish-docs Pipeline was successful
2025-11-24 17:51:56 -06:00
CyberShell febc2680f4 Update docs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2025-11-17 16:46:54 -06:00
CyberShell caf2397349 Update docs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
2025-11-17 16:27:33 -06:00
CyberShell 172ca8712e Update docs
ci/woodpecker/push/publish-docs Pipeline failed
ci/woodpecker/push/go-lint Pipeline failed
2025-11-17 16:12:02 -06:00
CyberShell bda16bcbb5 Update docs
ci/woodpecker/push/go-lint Pipeline failed
2025-11-17 16:08:42 -06:00
CyberShell b5d069112f Update docs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
2025-11-17 15:56:28 -06:00
CyberShell f56393c84c fix small things 2025-11-17 15:55:51 -06:00
CyberShell 55ef8e1733 Update docs
ci/woodpecker/push/go-lint Pipeline failed
2025-11-17 15:43:47 -06:00
CyberShell 075fc16ec9 Update docs
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline failed
2025-11-15 22:54:02 -06:00
CyberShell 0d6a13c1cf Cmd Type script now correctly appends arguments
ci/woodpecker/push/go-lint Pipeline failed
ci/woodpecker/push/publish-docs Pipeline was successful
2025-11-15 17:37:17 -06:00
CyberShell e57939f858 add files
ci/woodpecker/push/go-lint Pipeline failed
2025-10-21 23:19:00 -05:00
CyberShell d45b1562fc started refactoring into executors using interfaces 2025-09-07 20:44:48 -05:00
CyberShell 7fe07f86a9 CLI: added exec hosts subcommand list 2025-07-23 22:05:44 -05:00
CyberShell 14c81a00a7 CLI: added exec hosts subcommand list 2025-07-23 22:04:48 -05:00
CyberShell 3eced64453 CLI: Exec subcommand host 2025-07-15 20:24:30 -05:00
CyberShell c284d928fd CLI: Exec subcommand host 2025-07-15 20:24:06 -05:00
CyberShell dd9da9452b CLI: Exec subcommand host 2025-07-15 20:23:58 -05:00
179 changed files with 2529 additions and 738 deletions
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
@@ -1,3 +0,0 @@
kind: Added
body: 'feat: Package operation `versionCheck` supports regular expressions (see [regexp](https://pkg.go.dev/regexp) package for docs)'
time: 2025-04-09T17:45:28.836497149-05:00
@@ -1,3 +0,0 @@
kind: Added
body: 'Command lists: added `cmdLists.[name].notify` object'
time: 2025-05-01T11:07:45.96164753-05:00
@@ -1,3 +0,0 @@
kind: Added
body: Testing setup with Docker
time: 2025-07-04T08:59:17.430373451-05:00
@@ -1,3 +0,0 @@
kind: Added
body: 'CLI: add global flag --hostsConfig that allows hosts to be dynamic in relation to the main config'
time: 2025-07-04T10:21:26.864635558-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: 'Commands: `host` can now be `localhost` or `127.0.0.1` to run commands locally'
time: 2025-03-21T09:08:49.871021144-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: lists loaded from external files only if no list config present in current file
time: 2025-03-25T00:33:57.039431409-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: "`PackageManager.Parse` renamed to `ParseRemotePackageManagerVersionOutput`. This now returns arrays of PackageManagerCommon.Package and errors."
time: 2025-04-07T22:30:20.342177323-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: 'Internal: refactoring and renaming functions'
time: 2025-04-18T13:34:40.842541658-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: 'Commands: moved output-prefixed keys to the `commands.[name].output` object'
time: 2025-05-01T11:05:34.90130087-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: Change internal method name for better understanding
time: 2025-06-09T07:26:01.819927627-05:00
@@ -1,3 +0,0 @@
kind: Changed
body: Improved error message for remote version package output
time: 2025-07-09T23:19:19.431960446-05:00
@@ -1,3 +0,0 @@
kind: Fixed
body: 'Command Lists: hooks now run correctly when commands finish'
time: 2025-04-18T09:57:47.39035092-05:00
@@ -1,3 +0,0 @@
kind: Fixed
body: Log file passed using `--log-file` correctly used
time: 2025-04-24T22:57:11.592829277-05:00
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
+21
View File
@@ -0,0 +1,21 @@
## v0.11.0 - 2025-11-24
### Added
* feat: Package operation `versionCheck` supports regular expressions (see [regexp](https://pkg.go.dev/regexp) package for docs)
* Command lists: added `cmdLists.[name].notify` object
* Testing setup with Docker
* CLI: add global flag --hostsConfig that allows hosts to be dynamic in relation to the main config
* CLI: Exec subcommand `hosts`. See documentation for more details.
* CLI: added `exec hosts` subcommand `list`
* Add support for hosts in parallel
### Changed
* Commands: `host` can now be `localhost` or `127.0.0.1` to run commands locally
* lists loaded from external files only if no list config present in current file
* `PackageManager.Parse` renamed to `ParseRemotePackageManagerVersionOutput`. This now returns arrays of PackageManagerCommon.Package and errors.
* Internal: refactoring and renaming functions
* Commands: moved output-prefixed keys to the `commands.[name].output` object
* Change internal method name for better understanding
* Improved error message for remote version package output
### Fixed
* Command Lists: hooks now run correctly when commands finish
* Log file passed using `--log-file` correctly used
* Cmd Type `script` now correctly appends arguments
+6
View File
@@ -0,0 +1,6 @@
## v0.11.1 - 2025-12-08
### Added
* Started integration testing
### Changed
* inject ssh env vars by apppending them to the script/command if SSH setenv fails
* fix local command injection by running in a shell
+3
View File
@@ -0,0 +1,3 @@
## v0.11.2 - 2025-12-27
### Added
* Upgraded GoCron; web ui viewer for viewing cron jobs
+7
View File
@@ -0,0 +1,7 @@
## v0.11.3 - 2026-01-31
### Added
* Command: saveShellHistory for scriptFile commands over SSH
* Starting on Variables and Templates
### Changed
* File output for commands now adds hostname to beginning of filename
* Testing: docker testing infra
+3
View File
@@ -0,0 +1,3 @@
## v0.11.4 - 2026-02-01
### Changed
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
+3
View File
@@ -0,0 +1,3 @@
## v0.11.5 - 2026-02-10
### Changed
* Command.Type: scriptFile no longer requests psudoterminal
+3
View File
@@ -0,0 +1,3 @@
## v0.12.0 - 2026-02-11
### Changed
* internal logic handling for cron webserver
+8
View File
@@ -0,0 +1,8 @@
## v0.12.1 - 2026-03-23
### Added
* Command output respects `command.[name].output.toLog` when standard output is enabled
### Changed
* SSH: revert scriptFile to before 0.11.3
* Output: tabs print as 4 spaces instead of '\t'
### Fixed
* Internal: output buffer will be copied to temporary buffer
+5
View File
@@ -0,0 +1,5 @@
## v0.13.0 - 2026-08-15
### Changed
* List subcommands print out everything with no arguments
### Fixed
* Error hooks no longer return after one is executed
+3
View File
@@ -0,0 +1,3 @@
## v0.13.1 - 2026-08-15
### Changed
* Print help for exec command if no args given
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
Regular → Executable
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- run: git fetch --force --tags - run: git fetch --force --tags
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: '1.23' go-version: '1.24'
cache: true cache: true
# More assembly might be required: Docker logins, GPG, etc. It all depends # More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs. # on your needs.
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+2
View File
@@ -34,6 +34,8 @@ snapshot:
version_template: "{{ incpatch .Version }}-next" version_template: "{{ incpatch .Version }}-next"
changelog: changelog:
disable: false disable: false
release:
prerelease: auto
gitea_urls: gitea_urls:
api: https://git.andrewnw.xyz/api/v1 api: https://git.andrewnw.xyz/api/v1
Regular → Executable
+2
View File
@@ -31,6 +31,8 @@ archives:
formats: [zip] formats: [zip]
checksum: checksum:
name_template: 'checksums.txt' name_template: 'checksums.txt'
release:
prerelease: auto
snapshot: snapshot:
version_template: "{{ incpatch .Version }}-next" version_template: "{{ incpatch .Version }}-next"
changelog: changelog:
Regular → Executable
View File
Vendored Regular → Executable
+10 -1
View File
@@ -10,5 +10,14 @@
"nikoksr", "nikoksr",
"Strs" "Strs"
], ],
"CodeGPT.apiKey": "CodeGPT Plus Beta" "CodeGPT.apiKey": "CodeGPT Plus Beta",
"yaml.schemas": {
"file:///c%3A/Users/anw12/.vscode/extensions/continue.continue-1.2.14-win32-x64/config-yaml-schema.json": [
".continue/**/*.yaml"
],
"file:///c%3A/Users/anw12/.vscode/extensions/continue.continue-1.2.16-win32-x64/config-yaml-schema.json": [
".continue/**/*.yaml"
],
"file:///c:/Users/anw12/.vscode/extensions/continue.continue-1.2.16-win32-x64/config-yaml-schema.json": "vscode-local:/c%3A/Users/anw12/.continue/config.yaml"
}
} }
+1 -1
View File
@@ -1,6 +1,6 @@
steps: steps:
golang: golang:
image: golang:1.23 image: golang:1.24
commands: commands:
- go install github.com/goreleaser/goreleaser/v2@v2.7.0 - go install github.com/goreleaser/goreleaser/v2@v2.7.0
- goreleaser release -f .goreleaser/gitea.yml --release-notes=".changes/$(go run backy.go version -V).md" - goreleaser release -f .goreleaser/gitea.yml --release-notes=".changes/$(go run backy.go version -V).md"
+1 -1
View File
@@ -1,6 +1,6 @@
steps: steps:
build: build:
image: golang image: golang:1.24
commands: commands:
- go build - go build
- go test - go test
+2 -2
View File
@@ -1,11 +1,11 @@
steps: steps:
build: build:
image: hugomods/hugo:ci image: hugomods/hugo:debian-ci-0.147.2
commands: commands:
- git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);' - git submodule foreach 'git fetch origin; git checkout $(git describe --tags `git rev-list --tags --max-count=1`);'
- cd docs - cd docs
- hugo mod get -u github.com/divinerites/plausible-hugo - hugo mod get -u github.com/divinerites/plausible-hugo
- hugo mod get -u github.com/McShelby/hugo-theme-relearn@7.3.1 - hugo mod get -u github.com/McShelby/hugo-theme-relearn@8.2.0
- hugo - hugo
deploy: deploy:
+19
View File
@@ -0,0 +1,19 @@
steps:
golang:
image: golang:1.24
commands:
- go install github.com/goreleaser/goreleaser/v2@v2.7.0
- goreleaser release -f .goreleaser/github.yml --release-notes=".changes/$(go run backy.go version -V).md"
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
event: tag
# release:
# image: goreleaser/goreleaser
# commands:
when:
- event: tag
branch: master
Regular → Executable
+72
View File
@@ -6,6 +6,78 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie). and is generated by [Changie](https://github.com/miniscruff/changie).
## v0.13.1 - 2026-08-15
### Changed
* Print help for exec command if no args given
## v0.13.0 - 2026-08-15
### Changed
* List subcommands print out everything with no arguments
### Fixed
* Error hooks no longer return after one is executed
## v0.12.1 - 2026-03-23
### Added
* Command output respects `command.[name].output.toLog` when standard output is enabled
### Changed
* SSH: revert scriptFile to before 0.11.3
* Output: tabs print as 4 spaces instead of '\t'
### Fixed
* Internal: output buffer will be copied to temporary buffer
## v0.12.0 - 2026-02-11
### Changed
* internal logic handling for cron webserver
## v0.11.5 - 2026-02-10
### Changed
* Command.Type: scriptFile no longer requests psudoterminal
## v0.11.4 - 2026-02-01
### Changed
* Command.[name].output.file: now appends correctly to the beginning of file in an absolute path
## v0.11.3 - 2026-01-31
### Added
* Command: saveShellHistory for scriptFile commands over SSH
* Starting on Variables and Templates
### Changed
* File output for commands now adds hostname to beginning of filename
* Testing: docker testing infra
## v0.11.2 - 2025-12-27
### Added
* Upgraded GoCron; web ui viewer for viewing cron jobs
## v0.11.1 - 2025-12-08
### Added
* Started integration testing
### Changed
* inject ssh env vars by apppending them to the script/command if SSH setenv fails
* fix local command injection by running in a shell
## v0.11.0 - 2025-11-24
### Added
* feat: Package operation `versionCheck` supports regular expressions (see [regexp](https://pkg.go.dev/regexp) package for docs)
* Command lists: added `cmdLists.[name].notify` object
* Testing setup with Docker
* CLI: add global flag --hostsConfig that allows hosts to be dynamic in relation to the main config
* CLI: Exec subcommand `hosts`. See documentation for more details.
* CLI: added `exec hosts` subcommand `list`
* Add support for hosts in parallel
### Changed
* Commands: `host` can now be `localhost` or `127.0.0.1` to run commands locally
* lists loaded from external files only if no list config present in current file
* `PackageManager.Parse` renamed to `ParseRemotePackageManagerVersionOutput`. This now returns arrays of PackageManagerCommon.Package and errors.
* Internal: refactoring and renaming functions
* Commands: moved output-prefixed keys to the `commands.[name].output` object
* Change internal method name for better understanding
* Improved error message for remote version package output
### Fixed
* Command Lists: hooks now run correctly when commands finish
* Log file passed using `--log-file` correctly used
* Cmd Type `script` now correctly appends arguments
## v0.10.2 - 2025-03-19 ## v0.10.2 - 2025-03-19
### Added ### Added
* Notifications: http service added * Notifications: http service added
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+4 -2
View File
@@ -5,6 +5,8 @@
package cmd package cmd
import ( import (
"fmt"
"git.andrewnw.xyz/CyberShell/backy/pkg/backy" "git.andrewnw.xyz/CyberShell/backy/pkg/backy"
"git.andrewnw.xyz/CyberShell/backy/pkg/logging" "git.andrewnw.xyz/CyberShell/backy/pkg/logging"
@@ -21,7 +23,7 @@ var (
) )
func init() { func init() {
execCmd.AddCommand(hostExecCommand) execCmd.AddCommand(hostExecCommand, hostsExecCommand)
} }
@@ -29,7 +31,7 @@ func execute(cmd *cobra.Command, args []string) {
parseS3Config() parseS3Config()
if len(args) < 1 { if len(args) < 1 {
logging.ExitWithMSG("Please provide a command to run. Pass --help to see options.", 1, nil) logging.ExitWithMSG(fmt.Sprintf("Please provide a command to run.\n\n%s", cmd.Long), 1, nil)
} }
opts := backy.NewConfigOptions(configFile, opts := backy.NewConfigOptions(configFile,
Regular → Executable
+1 -1
View File
@@ -9,7 +9,7 @@ import (
var ( var (
hostExecCommand = &cobra.Command{ hostExecCommand = &cobra.Command{
Use: "host [--command=command1 --command=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -m host2 ...] ", Use: "host [--command=command1 --command=command2 ... | -c command1 -c command2 ...] [--hosts=host1 --hosts=hosts2 ... | -m host1 -m host2 ...] ",
Short: "Runs command defined in config file on the hosts in order specified.", Short: "Specify command(s) defined in config file on the host in order specified.",
Long: "Host executes specified commands on the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.", Long: "Host executes specified commands on the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.",
Run: Host, Run: Host,
} }
Executable
+93
View File
@@ -0,0 +1,93 @@
package cmd
import (
"maps"
"slices"
"git.andrewnw.xyz/CyberShell/backy/pkg/backy"
"git.andrewnw.xyz/CyberShell/backy/pkg/logging"
"github.com/spf13/cobra"
)
var (
runCommandsInParallel bool
hostsExecCommand = &cobra.Command{
Use: "hosts [--command=command1 --command=command2 ... | -c command1 -c command2 ...]",
Short: "Runs command defined in config file on the hosts in order specified.",
Long: "Hosts executes specified commands on all the hosts defined in config file.\nUse the --commands or -c flag to choose the commands.",
Run: Hosts,
}
hostsListExecCommand = &cobra.Command{
Use: "list list1 list2 ...",
Short: "Runs lists in order specified defined in config file on all hosts.",
Long: "Lists executes specified lists on all the hosts defined in hosts config.\nPass the names of lists as arguments after command.",
Run: HostsList,
}
)
func init() {
hostsExecCommand.AddCommand(hostsListExecCommand)
hostsListExecCommand.Flags().BoolVarP(&runCommandsInParallel, "parallel", "p", false, "Run commands in parallel on hosts")
parseS3Config()
}
// cli input should be hosts and commands. Hosts are defined in config files.
// commands can be passed by the following mutually exclusive options:
// 1. as a list of commands defined in the config file
// 2. stdin (on command line) (TODO)
func Hosts(cmd *cobra.Command, args []string) {
backyConfOpts := backy.NewConfigOptions(configFile,
backy.SetLogFile(logFile),
backy.EnableCommandStdOut(cmdStdOut),
backy.SetHostsConfigFile(hostsConfigFile))
backyConfOpts.InitConfig()
backyConfOpts.ParseConfigurationFile()
for _, h := range backyConfOpts.Hosts {
hostsList = append(hostsList, h.Host)
}
if cmdList == nil {
logging.ExitWithMSG("error: commands must be specified", 1, &backyConfOpts.Logger)
}
for _, c := range cmdList {
_, cmdFound := backyConfOpts.Cmds[c]
if !cmdFound {
logging.ExitWithMSG("cmd "+c+" not found", 1, &backyConfOpts.Logger)
}
}
backyConfOpts.ExecCmdsOnHosts(cmdList, hostsList)
}
func HostsList(cmd *cobra.Command, args []string) {
backyConfOpts := backy.NewConfigOptions(configFile,
backy.SetLogFile(logFile),
backy.EnableCommandStdOut(cmdStdOut),
backy.SetHostsConfigFile(hostsConfigFile))
backyConfOpts.InitConfig()
backyConfOpts.ParseConfigurationFile()
if len(args) == 0 {
logging.ExitWithMSG("error: no lists specified", 1, &backyConfOpts.Logger)
}
for _, l := range args {
_, listFound := backyConfOpts.CmdConfigLists[l]
if !listFound {
logging.ExitWithMSG("list "+l+" not found", 1, &backyConfOpts.Logger)
}
}
maps.DeleteFunc(backyConfOpts.CmdConfigLists, func(k string, v *backy.CmdList) bool {
return !slices.Contains(args, k)
})
backyConfOpts.ExecuteListOnHosts(args, runCommandsInParallel)
}
Regular → Executable
+42 -28
View File
@@ -5,8 +5,10 @@
package cmd package cmd
import ( import (
"fmt"
"os"
"git.andrewnw.xyz/CyberShell/backy/pkg/backy" "git.andrewnw.xyz/CyberShell/backy/pkg/backy"
"git.andrewnw.xyz/CyberShell/backy/pkg/logging"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@@ -15,28 +17,26 @@ var (
listCmd = &cobra.Command{ listCmd = &cobra.Command{
Use: "list [command]", Use: "list [command]",
Short: "List commands, lists, or hosts defined in config file.", Short: "List commands, lists, or hosts defined in config file.",
Long: "List commands, lists, or hosts defined in config file", Long: "List commands, lists, or hosts defined in config file. The subcommands take zero or more arguments to print specific commands or lists",
} }
listCmds = &cobra.Command{ listCmds = &cobra.Command{
Use: "cmds [cmd1 cmd2 cmd3...]", Use: "cmds [cmd1 cmd2 cmd3...]",
Short: "List commands defined in config file.", Short: "Prints commands defined in config file.",
Long: "List commands defined in config file", Long: "Prints commands defined in config file. Pass no arguments to print all commands",
Run: ListCommands, Run: ListCommands,
} }
listCmdLists = &cobra.Command{ listCmdLists = &cobra.Command{
Use: "lists [list1 list2 ...]", Use: "lists [list1 list2 ...]",
Short: "List lists defined in config file.", Short: "Prints lists defined in config file.",
Long: "List lists defined in config file", Long: "Prints lists defined in config file. Pass no arguments to print all lists",
Run: ListCommandLists, Run: ListCommandLists,
} }
) )
var listsToList []string
var cmdsToList []string
func init() { func init() {
listCmd.AddCommand(listCmds, listCmdLists) listCmd.AddCommand(listCmds, listCmdLists)
parseS3Config()
} }
@@ -46,13 +46,6 @@ func ListCommands(cmd *cobra.Command, args []string) {
// - cmds // - cmds
// - lists // - lists
// - if none, list all commands // - if none, list all commands
if len(args) > 0 {
cmdsToList = args
} else {
logging.ExitWithMSG("Error: list cmds subcommand needs commands to list", 1, nil)
}
parseS3Config()
opts := backy.NewConfigOptions(configFile, opts := backy.NewConfigOptions(configFile,
backy.SetLogFile(logFile), backy.SetLogFile(logFile),
@@ -61,21 +54,28 @@ func ListCommands(cmd *cobra.Command, args []string) {
opts.InitConfig() opts.InitConfig()
opts.ParseConfigurationFile() opts.ParseConfigurationFile()
for _, v := range cmdsToList { if len(args) > 0 {
opts.ListCommand(v) for _, v := range args {
opts.ListCommand(v)
}
os.Exit(0)
}
if len(opts.Cmds) == 0 {
fmt.Println("No commands defined in config file")
os.Exit(1)
}
for c := range opts.Cmds {
println()
println()
println("---------------------------------------------------------------------------------")
opts.ListCommand(c)
} }
} }
func ListCommandLists(cmd *cobra.Command, args []string) { func ListCommandLists(cmd *cobra.Command, args []string) {
parseS3Config()
if len(args) > 0 {
listsToList = args
} else {
logging.ExitWithMSG("Error: lists subcommand needs lists", 1, nil)
}
opts := backy.NewConfigOptions(configFile, opts := backy.NewConfigOptions(configFile,
backy.SetLogFile(logFile), backy.SetLogFile(logFile),
backy.SetHostsConfigFile(hostsConfigFile)) backy.SetHostsConfigFile(hostsConfigFile))
@@ -83,8 +83,22 @@ func ListCommandLists(cmd *cobra.Command, args []string) {
opts.InitConfig() opts.InitConfig()
opts.ParseConfigurationFile() opts.ParseConfigurationFile()
for _, v := range listsToList { if len(args) > 0 {
opts.ListCommandList(v) for _, v := range args {
opts.ListCommandList(v)
}
os.Exit(0)
}
if len(opts.CmdConfigLists) == 0 {
fmt.Println("No command lists defined in config file")
os.Exit(1)
}
for c := range opts.CmdConfigLists {
println()
println()
println("---------------------------------------------------------------------------------")
opts.ListCommandList(c)
} }
} }
Regular → Executable
+2 -2
View File
@@ -36,13 +36,13 @@ func Execute() {
} }
func init() { func init() {
rootCmd.PersistentFlags().StringVar(&logFile, "log-file", "", "log file to write to") rootCmd.PersistentFlags().StringVar(&logFile, "logFile", "", "log file to write to")
rootCmd.PersistentFlags().BoolVar(&cmdStdOut, "cmdStdOut", false, "Pass to print command output to stdout") rootCmd.PersistentFlags().BoolVar(&cmdStdOut, "cmdStdOut", false, "Pass to print command output to stdout")
rootCmd.PersistentFlags().StringVarP(&configFile, "config", "f", "", "config file to read from") rootCmd.PersistentFlags().StringVarP(&configFile, "config", "f", "", "config file to read from")
rootCmd.PersistentFlags().StringVar(&hostsConfigFile, "hostsConfig", "", "yaml hosts file to read from") rootCmd.PersistentFlags().StringVar(&hostsConfigFile, "hostsConfig", "", "yaml hosts file to read from")
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Sets verbose level") rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Sets verbose level")
rootCmd.PersistentFlags().StringVar(&s3Endpoint, "s3-endpoint", "", "Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.") rootCmd.PersistentFlags().StringVar(&s3Endpoint, "s3Endpoint", "", "Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.")
rootCmd.AddCommand(backupCmd, execCmd, cronCmd, versionCmd, listCmd) rootCmd.AddCommand(backupCmd, execCmd, cronCmd, versionCmd, listCmd)
} }
+20
View File
@@ -0,0 +1,20 @@
package cmd
import "testing"
// validate checks commands passed in from the command line
/*
*args:
* -t - type of cmd
* -c
*/
func TestUserCmd(t *testing.T) {
/*
*/
}
Regular → Executable
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
const versionStr = "0.10.2" const versionStr = "0.13.1"
var ( var (
versionCmd = &cobra.Command{ versionCmd = &cobra.Command{
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
+1
View File
@@ -13,6 +13,7 @@ module:
imports: imports:
- path: github.com/divinerites/plausible-hugo - path: github.com/divinerites/plausible-hugo
- path: github.com/McShelby/hugo-theme-relearn - path: github.com/McShelby/hugo-theme-relearn
version: "v8.2.0"
params: params:
themeVariant: themeVariant:
- auto: [] - auto: []
Regular → Executable
View File
+34 -24
View File
@@ -26,8 +26,9 @@ Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
-h, --help help for backy -h, --help help for backy
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
Use "backy [command] --help" for more information about a command. Use "backy [command] --help" for more information about a command.
@@ -51,8 +52,9 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
@@ -70,8 +72,9 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
@@ -85,7 +88,8 @@ Usage:
backy exec [command] backy exec [command]
Available Commands: Available Commands:
host Runs command defined in config file on the hosts in order specified. host Specify command(s) defined in config file on the host in order specified.
hosts Runs command defined in config file on the hosts in order specified.
Flags: Flags:
-h, --help help for exec -h, --help help for exec
@@ -93,8 +97,9 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
Use "backy exec [command] --help" for more information about a command. Use "backy exec [command] --help" for more information about a command.
@@ -117,8 +122,9 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
@@ -138,22 +144,23 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
## list ## list
``` ```
List commands, lists, or hosts defined in config file List commands, lists, or hosts defined in config file. The subcommands take zero or more arguments to print specific commands or lists
Usage: Usage:
backy list [command] backy list [command]
Available Commands: Available Commands:
cmds List commands defined in config file. cmds Prints commands defined in config file.
lists List lists defined in config file. lists Prints lists defined in config file.
Flags: Flags:
-h, --help help for list -h, --help help for list
@@ -161,8 +168,9 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
Use "backy list [command] --help" for more information about a command. Use "backy list [command] --help" for more information about a command.
@@ -170,7 +178,7 @@ Use "backy list [command] --help" for more information about a command.
## list cmds ## list cmds
``` ```
List commands defined in config file Prints commands defined in config file. Pass no arguments to print all commands
Usage: Usage:
backy list cmds [cmd1 cmd2 cmd3...] [flags] backy list cmds [cmd1 cmd2 cmd3...] [flags]
@@ -181,14 +189,15 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
## list lists ## list lists
``` ```
List lists defined in config file Prints lists defined in config file. Pass no arguments to print all lists
Usage: Usage:
backy list lists [list1 list2 ...] [flags] backy list lists [list1 list2 ...] [flags]
@@ -199,7 +208,8 @@ Flags:
Global Flags: Global Flags:
--cmdStdOut Pass to print command output to stdout --cmdStdOut Pass to print command output to stdout
-f, --config string config file to read from -f, --config string config file to read from
--log-file string log file to write to --hostsConfig string yaml hosts file to read from
--s3-endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable. --logFile string log file to write to
--s3Endpoint string Sets the S3 endpoint used for config file fetching. Overrides S3_ENDPOINT env variable.
-v, --verbose Sets verbose level -v, --verbose Sets verbose level
``` ```
Regular → Executable
+13 -4
View File
@@ -2,14 +2,23 @@
title: Exec title: Exec
--- ---
The `exec` subcommand can do some things that the configuration file can't do yet. The command `exec host` can execute commands on many hosts. ~~The `exec` subcommand can do some things that the configuration file can't do yet. The command `exec host` can execute commands on many hosts.~~
{{% notice info %}}
For now only the `exec host` sub-command is implemented. More to come.
{{% /notice %}}
{{% notice warning %}}
The config file's `hosts` are overridden by this command. Hooks are not altered. For consistent results, create a local config file with only the hosts you want to use.
{{% /notice %}}
`exec host` takes the following arguments: `exec host` takes the following arguments:
```sh ```sh
-c, --commands strings Accepts space-separated names of commands. -c, --command stringArray Accepts space-separated names of commands. Specify multiple times for multiple commands.
-h, --help help for host -h, --help help for host
-m, --hosts strings Accepts space-separated names of hosts. -m, --hosts stringArray Accepts space-separated names of hosts. Specify multiple times for multiple hosts.
``` ```
The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file. The commands have to be defined in the config file. The hosts need to at least be in the ssh_config(5) file.
Regular → Executable
+3 -3
View File
@@ -3,7 +3,7 @@ title: List
--- ---
List commands, lists, or hosts defined in config file List commands, lists, or hosts defined in config file. The subcommands take zero or more arguments to print specific commands or lists
Usage: Usage:
``` ```
@@ -11,8 +11,8 @@ Usage:
``` ```
Available Commands: Available Commands:
cmds List commands defined in config file. cmds Prints commands defined in config file.
lists List lists defined in config file. lists Prints lists defined in config file.
Flags: Flags:
``` ```
Regular → Executable
View File
View File
+38 -2
View File
@@ -19,7 +19,8 @@ Values available for this section **(case-sensitive)**:
| `environment` | Defines environment variables for the command | `[]string` | no | Partial | | `environment` | Defines environment variables for the command | `[]string` | no | Partial |
| `type` | See documentation further down the page. Additional fields may be required. | `string` | no | No | | `type` | See documentation further down the page. Additional fields may be required. | `string` | no | No |
| `getOutput` | Command(s) output is in the notification(s) | `bool` | no | No | | `getOutput` | Command(s) output is in the notification(s) | `bool` | no | No |
| `host` | If not specified, the command will execute locally. | `string` | no | No | | `host` | Depricated: use `hosts`. If not specified, the command will execute locally. | `string` | no | No |
| `hosts` | Must be specified to run commands both locallly and in parrallel. | `[]string` | no | No |
| `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no | No | | `scriptEnvFile` | When type is `scriptFile` or `script`, this file is prepended to the input. | `string` | no | No |
| `shell` | Run the command in the shell | `string` | no | No | | `shell` | Run the command in the shell | `string` | no | No |
| `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no | No | | `hooks` | Hooks are used at the end of the individual command. Must have at least `error`, `success`, or `final`. | `map[string][]string` | no | No |
@@ -51,7 +52,12 @@ Get command output when a notification is sent.
Is not required. Can be `true` or `false`. Is not required. Can be `true` or `false`.
#### host ### host
{{% notice warning %}}
Depricated: use `hosts` instead.
{{% /notice %}}
{{% notice info %}} {{% notice info %}}
If any `host` is not defined or left blank, the command will run on the local machine. If any `host` is not defined or left blank, the command will run on the local machine.
@@ -66,6 +72,36 @@ For example, say that I have a host defined in my SSH config with the `Host` def
If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files. If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files.
{{% /notice %}} {{% /notice %}}
### hosts
{{% notice info %}}
If any `command.[name].hosts` index is `localhost` or `127.0.0.1`, the command will run on the local machine.
You can also remove the field to have the command run locally.
{{% /notice %}}
Host may or may not be defined in the `hosts` section.
{{% notice info %}}
If any `host` from the commands section does not match any object in the `hosts` section, the `Host` is assumed to be this value. This value will be used to search in the default SSH config files.
For example, say that I have a host defined in my SSH config with the `Host` defined as `web-prod`.
If I assign a value to host as `host: web-prod` and don't specify this value in the `hosts` object, web-prod will be used as the `Host` in searching the SSH config files.
{{% /notice %}}
###### Example:
```yaml
command:
start-some-process:
cmd: start-server
hosts:
- prod-1
- prod-2
```
### shell ### shell
If shell is defined, the command will run in the specified shell. If shell is defined, the command will run in the specified shell.
+4 -2
View File
@@ -8,7 +8,7 @@ This is dedicated to `package` commands. The command `type` field must be `packa
| name | notes | type | required | | name | notes | type | required |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| `packageName` | The name of a package to be modified. | `string` | yes | | `packageName` | The name of a package to be modified. | `[]packagemanagercommon.Package` | yes |
| `packageManager` | The name of the package manger to be used. | `string` | yes | | `packageManager` | The name of the package manger to be used. | `string` | yes |
| `packageOperation` | The type of operation to perform. | `string` | yes | | `packageOperation` | The type of operation to perform. | `string` | yes |
| `packageVersion` | The version of a package. | `string` | no | | `packageVersion` | The version of a package. | `string` | no |
@@ -22,7 +22,9 @@ The following is an example of a package command:
update-docker: update-docker:
type: package type: package
shell: zsh shell: zsh
packageName: docker-ce packages:
- name: docker-ce
version: 10
packageManager: apt packageManager: apt
packageOperation: install packageOperation: install
host: debian-based-host host: debian-based-host
View File
+1 -1
View File
@@ -12,4 +12,4 @@ External directives are for including data that should not be in the config file
See the docs of each command if the field is supported. See the docs of each command if the field is supported.
If the file path does not begin with a `/`, the config file's directory will be used as the starting point. If the file path does not begin with the root directory marker, usually `/`, the config file's directory will be used as the starting point.
+49
View File
@@ -0,0 +1,49 @@
---
title: "Configuring Cron"
weight: 3
description: >
Use Cron to run lists at a specified time.
---
Backy provides an easy-to-use way to execute commands at a specified time.
Adding `cron: 0 0 1 * * *` to a `cmdLists` object will schedule the list at 1 in the morning. See [https://crontab.guru/](https://crontab.guru/) for reference.
GoCron allows one to configure a server to view the jobs in the scheduler. See [GoCron UI GitHub](https://github.com/go-co-op/gocron-ui).
GoCron can be configured or left alone for defaults.
GoCron configuration:
| key | description | type | required | default
| --- | --- | --- | --- | ---
| `bindAddress` | Interface's IP to bind to. Must not contain port. | `string` | no | `:port`
| `port` | Port to use. | `int` | no | `8888`
| `useSeconds` | Whether to parse the second cron field. | `bool` | no | `false`
```yaml {lineNos="true" wrap="true" title="yaml"}
goCron:
bindAddress: "0.0.0.0"
port: 8888
useSeconds: true
cmdLists:
  docker-container-backup: # this can be any name you want
    # all commands have to be defined
    order:
      - stop-docker-container
      - backup-docker-container-script
      - shell-cmd
      - hostname
      - start-docker-container
    notifications:
      - matrix.id
    name: backup-some-container
    cron: "0 0 1 * * *"
  hostname:
    name: hostname
    order:
      - hostname
    notifications:
    - mail.prod-email
```
Regular → Executable
View File
View File
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More