All Projects → OctopusDeploy → octopackjs

OctopusDeploy / octopackjs

Licence: other
A nodejs tool for packaging and pushing projects to an Octopus Deploy instance.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to octopackjs

CloudHunter
Find unreferenced AWS S3 buckets which have CloudFront CNAME records pointing to them
Stars: ✭ 31 (+19.23%)
Mutual labels:  public
thomas
Another A/B test library
Stars: ✭ 20 (-23.08%)
Mutual labels:  public
OctopusCLI
| Public | Command line tool for Octopus Deploy
Stars: ✭ 40 (+53.85%)
Mutual labels:  public
openfpc
A 2D CAD tool built on React, Three.js, and Immutable
Stars: ✭ 34 (+30.77%)
Mutual labels:  public
melonnpan
Model-based Genomically Informed High-dimensional Predictor of Microbial Community Metabolic Profiles
Stars: ✭ 20 (-23.08%)
Mutual labels:  public
jitsi-box
A Raspberry Pi based box to automate holding hybrid conferences with Jitsi
Stars: ✭ 15 (-42.31%)
Mutual labels:  public
soql
Models and query generator for Salesforce Object Query Language (SOQL)
Stars: ✭ 16 (-38.46%)
Mutual labels:  public
strongs-dictionary-xml
Strong's Greek Dictionary in XML with real Greek
Stars: ✭ 65 (+150%)
Mutual labels:  public
ficus
Scala-friendly companion to Typesafe config
Stars: ✭ 321 (+1134.62%)
Mutual labels:  public
googletranslate
Python Google Translate (using reverse-engineered public API, so free)
Stars: ✭ 67 (+157.69%)
Mutual labels:  public
kneaddata
Quality control tool on metagenomic and metatranscriptomic sequencing data, especially data from microbiome experiments.
Stars: ✭ 52 (+100%)
Mutual labels:  public
masader
The largest public catalogue for Arabic NLP and speech datasets. There are +250 datasets annotated with more than 25 attributes.
Stars: ✭ 66 (+153.85%)
Mutual labels:  public
Public Apis
A collective list of free APIs
Stars: ✭ 177,707 (+683388.46%)
Mutual labels:  public
BitBruteForce-Wallet
No description or website provided.
Stars: ✭ 142 (+446.15%)
Mutual labels:  public
content
Scripts & code for use with Guardian
Stars: ✭ 13 (-50%)
Mutual labels:  public
create-release-action
| Public | GitHub Action to Create a Release in Octopus Deploy
Stars: ✭ 68 (+161.54%)
Mutual labels:  public
babel-plugin-private-underscores
Make _classMembers 'private' using symbols
Stars: ✭ 39 (+50%)
Mutual labels:  public
humann
HUMAnN 3.0 is the next generation of HUMAnN 1.0 (HMP Unified Metabolic Analysis Network).
Stars: ✭ 95 (+265.38%)
Mutual labels:  public
fbdl
📥 Download publicly shared videos from Facebook with an ease!
Stars: ✭ 29 (+11.54%)
Mutual labels:  public
Maaslin2
MaAsLin2: Microbiome Multivariate Association with Linear Models
Stars: ✭ 76 (+192.31%)
Mutual labels:  public

octopack

A nodejs tool for packaging and pushing projects to an Octopus Deploy instance.

Installation

Install with npm

    npm install @octopusdeploy/octopackjs --save-dev

API

var package = octo.pack(type, options)

type

Optional parameter to define the package type. Valid values are targz, tar or zip. If not provided this defaults to targz.

options.packagejson

Path to the package.json containing project information used to provide required package metadata.

options.id

Defines the Id component of the created package. By default it will extract the name out of package.json if present.

options.version

Defines the version component of the created package. By default it will extract the version out of package.json if present.

package.append(filePath, buff, options)

Adds the buff Buffer instance to the package named using the provided filePath parameter as a relative path from the root of the archive.

package.append(filePath, stream, options)

Adds the stream Stream instance to the package named using the provided filePath parameter as a relative path from the root of the archive.

package.append(filePath, file)

Adds the file from disk to the package named using the provided filePath parameter as a relative path from the root of the archive. If the filePath parameter is missing, the provided path to the file on disk will be used as the filePath in the archive. If the filePath is a glob pattern, then the glob is used to append files to the package and the other arguments will be ignored. Supplying a folder path without being a glob will be ignored.

package.appendSubDir(dir, toRoot)

Adds the sub-directory dir to the archive. Adds the contents of dir to the root of the archive if toRoot is true (defaults to false).

package.toStream(function callback(err, data){})

Completes the packaging of the files and invokes the provided callback, returning an object containing the stream instance and name.

package.toFile(dir, function callback(err, data){})

Completes the packaging of the files, saves it to disk at the provided directory location and invokes the provided callback, returning an object containing the package path, name and size.

octo.push(file, options, function callback(err, data){})

file

Package file that is to be pushed to server. This can be an instance of a Stream, Buffer or file path string.

options.host

Required property that points to the Octopus Server instance the package should be pushed to.

options.replace

Flag to force overwrite of existing package if one already exists with the same ID and version.

options.apiKey

Key linked to account with BuiltInFeedPush permissions. If options.replace is set to true and a package with the same ID and version already exists then the BuiltInFeedAdminister permission is required.

options.name

If a Stream or Buffer object is provided in the file parameter, the package name needs is required to properly store and use in Octopus Deploy. If this value is not provided and a path has been provided in the file parameter then the name of the file itself will be used.

callback

Invoked when the HTTP request has completed. The data object contains the HTTP response body that was returned as a result of a successful push.

Usage Examples

Pack

var octo = require('@octopusdeploy/octopackjs');
octo.pack()
  .append('buffer files/hello.txt', Buffer.from('hello world'), {date: new Date(2011, 11, 11)})
  .append('stream.txt', fs.createReadStream('./package.json'))
  .append('lib/myfile.js')
  .appendSubDir('dist/', true)
  .toFile('./bin', function (err, data) {
    console.log("Package Saved: "+ data.name);
  });

Push

var octo = require('@octopusdeploy/octopackjs');

octo.push('./bin/Sample.Web.3.2.1.tar.gz', {
        host: 'http://octopus-server/', 
        apikey: 'API-XXXXXXXXX',
        replace: true
    }, function(err, result) {
     if(!err) {
        console.log("Package Pushed:" + body.Title + " v"+ body.Version +" (" + fileSizeString(body.PackageSizeBytes) +"nytes)"); 
     }
});
var octo = require('@octopusdeploy/octopackjs');

octo.push('./bin/Sample.Web.3.2.1.tar.gz', {
        host: 'http://octopus-server/', 
        apikey: 'API-XXXXXXXXX',
        replace: true,
        spaceId: 'Spaces-1'
    }, function(err, result) {
     if(!err) {
        console.log("Package Pushed:" + body.Title + " v"+ body.Version +" (" + fileSizeString(body.PackageSizeBytes) +"nytes)"); 
     }
});

Tests

    npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].