- POSTGRES_USER=
- POSTGRES_PASSWORD=
- JFROG_APIKEY=
- ARTIFACTORY_BASE_URL=
- JFROG_USER=
- VALID_ARTIFACTS=application/x-gzip,application/x-tar,application/x-gtar,application/x-tgz,application/gzip
Install dependencies:
npm install
Start server
npm start
The JFrog test API exposed are as follows:
-
PUT
/artifacts
To upload a bundle
Accepts:
multipart/form-data
:file
: Rakuten-bundle-file. eg. omnicare-v1.2.tar.gzbundle
: name of bundle, name of application or the application submitted by vendor e.g. omnicareorg
: Organization. i.e. repository namerevision
: The revision for testing purpose. It will be auto-managed after implementation
-
GET
/artifacts/{org}/{bundle}/{revision}
To download a bundle
Accepts:
*/*
example:
http://localhost:3000/artifacts/rakuten-poc-bundle/omnicare/3.1
to fetch the v3.1 bundle of omnicare under rakuten-poc-bundle repository
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
code
Base URLs:
Code samples
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:3000/artifacts/{org}/{bundle}/{revision}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/octet-stream'
};
fetch('http://localhost:3000/artifacts/{org}/{bundle}/{revision}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /artifacts/{org}/{bundle}/{revision}
Name | In | Type | Required | Description |
---|---|---|---|---|
org | path | string | true | none |
bundle | path | string | true | none |
revision | path | string | true | none |
Example responses
200 Response
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | The file content | string |
Code samples
const inputBody = '{}';
const headers = {
'Content-Type':'multipart/form-data'
};
fetch('http://localhost:3000/artifacts',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {};
const headers = {
'Content-Type':'multipart/form-data'
};
fetch('http://localhost:3000/artifacts',
{
method: 'PUT',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /artifacts
Body parameter
{}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | object | true | Upload an artifact |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Return value of ArtifactsController.uploadArtifact | None |