Release
balena.models.release : object
Kind: static namespace
createFromUrl
balena.models.release.createFromUrl(slugOrUuidOrId, urlDeployOptions) ⇒ Promise
Kind: static method of release
Summary: Create a new release built from the source in the provided url
Access: public
Fulfil: number - release ID
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
urlDeployOptions
Object
builder options
urlDeployOptions.url
String
a url with a tarball of the project to build
[urlDeployOptions.shouldFlatten]
Boolean
true
Should be true when the tarball includes an extra root folder with all the content
Example
balena.models.release.createFromUrl('myorganization/myapp', { url: 'https://github.com/balena-io-projects/simple-server-node/archive/v1.0.0.tar.gz' }).then(function(releaseId) {
console.log(releaseId);
});Example
balena.models.release.createFromUrl(123, { url: 'https://github.com/balena-io-projects/simple-server-node/archive/v1.0.0.tar.gz' }).then(function(releaseId) {
console.log(releaseId);
});finalize
balena.models.release.finalize(commitOrIdOrRawVersion) ⇒ Promise
Kind: static method of release
Summary: Finalizes a draft release
Access: public
Fulfil: void
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
Example
Example
Example
get
balena.models.release.get(commitOrIdOrRawVersion, [options]) ⇒ Promise
Kind: static method of release
Summary: Get a specific release
Access: public
Fulfil: Object - release
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
[options]
Object
{}
extra pine options to use
Example
Example
Example
getAllByApplication
balena.models.release.getAllByApplication(slugOrUuidOrId, [options]) ⇒ Promise
Kind: static method of release
Summary: Get all releases from an application
Access: public
Fulfil: Object[] - releases
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
[options]
Object
{}
extra pine options to use
Example
Example
getLatestByApplication
balena.models.release.getLatestByApplication(slugOrUuidOrId, [options]) ⇒ Promise
Kind: static method of release
Summary: Get the latest successful release for an application
Access: public
Fulfil: Object|undefined - release
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
[options]
Object
{}
extra pine options to use
Example
Example
getWithImageDetails
balena.models.release.getWithImageDetails(commitOrIdOrRawVersion, [options]) ⇒ Promise
This method does not map exactly to the underlying model: it runs a larger prebuilt query, and reformats it into an easy to use and understand format. If you want significantly more control, or to see the raw model directly, use release.get(id, options) instead.
Kind: static method of release
Summary: Get a specific release with the details of the images built
Access: public
Fulfil: Object - release with image details
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
[options]
Object
{}
a map of extra pine options
[options.release]
Boolean
{}
extra pine options for releases
[options.image]
Object
{}
extra pine options for images
Example
Example
Example
Example
setIsInvalidated
balena.models.release.setIsInvalidated(commitOrIdOrRawVersion, isInvalidated) ⇒ Promise
Kind: static method of release
Summary: Set the is_invalidated property of a release to true or false
Access: public
Fulfil: void
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
isInvalidated
Boolean
boolean value, true for invalidated, false for validated
Example
Example
Example
Example
Example
setKnownIssueList
balena.models.release.setKnownIssueList(commitOrIdOrRawVersion, knownIssueListOrNull) ⇒ Promise
Kind: static method of release
Summary: Add a known issue list to a release
Access: public
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
knownIssueListOrNull
String | null
the known issue list
Example
Example
Example
setNote
balena.models.release.setNote(commitOrIdOrRawVersion, noteOrNull) ⇒ Promise
Kind: static method of release
Summary: Add a note to a release
Access: public
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
noteOrNull
String | null
the note
Example
Example
Example
asset
balena.models.release.asset : object
Kind: static namespace of release
download
balena.models.release.asset.download(id) ⇒ Promise
Kind: static method of asset
Summary: Download a release asset
Access: public
Fulfil: NodeJS.ReadableStream - download stream
id
Number | Object
release asset ID or object specifying the unique release & asset_key pair
Example
Example
get
balena.models.release.asset.get(id, [options]) ⇒ Promise
Kind: static method of asset
Summary: Get a specific release asset
Access: public
Fulfil: Object - release asset
id
Number | Object
release asset ID or object specifying the unique release & asset_key pair
[options]
Object
{}
extra pine options to use
Example
Example
getAllByRelease
balena.models.release.asset.getAllByRelease(commitOrIdOrRawVersion, [options]) ⇒ Promise
Kind: static method of asset
Summary: Get all release assets for a release
Access: public
Fulfil: Object[] - release assets
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
[options]
Object
{}
extra pine options to use
Example
Example
Example
remove
balena.models.release.asset.remove(id) ⇒ Promise
Kind: static method of asset
Summary: Remove a release asset
Access: public
id
Number | Object
release asset ID or object specifying the unique release & asset_key pair
Example
Example
upload
balena.models.release.asset.upload(uploadParams, [options]) ⇒ Promise
Kind: static method of asset
Summary: Upload a release asset
Access: public
Fulfil: Object - uploaded release asset
uploadParams
Object
upload parameters
uploadParams.asset
String | File
asset file path (string, Node.js only) or File object (Node.js & browser). For File objects, use new File([content], filename, {type: mimeType})
uploadParams.asset_key
String
unique key for the asset within the release
uploadParams.release
Number
release ID
[options]
Object
{}
upload options
[options.chunkSize]
Number
5242880
chunk size for multipart uploads (5MiB default)
[options.parallelUploads]
Number
5
number of parallel uploads for multipart
[options.overwrite]
Boolean
false
whether to overwrite existing asset
[options.onUploadProgress]
function
callback for upload progress
Example
Example
Example
Example
Example
tags
balena.models.release.tags : object
Kind: static namespace of release
getAllByApplication
balena.models.release.tags.getAllByApplication(slugOrUuidOrId, [options]) ⇒ Promise
Kind: static method of tags
Summary: Get all release tags for an application
Access: public
Fulfil: Object[] - release tags
slugOrUuidOrId
String | Number
application slug (string), uuid (string) or id (number)
[options]
Object
{}
extra pine options to use
Example
Example
getAllByRelease
balena.models.release.tags.getAllByRelease(commitOrIdOrRawVersion, [options]) ⇒ Promise
Kind: static method of tags
Summary: Get all release tags for a release
Access: public
Fulfil: Object[] - release tags
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
[options]
Object
{}
extra pine options to use
Example
Example
Example
remove
balena.models.release.tags.remove(commitOrIdOrRawVersion, tagKey) ⇒ Promise
Kind: static method of tags
Summary: Remove a release tag
Access: public
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
tagKey
String
tag key
Example
Example
Example
set
balena.models.release.tags.set(commitOrIdOrRawVersion, tagKey, value) ⇒ Promise
Kind: static method of tags
Summary: Set a release tag
Access: public
commitOrIdOrRawVersion
String | Number | Object
release commit (string) or id (number) or an object with the unique application (number or string) & rawVersion (string) pair of the release
tagKey
String
tag key
value
String | undefined
tag value
Example
Example
Example
Last updated
Was this helpful?