OpenFolia

Cut a release

POST
/releases

Tags the commit main points to now (the whole repository) as revision of product, with an annotated tag named by CCMS_RELEASE_TAG (default release/{product}/{revision}; the publisher as tagger; the notes as the message’s body; trailers Product, Revision and Actor), then records the release and a release.publish audit event. A release is immutable: its tag is never moved or deleted, and its product and revision (or tag name) can never be used again. A request cut off before it was recorded (the server stopped, Git or the database failed) is finished by the next request for the same release once 60 s have passed, as first requested; until then that is 409 release-pending (meta.releaseId, meta.retryAfter in seconds): try again then. Needs the release.publish permission in a role whose scope covers the product in every language, module type and audience, and content.read (to read openfolia.yaml at main). With maintenanceLine (a maintenance line’s ID), the release is cut from the head of the line’s branch instead, of the line’s product (else 422 invalid-product), and listed under GET /maintenance-lines/{id}/releases; that head holds unreleased fixes, so it also needs content.read.draft (without it the branch is not there: 409 branch-missing).

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Request Body

application/vnd.api+json
  1. body
data*

Response Body

application/vnd.api+json
  1. response
data*
Example Request
curl -X POST 'http://localhost:3000/releases' \  -H 'Content-Type: application/vnd.api+json' \  -d '{  "data": {    "type": "Release",    "attributes": {      "product": "string",      "revision": "string"    }  }}'
Example Response
{  "data": {    "type": "Release",    "id": "string",    "attributes": {      "product": "string",      "productFacet": "string",      "revision": "string",      "tag": "string",      "tagObject": "string",      "commit": "string",      "notes": "string",      "notesByLanguage": {        "property1": "string",        "property2": "string"      },      "major": true,      "publishedBy": {        "kind": "user",        "id": "string"      },      "publishedAt": "2019-08-24T14:15:22Z",      "withdrawal": {        "by": {          "kind": "user",          "id": "string"        },        "at": "2019-08-24T14:15:22Z",        "reason": "string"      }    }  }}