Compare commits

...

5 Commits

Author SHA1 Message Date
635f92d2bc 3.1.83 2022-01-18 18:10:28 +01:00
9a2cb56094 fix(core): update 2022-01-18 18:10:27 +01:00
5886283002 3.1.82 2021-11-10 12:42:42 +01:00
f886194c9c 3.1.81 2021-11-10 12:40:13 +01:00
e4efec89d9 fix(core): update 2021-11-10 12:40:12 +01:00
5 changed files with 23 additions and 5 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@shipzone/npmci",
"version": "3.1.80",
"version": "3.1.83",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@shipzone/npmci",
"version": "3.1.80",
"version": "3.1.83",
"license": "MIT",
"dependencies": {
"@apiglobal/typedrequest": "^1.0.58",

View File

@@ -1,6 +1,6 @@
{
"name": "@shipzone/npmci",
"version": "3.1.80",
"version": "3.1.83",
"private": false,
"description": "node and docker in gitlab ci on steroids",
"main": "dist_ts/index.js",

16
test/test.cloudly.ts Normal file
View 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();

View File

@@ -2,6 +2,7 @@ import { tap, expect } from '@pushrocks/tapbundle';
import * as path from 'path';
process.env.NPMTS_TEST = 'true';
process.env.NPMCI_URL_CLOUDLY = 'localhost'
// set up environment
process.env.CI_REPOSITORY_URL = 'https://yyyyyy:xxxxxxxx@gitlab.com/mygroup/myrepo.git';

View File

@@ -14,9 +14,10 @@ export class CloudlyConnector {
}
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) {
logger.log(
'warn',