grim/convey

Port from logrus to log/slog
default tip
4 months ago, Elliott Sales de Andrade
c588f9b3f559
Port from logrus to log/slog

This doesn't really take much advantage of structured logging beyond what is already done (`id` and `idColor`), and consequently the log handler does not try to do any handling of anything more than that (i.e., grouping, or arbitrary attributes beyond those defined).

One should maybe have a `Context` available to pass in, but there isn't one, and anyway, the log handler doesn't use it, so I've passed in a `TODO` instead.

Everything else is just normal import/rename changes.

Testing Done:
Ran `go run . run`

Reviewed at https://reviews.imfreedom.org/r/2871/
0.15.0:
* The command line now requires a `run` command before a plan name even if
you're running the default plan. For example `convey run` for the default
plan, or `convey run plan1` to run plan1.
* Replaced Docker support with podman. This simplifies many many things, but
you do now need podman to run convey >= 0.15.0.
* All docker tasks have been marked as deprecated but will map themselves
into their podman replacement tasks, expect for docker/environment whose
behavior has been removed.
* The workspace has been changed from a container to a directory on the host.
This should solve a lot of issues that `docker cp` created, but this
directory is now created next to the convey.yml file that's being run so
disk space issues could arise.
* A new script/shell task has been added to run existing as well as adhoc
scripts on the host.
* Added and environment property to metaplans. Fixed CONVEY-185.
0.14.0: abandoned
* This version grew out of control and was past the point of saving. We
decided to throw the entire thing out and move on to 0.15.0 instead of
trying to save this ill conceived version.
0.13.1: 20180114
* Write warning, error, and fatal log messages to stderr. Fixed #156
* Added an example for multi stage image builds. Fixed #155
* Fixed an issue where you couldn't set workdir for a docker/run task to
${CONVEY_WORKSPACE}. Fixed #135
* Fixed an issue where expired timeouts would cause the workspace and network
to not be removed. Fixed #137
0.13.0: 20180114
* Fixed an issue in docker.ParseImage where something like convey/workspace
would incorrectly determine the registry to be convey and the image to be
workspace. Fixed #157
* Changed the way subcommands are run. Fixed #153
* Added `run` sub-command.
* Deprecated `--graphviz`, use `graphviz` instead.
* Deprecated `--list-environment`, use `list environment` instead.
* Deprecated `--list-plans`, use `list plans` instead.
* Deprecated `--list-meta-plans`, use `list metaplans` instead.
* Deprecated `--list-tasks`, use `list tasks` instead.
* Deprecated `--show-config`, use `config` instead.
* Renamed `--allow-deprecated` to `--disable-deprecated`.
0.12.0: 20180107
* Deprecated engine attribute, and changed type attribute to be {engine}/{type}. Warnings will be output if legacy formats are detected. Fixed # 143
* Unknown command line arguments are now fatal. Fixed #149
* convey/clean can now take a single string for it's files attribute. Fixed #148
* Fix running configs that extend other configs outside of the working directory. Fixed #150
0.11.2: 20171227
* Changed TaskTimeout to PlanTimeout. Fixed # 134
* Added --list-environment to show the config and builtin environment variables. Fixed #132
* Added a user option to the Docker run task. PR #38 (Eric Fritz)
* Added a target option to the Docker build task. To specify which stage to use in a multi stage Dockerfile.
* Correctly honor the build context.
* Fail a plan if it has no stages. Fixed #129
0.11.1: 20171021
* Fix a regression in the environment mapper that could mess up script attributes. PR #37 (Eric Fritz)
0.11.0: 20171015
* Added a quiet option to Remove tasks. Fixed #131. PR #31 (Eric Fritz)
* Added an environment task for updating environment variables. Fixed #128. PR #32 (Eric Fritz)
* Don't pass empty environment variables to Runs tasks. PR #35 (Eric Fritz)
* Fix an infinite loop in variable expansion. Fixed #130. PR #33 (Eric Fritz)
* Fix scripts being left around if convey receives SIGINT. Fixed #102. PR #34 (Eric Fritz)
0.10.4: 20171009
* Fix an issue that made scripts non-deterministic. PR #30 (Eric Fritz)
0.10.3: 20171004
* Added support for setting a hostname for run tasks. This makes it possible
to connect to detached containers. PR #29 (Eric Fritz)
0.10.2: 20171003
* Added support for expanding variable into lists, use for tags. PR #26 (Eric Fritz)
* Added support for merging plans when extending. PR #27 (Eric Fritz)
* Fix Push/Pop Extend Frame breakage under concurrent execution. Fixed #126 (Eric Fritz)
* Fritz fixed a goof. Fixed #125. (Eric Fritz)
0.10.1: 20170926
* Add support for multiple tags to the build task. (Eric Fritz)
0.10.0: 20170925
* Added new task type "extend". (Eric Fritz) (Fixed #124)
* Added the ability to expand variables into lists. (Eric Fritz)
* Updated all of the golang Docker images to 1.9.
0.9.1: 20170921
* Added environment mapping support to the login and logout tasks.
0.9.0: 20170917
* Updated the import and export tasks to allow a string for the files field
to specify a single item.
* Grammatical updates to README.md (Anatzum)
* Added a stage.Run attribute to replace stage.Always. (fixed #107)
* Properly handle errors in bitbucket-pipelines.yml. (fixed #119)
* Added support for detachable containers with health checks. (fixed #21)
* Updated workspace and network creation to honor the Docker config options if present. (fixed #120)
* Added support for extending Convey config files. (Eric Fritz) (fixed #122)
0.8.0: 20170725
* Allow labels for the Docker run and build tasks to use environment
variables. (fixed #112)
* Use a custom network for each plan invocation. (fixed #113)
* Add support for using custom docker config directories. (fixed #87)
* Add support for detailed images when loading bitbucket-pipelines configs.
(fixed #114)
0.7.0: 20170619
* Added support for passing arguments to the Docker build task (--build-arg).
(fixed #106)
* Fixed a bug with git/hg variable normalization (fixed #110) (Eric Fritz)
0.6.0: 20170515
* Added GIT_BRANCH_NORMALIZED and HG_BRANCH_NORMALIZED variables into the
default environment. (fixed #98)
* Added support for labels to the Docker build and run tasks. (fixed #97)
* Added support for ssh-identities in the config file. (fixed #88)
* Add an example showing a traditional CI build. (fixed #90)
* Moved default-plan from the top level of convey.yml to an options section.
(fixed #100)
* Added support for Docker commands with the Bitbucket Pipelines support. (fixed #92)
* Made meta-plan edge's dashed and bolded to make them more obvious. (fixed #85)
* Fixed the script option for the run command on docker4mac and docker4win.
(fixed #91)
* Fixed a bug where always edges weren't being rendered in the graphviz
output. (fixed #86)
* Fixed always stages to have edges from all previous stages. (fixed #89)
0.5.0: 20170428
* Added support for disabling stages (fixes #33)
* Added support for aliasing the default plan (fixes #56)
* Added support for metaplans (fixes #82)
* Added support for making sure there are SSH identities available when using
--ssh-agent. (Fixes #84)
* Added support for convey.yml and convey.yaml. (Fixes #81)
* Updated the graphviz colors by removing the yellow colors and added a
bunch more colors. (Fixes #77)
* Fixed the graphviz output so that plans with graphviz reserved words no
longer cause issues. (Fixes #76)
* Fixed the build task to keep files relative to the dockerfile. (Fixes #80)
0.4.0: 20170406
* Added convey/go-vet image
* Added support for bitbucket-pipelines (-l bitbucket) (fixes #36)
* Added a --list-plans (-P) option to output the plans and their stages
(fixes #75)
* Fixed an issue where the convey/go-build images would fail on go get if
the package didn't have an sources files in it's root.
* Fixed all go gets to ignore vendor directories (fixes #73)
* Fixed subshell's in script commands (fixes #51, #74)
0.3.2: 20170330
* Fixed the remove task (fixed #69) (Eric Fritz)
* Added support for multiple images to pull, push, and remove tasks
(fixes #70) (Eric Fritz)
* Added support for multiple destinations in the tag task (fixes #71)
(Eric Fritz)
0.3.1: 20170330
* Reset the HOME environment variable after we've ran git and hg.
0.3.0: 20170330
* Added a build for Rust on Linux (/images/rust-build-linux) (Erik Davidson)
* Added a build for template files (closed #58) (/images/template) (Erik Davidson)
* Added a clean task (closed #57, #63, #64) (Eric Fritz)
* Added support for exporting globs (closed #1) (Eric Fritz)
* Added support for file destinations in build tasks (closes #64) (Eric Fritz)
* Ignore vendor directories in the go-test build image (Erik Davidson)
* Fixed full environment for all tasks (fixed #60) (Eric Fritz)
* Fixed logic in the environment mapper (fixed #59) (Eric Fritz)
* Export now uses . as host path name if not supplied (fixed #61) (Eric Fritz)
0.2.0: 20170323
* Added script and shell attributes to the run command
* Added cli options --cpu-shares and --memory to limit cpu and memory usage
in run tasks.
* Added support for concurrent stages in the --graphviz output
* Added support for always stages in the --graphviz output
* Added support for environment expanding the workdir and workspace
attributes of the run task.
* Fixed a bug in the git and mercurial environment variables where output
from stderr would be in them if the git/mercurial repositories could not be
found.
* Fixed convey/go-build:alpine image on docker hub.
* Fixed sending multiple -e's for the same environment variable to docker
run.
* Fixed -e to convey which was broken.
* Cleaned up the error message when the config can't be read.
* Cleaned up some log messages.
0.1.1: 20170319
* Added a time out for all tasks (defaults to 15 minutes)
* Added support for ssh-agent. Pass --ssh-agent to convey to expose it to
your run tasks.
* Added support for environment variables in convey.yml including auto
assigned GIT_COMMIT, GIT_COMMIT_SHORT, GIT_BRANCH, HG_COMMIT,
HG_COMMIT_SHORT, and HG_BRANCH.
* Added an alpine binary
* Moved all binaries to dynamic instead of static.
* Fixed the bug where convey would exit if no convey.yml was found (Keith Petkus)
* Various typos found and fix (Keith Petkus)
0.1.0: 20170311
* Initial release