Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
f80b8decbc | |||
28cd6d1b49 | |||
899e5b0a7d | |||
0eff7c7510 | |||
7789348f4e | |||
66a23a515b |
@ -13,6 +13,7 @@ env:
|
|||||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||||
NPMCI_LOGIN_DOCKER_GITEA: ${{ github.server_url }}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
|
NPMCI_LOGIN_DOCKER_GITEA: ${{ github.server_url }}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
|
||||||
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }}
|
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }}
|
||||||
|
NPMCI_SECRET01: ${{ secrets.NPMCI_SECRET01 }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security:
|
security:
|
||||||
|
17
changelog.md
17
changelog.md
@ -1,5 +1,22 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2024-11-06 - 4.3.7 - fix(tests)
|
||||||
|
Refactored test setup for consistency and isolated config initialization.
|
||||||
|
|
||||||
|
- test/helpers/cloudlyfactory.ts: Test configuration setup was refactored to ensure consistent initialization of cloudly configuration across tests.
|
||||||
|
- test/test.apiclient.ts: Updated cloudlyApiClient test setup to use testCloudlyConfig for dynamic port allocation.
|
||||||
|
|
||||||
|
## 2024-11-06 - 4.3.6 - fix(test)
|
||||||
|
Enhance test helpers with dynamic Hetzner token retrieval.
|
||||||
|
|
||||||
|
- Updated test/helpers/cloudlyfactory.ts to retrieve Hetzner token from environment variables.
|
||||||
|
- Expanded docker_tags workflow to securely handle and pass new environment secrets.
|
||||||
|
|
||||||
|
## 2024-11-06 - 4.3.5 - fix(helpers)
|
||||||
|
Add missing sslMode configuration to Cloudly config.
|
||||||
|
|
||||||
|
- Added the sslMode key with a value of 'none' to the Cloudly configuration object in test/helpers/cloudlyfactory.ts.
|
||||||
|
|
||||||
## 2024-11-06 - 4.3.4 - fix(testing)
|
## 2024-11-06 - 4.3.4 - fix(testing)
|
||||||
Fixed Cloudly testing setup and dependencies
|
Fixed Cloudly testing setup and dependencies
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/cloudly",
|
"name": "@serve.zone/cloudly",
|
||||||
"version": "4.3.4",
|
"version": "4.3.7",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
|
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -5,29 +5,39 @@ import * as cloudly from '../../ts/index.js';
|
|||||||
|
|
||||||
const stopFunctions: Array<() => Promise<void>> = [];
|
const stopFunctions: Array<() => Promise<void>> = [];
|
||||||
|
|
||||||
export const createCloudly = async () => {
|
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
|
||||||
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
|
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
|
||||||
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
|
stopFunctions.push(async () => {
|
||||||
stopFunctions.push(async () => {
|
|
||||||
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
|
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
|
||||||
});
|
});
|
||||||
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
|
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
|
||||||
await smarts3.createBucket('cloudly-test');
|
await smarts3.createBucket('cloudly-test');
|
||||||
stopFunctions.push(async () => {
|
stopFunctions.push(async () => {
|
||||||
await smarts3.stop();
|
await smarts3.stop();
|
||||||
});
|
});
|
||||||
const cloudlyConfig: cloudly.ICloudlyConfig = {
|
|
||||||
|
export const testCloudlyConfig: cloudly.ICloudlyConfig = {
|
||||||
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
||||||
environment: 'integration',
|
environment: 'integration',
|
||||||
letsEncryptEmail: 'test@serve.zone',
|
letsEncryptEmail: 'test@serve.zone',
|
||||||
publicUrl: 'localhost',
|
publicUrl: '127.0.0.1',
|
||||||
publicPort: '8080',
|
publicPort: '8080',
|
||||||
mongoDescriptor: await smartmongo.getMongoDescriptor(),
|
mongoDescriptor: await smartmongo.getMongoDescriptor(),
|
||||||
s3Descriptor: await smarts3.getS3Descriptor(),
|
s3Descriptor: await smarts3.getS3Descriptor(),
|
||||||
|
sslMode: 'none',
|
||||||
|
...(() => {
|
||||||
|
if (process.env.NPMCI_SECRET01) {
|
||||||
|
return {
|
||||||
|
hetznerToken: process.env.NPMCI_SECRET01,
|
||||||
};
|
};
|
||||||
const cloudlyInstance = new cloudly.Cloudly(cloudlyConfig);
|
}
|
||||||
|
})(),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createCloudly = async () => {
|
||||||
|
const cloudlyInstance = new cloudly.Cloudly(testCloudlyConfig);
|
||||||
return cloudlyInstance;
|
return cloudlyInstance;
|
||||||
}
|
};
|
||||||
|
|
||||||
export const stopCloudly = async () => {
|
export const stopCloudly = async () => {
|
||||||
await Promise.all(stopFunctions.map((stopFunction) => stopFunction()));
|
await Promise.all(stopFunctions.map((stopFunction) => stopFunction()));
|
||||||
@ -35,5 +45,4 @@ export const stopCloudly = async () => {
|
|||||||
|
|
||||||
export const getEnvVarOnDemand = async (envVarName: string) => {
|
export const getEnvVarOnDemand = async (envVarName: string) => {
|
||||||
return testQenv.getEnvVarOnDemand(envVarName);
|
return testQenv.getEnvVarOnDemand(envVarName);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ tap.preTask('should create a new machine user for testing', async () => {
|
|||||||
tap.test('should create a new cloudlyApiClient', async () => {
|
tap.test('should create a new cloudlyApiClient', async () => {
|
||||||
testClient = new cloudlyApiClient.CloudlyApiClient({
|
testClient = new cloudlyApiClient.CloudlyApiClient({
|
||||||
registerAs: 'api',
|
registerAs: 'api',
|
||||||
cloudlyUrl: `http://localhost:${await helpers.getEnvVarOnDemand('SERVEZONE_PORT')}`,
|
cloudlyUrl: `http://localhost:${helpers.testCloudlyConfig.publicPort}`,
|
||||||
});
|
});
|
||||||
await testClient.start();
|
await testClient.start();
|
||||||
expect(testClient).toBeTruthy();
|
expect(testClient).toBeTruthy();
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/cloudly',
|
name: '@serve.zone/cloudly',
|
||||||
version: '4.3.4',
|
version: '4.3.7',
|
||||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/cloudly',
|
name: '@serve.zone/cloudly',
|
||||||
version: '4.3.4',
|
version: '4.3.7',
|
||||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user