v5.1.0 wharf-api
Docker image
Hosted over at https://quay.io/repository/iver-wharf/wharf-api
docker pull quay.io/iver-wharf/wharf-api:v5.1.0
Migration from v4.2.0 or earlier
Some manual SQL commands are needed. To run SQL commands on a Postgres found in Kubernetes, you could run the following:
$ kubectl exec -it wharf-db-0 -- psql -U postgres wharf
Password for user postgres:
psql (11.12)
Type "help" for help.
wharf=#
Then apply the following SQL:
BEGIN;
ALTER TABLE token RENAME COLUMN token TO value;
UPDATE token SET user_name='' WHERE user_name IS NULL;
ALTER TABLE token ALTER COLUMN user_name SET NOT NULL;
ALTER TABLE token ALTER COLUMN user_name SET DEFAULT '';
UPDATE project SET group_name='' WHERE group_name IS NULL;
ALTER TABLE project ALTER COLUMN group_name SET NOT NULL;
ALTER TABLE project ALTER COLUMN group_name SET DEFAULT '';
UPDATE project SET description='' WHERE description IS NULL;
ALTER TABLE project ALTER COLUMN description SET NOT NULL;
ALTER TABLE project ALTER COLUMN description SET DEFAULT '';
UPDATE project SET avatar_url='' WHERE avatar_url IS NULL;
ALTER TABLE project ALTER COLUMN avatar_url SET NOT NULL;
ALTER TABLE project ALTER COLUMN avatar_url SET DEFAULT '';
UPDATE project SET git_url='' WHERE git_url IS NULL;
ALTER TABLE project ALTER COLUMN git_url SET NOT NULL;
ALTER TABLE project ALTER COLUMN git_url SET DEFAULT '';
UPDATE project SET build_definition='' WHERE build_definition IS NULL;
ALTER TABLE project ALTER COLUMN build_definition SET NOT NULL;
ALTER TABLE project ALTER COLUMN build_definition SET DEFAULT '';
UPDATE artifact SET file_name='' WHERE file_name IS NULL;
ALTER TABLE artifact ALTER COLUMN file_name SET NOT NULL;
ALTER TABLE artifact ALTER COLUMN file_name SET DEFAULT '';
COMMIT;
Changes (since v5.0.0)
-
Deprecated trigger configs (YAML:
ci.triggerUrl
&ci.triggerToken
, environment variables:WHARF_CI_TRIGGERURL
&WHARF_CI_TRIGGERTOKEN
) in favor of new configuration values that allow specifying up to two different execution engines: (#134, #156)YAML Environment variable Type ci.engine.id
WHARF_CI_ENGINE_ID
string (max 32 chars) ci.engine.name
WHARF_CI_ENGINE_NAME
string ci.engine.api
WHARF_CI_ENGINE_API
string ci.engine.url
WHARF_CI_ENGINE_URL
string ci.engine.token
WHARF_CI_ENGINE_TOKEN
string ci.engine2.id
WHARF_CI_ENGINE2_ID
string (max 32 chars) ci.engine2.name
WHARF_CI_ENGINE2_NAME
string ci.engine2.api
WHARF_CI_ENGINE2_API
string ci.engine2.url
WHARF_CI_ENGINE2_URL
string ci.engine2.token
WHARF_CI_ENGINE2_TOKEN
string The deprecated trigger configs are used as defaults for the
ci.engine.url
andci.engine.token
configs. -
Added endpoint
GET /api/engine
for listing execution engines. (#134, #140) -
Added query parameter
?engine=ID
toPOST /api/project/{projectId}/build
to allow specifying which execution engine to use for the new build. (#134) -
Added gRPC server (on the same port) for injecting logs in a single stream. See
api/wharfapi/v5/builds.proto
for full documentation of the API. (#147) -
Added build field
workerId
that is automatically populated if the engine API iswharf-cmd.v1
. (#156) -
Added granular migrations support. Thanks to this, wharf-api now initializes much quicker as it can skip applying migrations that are already applied. (#144)
-
Added automatic JSON indentation in HTTP responses based on the user agent, if they are a desktop, mobile, or tablet device, or specifically cURL. Can be disabled by the new query parameter
?pretty=false
. (#158) -
Changed query parameter
?status
and?statusId
inGET /api/build
to support multiple values, where it will respond with builds matching any of the supplied statuses. (#150) -
Changed database column name
token.token
totoken.value
due to a bug in the Sqlite database driver. The HTTP response model still uses the field name"token"
. (#144) -
Added dependencies:
-
Changed version of numerous dependencies:
github.com/gin-gonic/gin
from v1.7.4 to v1.7.7 (#151)github.com/swaggo/gin-swagger
from v1.3.1 to v1.4.1 (#151)github.com/swaggo/swag
from v1.7.1 to v1.8.0 (#151)gorm.io/driver/postgres
from v1.1.1 to v1.2.3 (#144)gorm.io/driver/sqlite
from v1.1.5 to v1.2.6 (#144)gorm.io/gorm
from v1.21.15 to v1.22.5 (#144)
-
Changed Go runtime from v1.16 to v1.17. (#148)
-
Fixed
testResultListSummary
,testResultSummary
andparams
not filled when fetching list of builds. (#131)