Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 635f92d2bc | |||
| 9a2cb56094 | |||
| 5886283002 | |||
| f886194c9c | |||
| e4efec89d9 | |||
| dbc12a593f | |||
| d7666e862b |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.79",
|
"version": "3.1.83",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.79",
|
"version": "3.1.83",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^1.0.58",
|
"@apiglobal/typedrequest": "^1.0.58",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shipzone/npmci",
|
"name": "@shipzone/npmci",
|
||||||
"version": "3.1.79",
|
"version": "3.1.83",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "node and docker in gitlab ci on steroids",
|
"description": "node and docker in gitlab ci on steroids",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
|||||||
16
test/test.cloudly.ts
Normal file
16
test/test.cloudly.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = '0';
|
||||||
|
import { tap, expect } from '@pushrocks/tapbundle';
|
||||||
|
|
||||||
|
import * as cloudlyConnectorMod from '../ts/connector.cloudly/cloudlyconnector';
|
||||||
|
|
||||||
|
tap.test('should be able to announce a container to cloudly', async () => {
|
||||||
|
const cloudlyConnector = new cloudlyConnectorMod.CloudlyConnector(null);
|
||||||
|
await cloudlyConnector.announceDockerContainer({
|
||||||
|
registryUrl: 'registry.losssless.com',
|
||||||
|
tag: 'testcontainer',
|
||||||
|
version: 'x.x.x',
|
||||||
|
labels: []
|
||||||
|
}, 'cloudly.lossless.one')
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.start();
|
||||||
@@ -2,6 +2,7 @@ import { tap, expect } from '@pushrocks/tapbundle';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
process.env.NPMTS_TEST = 'true';
|
process.env.NPMTS_TEST = 'true';
|
||||||
|
process.env.NPMCI_URL_CLOUDLY = 'localhost'
|
||||||
|
|
||||||
// set up environment
|
// set up environment
|
||||||
process.env.CI_REPOSITORY_URL = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git';
|
process.env.CI_REPOSITORY_URL = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git';
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ export class CloudlyConnector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async announceDockerContainer(
|
public async announceDockerContainer(
|
||||||
optionsArg: plugins.tsclass.container.IContainer
|
optionsArg: plugins.tsclass.container.IContainer,
|
||||||
|
testCloudlyUrlArg?: string
|
||||||
) {
|
) {
|
||||||
const cloudlyUrl = this.npmciRef.npmciConfig.getConfig().urlCloudly;
|
const cloudlyUrl = testCloudlyUrlArg || this.npmciRef.npmciConfig.getConfig().urlCloudly;
|
||||||
if (!cloudlyUrl) {
|
if (!cloudlyUrl) {
|
||||||
logger.log(
|
logger.log(
|
||||||
'warn',
|
'warn',
|
||||||
@@ -27,7 +28,7 @@ export class CloudlyConnector {
|
|||||||
|
|
||||||
const typedrequest =
|
const typedrequest =
|
||||||
new plugins.typedrequest.TypedRequest<plugins.servezoneInterfaces.requests.IRequest_InformAboutNewContainerImage>(
|
new plugins.typedrequest.TypedRequest<plugins.servezoneInterfaces.requests.IRequest_InformAboutNewContainerImage>(
|
||||||
`https://${cloudlyUrl}/versionmanager`,
|
`https://${cloudlyUrl}/typedrequest`,
|
||||||
'servezonestandard_InformAboutNewContainerVersion'
|
'servezonestandard_InformAboutNewContainerVersion'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user