Releases: iver-wharf/wharf-cmd
v0.9.1 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.9.1
Changes (since v0.9.0)
- Fixed CVE-2022-1586 (High) and CVE-2022-1587 (High). (#198)
v0.9.0 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.9.0
Changes (since v0.8.3)
- Added
run-if
field to stages in the.wharf-ci.yml
file. Allows one of
the values:success
,fail
,always
. (#195)
v0.8.3 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.3
Changes (since v0.8.2)
- Fixed installing via
go install github.com/iver-wharf/wharf-cmd/cmd/wharf@latest
not working. (#192)
v0.8.2 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.2
Changes (since v0.8.1)
- Fixed build status always being set to Failed. (#189)
v0.8.1 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.1
Changes (since v0.8.0)
- Removed
replace
directive fromgo.mod
, makinggo install ...
fail. (#185)
v0.8.0 wharf-cmd
First GitHub release 🎉
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.0
Changes (since v0.7.0)
-
Added provisioner commands: (#46, #59, #117, #121, #129)
-
wharf provisioner serve
that launches an HTTP REST api server with endpoints:-
GET /
to ping. -
GET /api/swagger/index.html
Swagger generated documentation. -
POST /api/worker
creates a new worker with certain labels. -
GET /api/worker
gets a list of all workers with certain labels. -
DELETE /api/worker/:workerId
deletes a worker, as long as it has certain labels.
-
-
wharf provisioner create
that creates a new worker. -
wharf provisioner list
that lists all running workers with certain labels. -
wharf provisioner delete
with flag--id
to specify the worker that should be deleted, as long as it has certain labels as well.
-
-
Added Git credentials support to
wharf provisioner
when running in Kubernetes via a Kubernetes secret namedwharf-cmd-worker-git-ssh
. See docs/provisioner-git-ssh-secret.md for more info. (#120) -
Added watchdog commands: (#62, #129, #137)
wharf watchdog serve
checks stray builds from the wharf-api and wharf-cmd-workers from the wharf-cmd-provisioner and kills them in an effort to clean up forgotten builds/workers.
-
Added aggregator command
wharf aggregator serve
that looks for wharf-cmd-worker pods and pipes build results over to the wharf-api. (#77, #126, #129, #131, #163) -
Added new implementation for
wharf run
. (#33, #45, #66, #84, #107) -
Added "vars" command
wharf vars
with:-
wharf vars list
that prints out all the variables that would be used in awharf run
invocation. (#93, #98, #102, #108, #110) -
wharf vars sub
that reads from STDIN or a file and performs variable substitution, and then writes to STDOUT. (#110, #131) -
wharf vars yml
that prints the parsed.wharf-ci.yml
file to STDOUT, with all variables substituted. (#179)
-
-
Added support for
.gitignore
ignored files and directories when transferring repo inwharf run
. Can be disabled via new--no-gitignore
flag. (#85) -
Added input variables support using the
inputs
field in.wharf-ci.yml
files, and the--input, -i
flag towharf run
andwharf vars
commands through the CLI, ex: (#97, #111)wharf run --input myInputVar=myValue # => [ "myInputVar": "myValue" ] # Supports multiple: wharf run --input var1=value1 --input var2=value2 # => [ "var1": "value1", "var2": "value2" ] # On collisions, the last value is used: wharf run --input myVar=foo --input myVar=bar # => [ "myVar": "bar" ]
-
Added
--dry-run
flag towharf run
command. The flag supports 3 different values: (#170)--dry-run none
: Disables dry-run. The build will be performed as usual--dry-run client
: Only logs what would be run, without contacting Kubernetes--dry-run server
: Submits server-side dry-run requests to Kubernetes
-
Added new implementation for
.wharf-ci.yml
file parsing that now supports returning multiple errors for the whole parsing as well as keep track of the line & column of each parse error. (#48, #58, #147, #153, #171) -
Added support for a new file type:
.wharf-vars.yml
. It is used to define built-in variables, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#73)./.wharf-vars.yml
(in same directory as.wharf-ci.yml
)./../.wharf-vars.yml
(in parent directory of.wharf-ci.yml
)./../../.wharf-vars.yml
(etc; it continues recursively)- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-vars.yml
- (Linux only)
/etc/iver-wharf/wharf-cmd/wharf-vars.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-vars.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-vars.yml
Note the leading dot in the directory tree files (
.wharf-vars.yml
), while the files from config folders is without the dot (wharf-vars.yml
).The file content should be structured as:
# .wharf-vars.yml vars: CHART_REPO: http://harbor.example.com
-
Added ability to configure values, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#116, #133, #134, #150, #156, #159)
- Environment variables, prefixed with
WHARF_
- File from environment variable:
WHARF_CONFIG
- File:
./wharf-cmd-config.yml
- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-cmd-config.yml
- File:
/etc/iver-wharf/wharf-cmd/wharf-cmd-config.yml
Read more here.
- Environment variables, prefixed with
-
Added support for using OS environment variables prefixed with
WHARF_VAR_
in variable substitution, whereWHARF_VAR_REG_URL
would set theREG_URL
Wharf variable. (#96) -
Added variable substitution support for referenced files in
kubectl
andhelm
step types. (#89) -
Added file transfer cache, stored in
/tmp/wharf-cmd-repo-xxxxx/full.tar
, that is reused by all steps in a single build. New package inpkg/tarstore
(#89) -
Added build result (logs, status updates) caching via file system. New package in
pkg/resultstore
. (#43, #69, #70) -
Fixed
pkg/resultstore
andpkg/tarstore
not cleaning up on wharf-triggered force exits, such as on timeout waiting for pods to terminate. (#176) -
Added so build results (logs, status updates) are stored in
/tmp/wharf-cmd-build-00123-xxxxxxx
directory using a unique generated build ID, or using the build ID provided by the--build-id
flag on thewharf run
command. (#172) -
Added
PROJECT_ID
variable that can be overridden via the new flag--project-id
. Setting this is required when using secrets in thedocker
andcontainer
step types. (#180) -
Added all kubeconfig-related flags from
kubectl
but with a--k8s-*
prefix. This allows e.g Wharf to run as a service account via the--k8s-as
flag, among other things. (#63) -
Fixed
wharf run
andwharf provisioner
commands not using the namespace defined in the kubeconfig. (#63) -
Added CLI completions via Cobra. See the completion command's help text for your shell for more info: (#64)
wharf completion bash --help wharf completion fish --help wharf completion powershell --help wharf completion zsh --help
-
Added
--stage
and--environment
completions towharf run
based on the parsed.wharf-ci.yml
file. (#91) -
Added
--loglevel
completions. (#95) -
Added Git integration by executing
git
locally to obtain current branch, commit SHA, tags, etc. (#67, #78) -
Fixed
wharf run
not reading a pod's logs when it fails immediately on start. (#50) -
Fixed
wharf run
not failing due to pod config errors, such as "secret 'cluster-config' not found" inkubectl
steps. (#52) -
Changed from
github.com/sirupsen/logrus
togithub.com/iver-wharf/wharf-core/v2/pkg/logger
for logging. (#2, #7, #184) -
Added gRPC server for worker in
pkg/worker/workerserver
: (#51)StreamLogs
batches logs into chunks and serves to gRPC clients.StreamStatusEvents
serves status events to gRPC clients.StreamArtifactEvents
serves artifact events to gRPC clients.
-
Added gRPC client in
pkg/worker/workerclient
to interface with a worker gRPC server. (#51) -
Added HTTP server for worker in
pkg/worker/workerserver
: (#51, #114, #117)GET /
to ping.GET /api/swagger/index.html
Swagger generated documentation.GET /api/artifact/:artifactId/download
Downloads an artifact.
-
Added HTTP client in
pkg/worker/workerclient
to interface with worker HTTP server. (#51) -
Added
--version
,-v
flag to show the version of wharf-cmd. (#76) -
Added Git to
quay.io/iver-wharf/wharf-cmd
Docker image. (#138) -
Added dependencies:
github.com/alta/protopatch
v0.5.0 (#51)github.com/cli/safeexec
v1.0.0 (#78)github.com/denormal/go-gitignore
v0.0.0-20180930084346-ae8ad1d07817 (#85)github.com/gin-contrib/cors
v1.3.1 (#51)github.com/gin-gonic/gin
v1.7.1 (#46)github.com/golang/protobuf
v1.5.2 (#51)github.com/iver-wharf/wharf-core/v2
v2.0.0 (#2, #7, #184)github.com/rogpeppe/go-internal
v1.8.1 (#172)github.com/soheilhy/cmux
v0.1.4 (#51)github.com/spf13/pflag
v1.0.5 (#63)github.com/swaggo/gin-swagger
v1.4.1 (#59)github.com/swaggo/swag
v1.8.0 (#59)google.golang.org/grpc
v1.45.0 (#51, #116)google.golang.org/protobuf
v1.28.0 (#51, #116)gopkg.in/guregu/null.v4
v4.0.0 (#62)gopkg.in/typ.v4
v4.0.0 (#75, #89, #127)gopkg.in/yaml.v3
v3.0.0 (#48)
-
Removed dependencies:
-
Removed commands
init
,setup
, andserve
. (#8) -
Changed versions of numerous dependencies:
github.com/gin-gonic/gin
from v1.7.1 to v1.7.7 (#59)github.com/iver-wharf/wharf-api-client-go
from v1.2.0 to v2.2.1 (#62, #157)github.com/spf13/cobra
v1.1.3 to v1.3.0 (#64)github.com/stretchr/testify
v1.7.0 to v1.7.1 (#116)k8s.io/api
from v0.0.0 to v0.23.3 (#8)k8s.io/apimachinery
from v0.0.0 to v0.23.3 (#8)k8s.io/client-go
from v0.0.0 to v0.23.3 (#8)sigs.k8s.io/yaml
from v1.1.0 to v1.2.0 (#8)
-
Changed logging on CLI errors (ex "unknown command") to be more terse. (#34)
-
Changed to trim away everything before the last CR (carriage return) characte...
v0.8.0-rc.3 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.0-rc.3
Changes (since v0.7.0)
-
Added provisioner commands: (#46, #59, #117, #121, #129)
-
wharf provisioner serve
that launches an HTTP REST api server with endpoints:-
GET /
to ping. -
GET /api/swagger/index.html
Swagger generated documentation. -
POST /api/worker
creates a new worker with certain labels. -
GET /api/worker
gets a list of all workers with certain labels. -
DELETE /api/worker/:workerId
deletes a worker, as long as it has certain labels.
-
-
wharf provisioner create
that creates a new worker. -
wharf provisioner list
that lists all running workers with certain labels. -
wharf provisioner delete
with flag--id
to specify the worker that should be deleted, as long as it has certain labels as well.
-
-
Added Git credentials support to
wharf provisioner
when running in Kubernetes via a Kubernetes secret namedwharf-cmd-worker-git-ssh
. See docs/provisioner-git-ssh-secret.md for more info. (#120) -
Added watchdog commands: (#62, #129, #137)
wharf watchdog serve
checks stray builds from the wharf-api and wharf-cmd-workers from the wharf-cmd-provisioner and kills them in an effort to clean up forgotten builds/workers.
-
Added aggregator command
wharf aggregator serve
that looks for wharf-cmd-worker pods and pipes build results over to the wharf-api. (#77, #126, #129, #131) -
Added new implementation for
wharf run
. (#33, #45, #66, #84, #107) -
Added "vars" command
wharf vars
with: -
Added support for
.gitignore
ignored files and directories when transferring repo inwharf run
. Can be disabled via new--no-gitignore
flag. (#85) -
Added input variables support using the
inputs
field in.wharf-ci.yml
files, and the--input, -i
flag towharf run
andwharf vars
commands through the CLI, ex: (#97, #111)wharf run --input myInputVar=myValue # => [ "myInputVar": "myValue" ] # Supports multiple: wharf run --input var1=value1 --input var2=value2 # => [ "var1": "value1", "var2": "value2" ] # On collisions, the last value is used: wharf run --input myVar=foo --input myVar=bar # => [ "myVar": "bar" ]
-
Added new implementation for
.wharf-ci.yml
file parsing that now supports returning multiple errors for the whole parsing as well as keep track of the line & column of each parse error. (#48, #58, #147, #153) -
Added support for a new file type:
.wharf-vars.yml
. It is used to define built-in variables, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#73)./.wharf-vars.yml
(in same directory as.wharf-ci.yml
)./../.wharf-vars.yml
(in parent directory of.wharf-ci.yml
)./../../.wharf-vars.yml
(etc; it continues recursively)- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-vars.yml
- (Linux only)
/etc/iver-wharf/wharf-cmd/wharf-vars.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-vars.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-vars.yml
Note the leading dot in the directory tree files (
.wharf-vars.yml
), while the files from config folders is without the dot (wharf-vars.yml
).The file content should be structured as:
# .wharf-vars.yml vars: CHART_REPO: http://harbor.example.com
-
Added ability to configure values, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#116, #133, #134, #150, #156)
- Environment variables, prefixed with
WHARF_
- File from environment variable:
WHARF_CONFIG
- File:
./wharf-cmd-config.yml
- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-cmd-config.yml
- File:
/etc/iver-wharf/wharf-cmd/wharf-cmd-config.yml
Read more here.
- Environment variables, prefixed with
-
Added support for using OS environment variables prefixed with
WHARF_VAR_
in variable substitution, whereWHARF_VAR_REG_URL
would set theREG_URL
Wharf variable. (#96) -
Added variable substitution support for referenced files in
kubectl
andhelm
step types. (#89) -
Added file transfer cache, stored in
/tmp/wharf-cmd-repo-xxxxx/full.tar
, that is reused by all steps in a single build. (#89) -
Added build result (logs, status updates) caching via file system. New package in
pkg/resultstore
. (#43, #69, #70) -
Added all kubeconfig-related flags from
kubectl
but with a--k8s-*
prefix. This allows e.g Wharf to run as a service account via the--k8s-as
flag, among other things. (#63) -
Fixed
wharf run
andwharf provisioner
commands not using the namespace defined in the kubeconfig. (#63) -
Added CLI completions via Cobra. See the completion command's help text for your shell for more info: (#64)
wharf completion bash --help wharf completion fish --help wharf completion powershell --help wharf completion zsh --help
-
Added
--stage
and--environment
completions towharf run
based on the parsed.wharf-ci.yml
file. (#91) -
Added
--loglevel
completions. (#95) -
Added Git integration by executing
git
locally to obtain current branch, commit SHA, tags, etc. (#67, #78) -
Fixed
wharf run
not reading a pod's logs when it fails immediately on start. (#50) -
Fixed
wharf run
not failing due to pod config errors, such as "secret 'cluster-config' not found" inkubectl
steps. (#52) -
Changed from
github.com/sirupsen/logrus
togithub.com/iver-wharf/wharf-core/pkg/logger
for logging. (#2, #7) -
Added gRPC server for worker in
pkg/workerapi/workerserver
: (#51)StreamLogs
batches logs into chunks and serves to gRPC clients.StreamStatusEvents
serves status events to gRPC clients.StreamArtifactEvents
serves artifact events to gRPC clients.
-
Added gRPC client in
pkg/workerapi/workerclient
to interface with a worker gRPC server. (#51) -
Added HTTP server for worker in
pkg/workerapi/workerserver
: (#51, #114, #117)GET /
to ping.GET /api/swagger/index.html
Swagger generated documentation.GET /api/artifact/:artifactId/download
Downloads an artifact.
-
Added HTTP client in
pkg/workerapi/workerclient
to interface with worker HTTP server. (#51) -
Added
--version
,-v
flag to show the version of wharf-cmd. (#76) -
Added Git to
quay.io/iver-wharf/wharf-cmd
Docker image. (#138) -
Added dependencies:
github.com/alta/protopatch
v0.5.0 (#51)github.com/cli/safeexec
v1.0.0 (#78)github.com/denormal/go-gitignore
v0.0.0-20180930084346-ae8ad1d07817 (#85)github.com/gin-contrib/cors
v1.3.1 (#51)github.com/gin-gonic/gin
v1.7.1 (#46)github.com/golang/protobuf
v1.5.2 (#51)github.com/iver-wharf/wharf-api-client-go/v2
v2.0.0 (#62)github.com/iver-wharf/wharf-core
(#2, #7)github.com/soheilhy/cmux
v0.1.4 (#51)github.com/spf13/pflag
v1.0.5 (#63)github.com/swaggo/gin-swagger
v1.4.1 (#59)github.com/swaggo/swag
v1.8.0 (#59)google.golang.org/grpc
v1.45.0 (#51, #116)google.golang.org/protobuf
v1.28.0 (#51, #116)gopkg.in/guregu/null.v4
v4.0.0 (#62)gopkg.in/typ.v4
v4.0.0 (#75, #89, #127)gopkg.in/yaml.v3
v3.0.0 (#48)
-
Removed dependencies:
-
Removed commands
init
,setup
, andserve
. (#8) -
Changed versions of numerous dependencies:
github.com/gin-gonic/gin
from v1.7.1 to v1.7.7 (#59)github.com/spf13/cobra
v1.1.3 to v1.3.0 (#64)github.com/stretchr/testify
v1.7.0 to v1.7.1 (#116)k8s.io/api
from v0.0.0 to v0.23.3 (#8)k8s.io/apimachinery
from v0.0.0 to v0.23.3 (#8)k8s.io/client-go
from v0.0.0 to v0.23.3 (#8)sigs.k8s.io/yaml
from v1.1.0 to v1.2.0 (#8)
-
Changed logging on CLI errors (ex "unknown command") to be more terse. (#34)
-
Changed to trim away everything before the last CR (carriage return) character in a log line from a Kubernetes pod. (#49)
-
Changed so
wharf run
logs the parsed log message provided by Kubernetes, without the timestamp. (#148) -
Changed location of packages and code files: (#44, #87)
- File
pkg/core/utils/variablesreplacer.go
to its own package inpkg/varsub
- Package
pkg/core/wharfyml
topkg/wharfyml
- Command
main.go
tocmd/wharf/main.go
- File
-
Removed packages: (#44)
pkg/core/buildclient
pkg/core/containercreator
pkg/core/kubernetes
pkg/core/utils
pkg/namespace
pkg/run
-
Removed
containercreator
references frompkg/core/wharfyml
. (#44) -
Added collecting of build logs and status updates for build steps using
resultstore
. (#71) -
Added cancelling of builds via signals (once to shutdown with a grace period, twice for a forceful shutdown): (#90, #104, #136)
os.Interrupt
syscall.SIGTERM
syscall.SIGHUP
-
Fixed variable substitution not recognizing kebab-cased variables. Now all variable naming formats are supporte...
v0.8.0-rc.2 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.0-rc.2
Changes (since v0.7.0)
-
Added provisioner commands: (#46, #59, #117, #121, #129)
-
wharf provisioner serve
that launches an HTTP REST api server with endpoints:-
GET /
to ping. -
GET /api/swagger/index.html
Swagger generated documentation. -
POST /api/worker
creates a new worker with certain labels. -
GET /api/worker
gets a list of all workers with certain labels. -
DELETE /api/worker/:workerId
deletes a worker, as long as it has certain labels.
-
-
wharf provisioner create
that creates a new worker. -
wharf provisioner list
that lists all running workers with certain labels. -
wharf provisioner delete
with flag--id
to specify the worker that should be deleted, as long as it has certain labels as well.
-
-
Added Git credentials support to
wharf provisioner
when running in Kubernetes via a Kubernetes secret namedwharf-cmd-worker-git-ssh
. See docs/provisioner-git-ssh-secret.md for more info. (#120) -
Added watchdog commands: (#62, #129)
wharf watchdog serve
checks stray builds from the wharf-api and wharf-cmd-workers from the wharf-cmd-provisioner and kills them in an effort to clean up forgotten builds/workers.
-
Added aggregator command
wharf aggregator serve
that looks for wharf-cmd-worker pods and pipes build results over to the wharf-api. (#77, #126, #129, #131) -
Added new implementation for
wharf run
. (#33, #45, #66, #84, #107) -
Added "vars" command
wharf vars
with: -
Added support for
.gitignore
ignored files and directories when transferring repo inwharf run
. Can be disabled via new--no-gitignore
flag. (#85) -
Added input variables support using the
inputs
field in.wharf-ci.yml
files, and the--input, -i
flag towharf run
andwharf vars
commands through the CLI, ex: (#97, #111)wharf run --input myInputVar=myValue # => [ "myInputVar": "myValue" ] # Supports multiple: wharf run --input var1=value1 --input var2=value2 # => [ "var1": "value1", "var2": "value2" ] # On collisions, the last value is used: wharf run --input myVar=foo --input myVar=bar # => [ "myVar": "bar" ]
-
Added new implementation for
.wharf-ci.yml
file parsing that now supports returning multiple errors for the whole parsing as well as keep track of the line & column of each parse error. (#48, #58) -
Added support for a new file type:
.wharf-vars.yml
. It is used to define built-in variables, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#73)./.wharf-vars.yml
(in same directory as.wharf-ci.yml
)./../.wharf-vars.yml
(in parent directory of.wharf-ci.yml
)./../../.wharf-vars.yml
(etc; it continues recursively)- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-vars.yml
- (Linux only)
/etc/iver-wharf/wharf-cmd/wharf-vars.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-vars.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-vars.yml
Note the leading dot in the directory tree files (
.wharf-vars.yml
), while the files from config folders is without the dot (wharf-vars.yml
).The file content should be structured as:
# .wharf-vars.yml vars: CHART_REPO: http://harbor.example.com
-
Added ability to configure values, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#116, #133, #134)
- Environment variables, prefixed with
WHARF_
- File from environment variable:
WHARF_CONFIG
- File:
./wharf-cmd-config.yml
- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-cmd-config.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-cmd-config.yml
- File:
/etc/iver-wharf/wharf-cmd/wharf-cmd-config.yml
Read more here.
- Environment variables, prefixed with
-
Added support for using OS environment variables prefixed with
WHARF_VAR_
in variable substitution, whereWHARF_VAR_REG_URL
would set theREG_URL
Wharf variable. (#96) -
Added variable substitution support for referenced files in
kubectl
andhelm
step types. (#89) -
Added file transfer cache, stored in
/tmp/wharf-cmd-repo-xxxxx/full.tar
, that is reused by all steps in a single build. (#89) -
Added build result (logs, status updates) caching via file system. New package in
pkg/resultstore
. (#43, #69, #70) -
Added all kubeconfig-related flags from
kubectl
but with a--k8s-*
prefix. This allows e.g Wharf to run as a service account via the--k8s-as
flag, among other things. (#63) -
Fixed
wharf run
andwharf provisioner
commands not using the namespace defined in the kubeconfig. (#63) -
Added CLI completions via Cobra. See the completion command's help text for your shell for more info: (#64)
wharf completion bash --help wharf completion fish --help wharf completion powershell --help wharf completion zsh --help
-
Added
--stage
and--environment
completions towharf run
based on the parsed.wharf-ci.yml
file. (#91) -
Added
--loglevel
completions. (#95) -
Added Git integration by executing
git
locally to obtain current branch, commit SHA, tags, etc. (#67, #78) -
Fixed
wharf run
not reading a pod's logs when it fails immediately on start. (#50) -
Fixed
wharf run
not failing due to pod config errors, such as "secret 'cluster-config' not found" inkubectl
steps. (#52) -
Changed from
github.com/sirupsen/logrus
togithub.com/iver-wharf/wharf-core/pkg/logger
for logging. (#2, #7) -
Added gRPC server for worker in
pkg/workerapi/workerserver
: (#51)StreamLogs
batches logs into chunks and serves to gRPC clients.StreamStatusEvents
serves status events to gRPC clients.StreamArtifactEvents
serves artifact events to gRPC clients.
-
Added gRPC client in
pkg/workerapi/workerclient
to interface with a worker gRPC server. (#51) -
Added HTTP server for worker in
pkg/workerapi/workerserver
: (#51, #114, #117)GET /
to ping.GET /api/swagger/index.html
Swagger generated documentation.GET /api/artifact/:artifactId/download
Downloads an artifact.
-
Added HTTP client in
pkg/workerapi/workerclient
to interface with worker HTTP server. (#51) -
Added
--version
,-v
flag to show the version of wharf-cmd. (#76) -
Added dependencies:
github.com/alta/protopatch
v0.5.0 (#51)github.com/cli/safeexec
v1.0.0 (#78)github.com/denormal/go-gitignore
v0.0.0-20180930084346-ae8ad1d07817 (#85)github.com/gin-contrib/cors
v1.3.1 (#51)github.com/gin-gonic/gin
v1.7.1 (#46)github.com/golang/protobuf
v1.5.2 (#51)github.com/iver-wharf/wharf-api-client-go/v2
v2.0.0 (#62)github.com/iver-wharf/wharf-core
(#2, #7)github.com/soheilhy/cmux
v0.1.4 (#51)github.com/spf13/pflag
v1.0.5 (#63)github.com/swaggo/gin-swagger
v1.4.1 (#59)github.com/swaggo/swag
v1.8.0 (#59)google.golang.org/grpc
v1.45.0 (#51, #116)google.golang.org/protobuf
v1.28.0 (#51, #116)gopkg.in/guregu/null.v4
v4.0.0 (#62)gopkg.in/typ.v4
v4.0.0 (#75, #89, #127)gopkg.in/yaml.v3
v3.0.0 (#48)
-
Removed dependencies:
-
Removed commands
init
,setup
, andserve
. (#8) -
Changed versions of numerous dependencies:
github.com/gin-gonic/gin
from v1.7.1 to v1.7.7 (#59)github.com/spf13/cobra
v1.1.3 to v1.3.0 (#64)github.com/stretchr/testify
v1.7.0 to v1.7.1 (#116)k8s.io/api
from v0.0.0 to v0.23.3 (#8)k8s.io/apimachinery
from v0.0.0 to v0.23.3 (#8)k8s.io/client-go
from v0.0.0 to v0.23.3 (#8)sigs.k8s.io/yaml
from v1.1.0 to v1.2.0 (#8)
-
Changed logging on CLI errors (ex "unknown command") to be more terse. (#34)
-
Changed to trim away everything before the last CR (carriage return) character in a log line from a Kubernetes pod. (#49)
-
Changed location of packages and code files: (#44, #87)
- File
pkg/core/utils/variablesreplacer.go
to its own package inpkg/varsub
- Package
pkg/core/wharfyml
topkg/wharfyml
- Command
main.go
tocmd/wharf/main.go
- File
-
Removed packages: (#44)
pkg/core/buildclient
pkg/core/containercreator
pkg/core/kubernetes
pkg/core/utils
pkg/namespace
pkg/run
-
Removed
containercreator
references frompkg/core/wharfyml
. (#44) -
Added collecting of build logs and status updates for build steps using
resultstore
. (#71) -
Added cancelling of builds via signals (once to shutdown with a grace period, twice for a forceful shutdown): (#90, #104)
os.Interrupt
os.Kill
syscall.SIGTERM
syscall.SIGHUP
v0.8.0-rc.1 wharf-cmd
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-cmd
docker pull quay.io/iver-wharf/wharf-cmd:v0.8.0-rc.1
Changes (since v0.7.0)
-
Added provisioner commands: (#46, #59)
-
wharf provisioner serve
that launches an HTTP REST api server with endpoints:-
GET /api
to check health. -
GET /api/swagger/index.html
Swagger generated documentation. -
POST /api/worker
creates a new worker with certain labels. -
GET /api/worker
gets a list of all workers with certain labels. -
DELETE /api/worker/:workerId
deletes a worker, as long as it has certain labels.
-
-
wharf provisioner create
that creates a new worker. -
wharf provisioner list
that lists all running workers with certain labels. -
wharf provisioner delete
with flag--id
to specify the worker that should be deleted, as long as it has certain labels as well.
-
-
Added watchdog commands: (#62)
wharf watchdog serve
checks stray builds from the wharf-api and wharf-cmd-workers from the wharf-cmd-provisioner and kills them in an effort to clean up forgotten builds/workers.
-
Added aggregator command
wharf aggregator serve
that looks for wharf-cmd-worker pods and pipes build results over to the wharf-api. (#77) -
Added new implementation for
wharf run
. (#33, #45, #66, #84, #107) -
Added "vars" command
wharf vars
with: -
Added support for
.gitignore
ignored files and directories when transferring repo inwharf run
. Can be disabled via new--no-gitignore
flag. (#85) -
Added input variables support using the
inputs
field in.wharf-ci.yml
files, and the--input, -i
flag towharf run
andwharf vars
commands through the CLI, ex: (#97, #111)wharf run --input myInputVar=myValue # => [ "myInputVar": "myValue" ] # Supports multiple: wharf run --input var1=value1 --input var2=value2 # => [ "var1": "value1", "var2": "value2" ] # On collisions, the last value is used: wharf run --input myVar=foo --input myVar=bar # => [ "myVar": "bar" ]
-
Added new implementation for
.wharf-ci.yml
file parsing that now supports returning multiple errors for the whole parsing as well as keep track of the line & column of each parse error. (#48, #58) -
Added support for a new file type:
.wharf-vars.yml
. It is used to define built-in variables, and wharf looks for it in multiple files in the following order, where former files take precedence over latter files on a per-variable basis: (#73)./.wharf-vars.yml
(in same directory as.wharf-ci.yml
)./../.wharf-vars.yml
(in parent directory of.wharf-ci.yml
)./../../.wharf-vars.yml
(etc; it continues recursively)- (Linux only)
~/.config/iver-wharf/wharf-cmd/wharf-vars.yml
- (Linux only)
/etc/iver-wharf/wharf-cmd/wharf-vars.yml
- (Darwin/OS X only)
~/Library/Application Support/iver-wharf/wharf-cmd/wharf-vars.yml
- (Windows only)
%APPDATA%\iver-wharf\wharf-cmd\wharf-vars.yml
Note the leading dot in the directory tree files (
.wharf-vars.yml
), while the files from config folders is without the dot (wharf-vars.yml
).The file content should be structured as:
# .wharf-vars.yml vars: CHART_REPO: http://harbor.example.com
-
Added support for using OS environment variables prefixed with
WHARF_VAR_
in variable substitution, whereWHARF_VAR_REG_URL
would set theREG_URL
Wharf variable. (#96) -
Added variable substitution support for referenced files in
kubectl
andhelm
step types. (#89) -
Added file transfer cache, stored in
/tmp/wharf-cmd-repo-xxxxx/full.tar
, that is reused by all steps in a single build. (#89) -
Added build result (logs, status updates) caching via file system. New package in
pkg/resultstore
. (#43, #69, #70) -
Added all kubeconfig-related flags from
kubectl
but with a--k8s-*
prefix. This allows e.g Wharf to run as a service account via the--k8s-as
flag, among other things. (#63) -
Fixed
wharf run
andwharf provisioner
commands not using the namespace defined in the kubeconfig. (#63) -
Added CLI completions via Cobra. See the completion command's help text for your shell for more info: (#64)
wharf completion bash --help wharf completion fish --help wharf completion powershell --help wharf completion zsh --help
-
Added
--stage
and--environment
completions towharf run
based on the parsed.wharf-ci.yml
file. (#91) -
Added
--loglevel
completions. (#95) -
Added Git integration by executing
git
locally to obtain current branch, commit SHA, tags, etc. (#67, #78) -
Fixed
wharf run
not reading a pod's logs when it fails immediately on start. (#50) -
Fixed
wharf run
not failing due to pod config errors, such as "secret 'cluster-config' not found" inkubectl
steps. (#52) -
Changed from
github.com/sirupsen/logrus
togithub.com/iver-wharf/wharf-core/pkg/logger
for logging. (#2, #7) -
Added gRPC server for worker in
pkg/workerapi/workerserver
: (#51)StreamLogs
batches logs into chunks and serves to gRPC clients.StreamStatusEvents
serves status events to gRPC clients.StreamArtifactEvents
serves artifact events to gRPC clients.
-
Added gRPC client in
pkg/workerapi/workerclient
to interface with a worker gRPC server. (#51) -
Added HTTP server for worker in
pkg/workerapi/workerserver
: (#51)GET /api/artifact/:artifactId/download
Downloads an artifact.
-
Added HTTP client in
pkg/workerapi/workerclient
to interface with worker HTTP server. (#51) -
Added
--version
,-v
flag to show the version of wharf-cmd. (#76) -
Added dependencies:
github.com/alta/protopatch
v0.5.0 (#51)github.com/cli/safeexec
v1.0.0 (#78)github.com/denormal/go-gitignore
v0.0.0-20180930084346-ae8ad1d07817 (#85)github.com/gin-contrib/cors
v1.3.1 (#51)github.com/gin-gonic/gin
v1.7.1 (#46)github.com/golang/protobuf
v1.5.2 (#51)github.com/iver-wharf/wharf-api-client-go/v2
v2.0.0 (#62)github.com/iver-wharf/wharf-core
(#2, #7)github.com/soheilhy/cmux
v0.1.4 (#51)github.com/spf13/pflag
v1.0.5 (#63)github.com/swaggo/gin-swagger
v1.4.1 (#59)github.com/swaggo/swag
v1.8.0 (#59)google.golang.org/grpc
v1.44.0 (#51)google.golang.org/protobuf
v1.27.1 (#51)gopkg.in/guregu/null.v4
v4.0.0 (#62)gopkg.in/typ.v3
v3.1.0 (#75, #89)gopkg.in/yaml.v3
v3.0.0 (#48)
-
Removed dependencies:
-
Removed commands
init
,setup
, andserve
. (#8) -
Changed versions of numerous dependencies:
-
Changed logging on CLI errors (ex "unknown command") to be more terse. (#34)
-
Changed to trim away everything before the last CR (carriage return) character in a log line from a Kubernetes pod. (#49)
-
Changed location of packages and code files: (#44, #87)
- File
pkg/core/utils/variablesreplacer.go
to its own package inpkg/varsub
- Package
pkg/core/wharfyml
topkg/wharfyml
- Command
main.go
tocmd/wharf/main.go
- File
-
Removed packages: (#44)
pkg/core/buildclient
pkg/core/containercreator
pkg/core/kubernetes
pkg/core/utils
pkg/namespace
pkg/run
-
Removed
containercreator
references frompkg/core/wharfyml
. (#44) -
Added collecting of build logs and status updates for build steps using
resultstore
. (#71) -
Added cancelling of builds via signals (once to shutdown with a grace period, twice for a forceful shutdown): (#90, #104)
os.Interrupt
os.Kill
syscall.SIGTERM
syscall.SIGHUP