Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
79db68a4a2 | |||
5a3ddcf39b | |||
fe6bfc0a83 | |||
36a481ecd1 | |||
f7b2e203ed | |||
27c98c4e32 | |||
79257908d0 | |||
b5ca898eac | |||
53ade28931 | |||
fff4c7642d | |||
dafe6574cc | |||
b70dad4996 | |||
17b0b50fbd | |||
91a0272ab3 | |||
efd22d4087 | |||
c9e32540bf | |||
8344f96983 | |||
3b77089d79 | |||
b6bce76043 | |||
cab57ab303 | |||
804f1f3b12 | |||
f0144fdd5b | |||
81f286cb2f | |||
1f12cb9f94 | |||
26490e8ddd | |||
38d2120c35 | |||
f80b8decbc | |||
28cd6d1b49 | |||
899e5b0a7d | |||
0eff7c7510 |
@ -10,9 +10,10 @@ env:
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_LOGIN_DOCKER_GITEA: ${{ github.server_url }}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
|
||||
# NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
# NPMCI_LOGIN_DOCKER_GITEA: ${{ github.server_url }}|${{ gitea.repository_owner }}|${{ secrets.GITEA_TOKEN }}
|
||||
NPMCI_LOGIN_DOCKER_DOCKERREGISTRY: ${{ secrets.NPMCI_LOGIN_DOCKER_DOCKERREGISTRY }}
|
||||
NPMCI_SECRET01: ${{ secrets.NPMCI_SECRET01 }}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
@ -74,7 +75,7 @@ jobs:
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: code.foss.global/hosttoday/ht-docker-dbase:npmci
|
||||
image: code.foss.global/host.today/ht-docker-dbase:npmci
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -89,8 +90,7 @@ jobs:
|
||||
npmci docker login
|
||||
npmci docker build
|
||||
npmci docker test
|
||||
# npmci docker push
|
||||
npmci docker push
|
||||
npmci docker push code.foss.global
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
|
@ -1,6 +1,6 @@
|
||||
# gitzone dockerfile_service
|
||||
## STAGE 1 // BUILD
|
||||
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node1
|
||||
FROM code.foss.global/host.today/ht-docker-node:npmci as node1
|
||||
COPY ./ /app
|
||||
WORKDIR /app
|
||||
ARG NPMCI_TOKEN_NPM2
|
||||
@ -12,7 +12,7 @@ RUN pnpm run build
|
||||
|
||||
# gitzone dockerfile_service
|
||||
## STAGE 2 // install production
|
||||
FROM code.foss.global/hosttoday/ht-docker-node:npmci as node2
|
||||
FROM code.foss.global/host.today/ht-docker-node:npmci as node2
|
||||
WORKDIR /app
|
||||
COPY --from=node1 /app /app
|
||||
RUN rm -rf .pnpm-store
|
||||
@ -24,7 +24,7 @@ RUN rm -rf node_modules/ && pnpm install --prod
|
||||
|
||||
|
||||
## STAGE 3 // rebuild dependencies for alpine
|
||||
FROM code.foss.global/hosttoday/ht-docker-node:alpinenpmci as node3
|
||||
FROM code.foss.global/host.today/ht-docker-node:alpine_npmci as node3
|
||||
WORKDIR /app
|
||||
COPY --from=node2 /app /app
|
||||
ARG NPMCI_TOKEN_NPM2
|
||||
@ -34,7 +34,7 @@ RUN pnpm config set store-dir .pnpm-store
|
||||
RUN pnpm rebuild -r
|
||||
|
||||
## STAGE 4 // the final production image with all dependencies in place
|
||||
FROM code.foss.global/hosttoday/ht-docker-node:alpine as node4
|
||||
FROM code.foss.global/host.today/ht-docker-node:alpine as node4
|
||||
WORKDIR /app
|
||||
COPY --from=node3 /app /app
|
||||
|
||||
|
86
changelog.md
86
changelog.md
@ -1,5 +1,91 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-11-18 - 4.3.20 - fix(apiclient)
|
||||
Ensure mandatory parameter in CloudlyApiClient constructor
|
||||
|
||||
- Made the 'optionsArg' parameter mandatory in the constructor of CloudlyApiClient class.
|
||||
|
||||
## 2024-11-18 - 4.3.19 - fix(docker)
|
||||
Fix improper Docker push command preventing push to the correct registry.
|
||||
|
||||
- Corrected the docker push command in the '.gitea/workflows/docker_tags.yaml' file to push images to the 'code.foss.global' registry.
|
||||
|
||||
## 2024-11-17 - 4.3.18 - fix(docker_tags)
|
||||
Updated Docker configuration to include NPM tokens.
|
||||
|
||||
- Restored NPMCI_TOKEN_NPM and NPMCI_TOKEN_NPM2 environment variables in docker_tags.yaml for authentication purposes.
|
||||
|
||||
## 2024-11-17 - 4.3.17 - fix(Dockerfile)
|
||||
Corrected docker base image tag in Dockerfile for alpine compatibility.
|
||||
|
||||
- Updated Dockerfile to use the correct base image tag for Alpine.
|
||||
- Resolved any potential build issues related to incorrect image tag usage.
|
||||
|
||||
## 2024-11-17 - 4.3.16 - fix(infrastructure)
|
||||
Correct Docker image path in Dockerfile for improved build consistency.
|
||||
|
||||
- Dockerfile: Updated base image paths from 'code.foss.global/hosttoday/ht-docker-node' to 'code.foss.global/host.today/ht-docker-node'.
|
||||
|
||||
## 2024-11-17 - 4.3.15 - fix(project setup)
|
||||
fixed incorrect configuration in npmextra.json
|
||||
|
||||
- Removed unnecessary 'dockerBuildargEnvMap' entry for NPMCI_TOKEN_NPM2.
|
||||
- Corrected the githost and gitscope in gitzone module configuration.
|
||||
- Updated the license field to reflect the correct license.
|
||||
|
||||
## 2024-11-16 - 4.3.14 - fix(docker tags)
|
||||
Comment out unused secret variables in docker_tags.yaml
|
||||
|
||||
- Modified docker_tags.yaml to comment out unused secret variables related to NPM and GitHub tokens.
|
||||
|
||||
## 2024-11-16 - 4.3.13 - fix(package)
|
||||
Updated package dependencies
|
||||
|
||||
- Updated @design.estate/dees-catalog version to 1.3.1
|
||||
|
||||
## 2024-11-06 - 4.3.12 - fix(workflow)
|
||||
Fix Docker image path in GitHub action workflow
|
||||
|
||||
- Corrected the path of the Docker image used in the GitHub action workflow from 'code.foss.global/hosttoday/ht-docker-dbase:npmci' to 'code.foss.global/host.today/ht-docker-dbase:npmci'.
|
||||
|
||||
## 2024-11-06 - 4.3.11 - fix(overall)
|
||||
Refactor and improve code consistency across all modules
|
||||
|
||||
- Updated cloud configuration management for better reliability.
|
||||
- Enhanced security measures in the authentication and authorization processes.
|
||||
- Streamlined deployment logic in cluster management.
|
||||
- Refactored code to improve maintainability and readability.
|
||||
|
||||
## 2024-11-06 - 4.3.10 - fix(dependencies)
|
||||
Updated dependencies and fixed Docker Alpine image retrieval issue in tests
|
||||
|
||||
- Updated @push.rocks/tapbundle to version ^5.5.0 in devDependencies.
|
||||
- Updated @push.rocks/smartrequest to version ^2.0.23 in dependencies.
|
||||
- Ensured the Docker Alpine image is retrieved as a local tarball in cloudlyfactory.ts test helper.
|
||||
|
||||
## 2024-11-06 - 4.3.9 - fix(test and dependencies)
|
||||
Corrected cloudlyUrl in test.apiclient and updated tapbundle dependency.
|
||||
|
||||
- Fixed cloudlyUrl assignment in the test.apiclient to use the correct helper method.
|
||||
- Updated tapbundle dependency version from ^5.4.3 to ^5.4.4.
|
||||
|
||||
## 2024-11-06 - 4.3.8 - fix(api client)
|
||||
Fixed localhost URL issue in test.client.ts
|
||||
|
||||
- Changed the cloudlyUrl in test.client.ts from 'localhost' to '127.0.0.1' to ensure consistency in network requests.
|
||||
|
||||
## 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.
|
||||
|
||||
|
@ -6,19 +6,17 @@
|
||||
"dockerRegistryRepoMap": {
|
||||
"code.foss.global": "serve.zone/cloudly"
|
||||
},
|
||||
"dockerBuildargEnvMap": {
|
||||
"NPMCI_TOKEN_NPM2": "NPMCI_TOKEN_NPM2"
|
||||
}
|
||||
"dockerBuildargEnvMap": {}
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "service",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "servezone/private",
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "serve.zone",
|
||||
"gitrepo": "cloudly",
|
||||
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
|
||||
"npmPackagename": "@serve.zone/cloudly",
|
||||
"license": "UNLICENSED",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"multi-cloud management",
|
||||
"Docker Swarmkit",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@serve.zone/cloudly",
|
||||
"version": "4.3.5",
|
||||
"version": "4.3.20",
|
||||
"private": false,
|
||||
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
|
||||
"type": "module",
|
||||
@ -28,7 +28,7 @@
|
||||
"@git.zone/tspublish": "^1.7.7",
|
||||
"@git.zone/tstest": "^1.0.90",
|
||||
"@git.zone/tswatch": "^2.0.25",
|
||||
"@push.rocks/tapbundle": "^5.4.3",
|
||||
"@push.rocks/tapbundle": "^5.5.0",
|
||||
"@types/node": "^22.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -40,7 +40,7 @@
|
||||
"@apiclient.xyz/docker": "^1.2.7",
|
||||
"@apiclient.xyz/hetznercloud": "^1.2.0",
|
||||
"@apiclient.xyz/slack": "^3.0.9",
|
||||
"@design.estate/dees-catalog": "^1.2.0",
|
||||
"@design.estate/dees-catalog": "^1.3.1",
|
||||
"@design.estate/dees-domtools": "^2.0.64",
|
||||
"@design.estate/dees-element": "^2.0.39",
|
||||
"@git.zone/tsrun": "^1.3.3",
|
||||
@ -65,7 +65,7 @@
|
||||
"@push.rocks/smartlog-interfaces": "^3.0.2",
|
||||
"@push.rocks/smartpath": "^5.0.18",
|
||||
"@push.rocks/smartpromise": "^4.0.4",
|
||||
"@push.rocks/smartrequest": "^2.0.22",
|
||||
"@push.rocks/smartrequest": "^2.0.23",
|
||||
"@push.rocks/smartrx": "^3.0.7",
|
||||
"@push.rocks/smartssh": "^2.0.1",
|
||||
"@push.rocks/smartstate": "^2.0.19",
|
||||
|
811
pnpm-lock.yaml
generated
811
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -5,30 +5,41 @@ import * as cloudly from '../../ts/index.js';
|
||||
|
||||
const stopFunctions: Array<() => Promise<void>> = [];
|
||||
|
||||
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
|
||||
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
|
||||
stopFunctions.push(async () => {
|
||||
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
|
||||
});
|
||||
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
|
||||
await smarts3.createBucket('cloudly-test');
|
||||
stopFunctions.push(async () => {
|
||||
await smarts3.stop();
|
||||
});
|
||||
|
||||
export const testCloudlyConfig: cloudly.ICloudlyConfig = {
|
||||
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
||||
environment: 'integration',
|
||||
letsEncryptEmail: 'test@serve.zone',
|
||||
publicUrl: '127.0.0.1',
|
||||
publicPort: '8080',
|
||||
mongoDescriptor: await smartmongo.getMongoDescriptor(),
|
||||
s3Descriptor: await smarts3.getS3Descriptor(),
|
||||
sslMode: 'none',
|
||||
...(() => {
|
||||
if (process.env.NPMCI_SECRET01) {
|
||||
return {
|
||||
hetznerToken: process.env.NPMCI_SECRET01,
|
||||
};
|
||||
}
|
||||
})(),
|
||||
};
|
||||
|
||||
await tapToolsNodeMod.tapNodeTools.testFileProvider.getDockerAlpineImageAsLocalTarball();
|
||||
|
||||
export const createCloudly = async () => {
|
||||
const tapToolsNodeMod = await import('@push.rocks/tapbundle/node');
|
||||
const smartmongo = await tapToolsNodeMod.tapNodeTools.createSmartmongo();
|
||||
stopFunctions.push(async () => {
|
||||
await smartmongo.stopAndDumpToDir('./.nogit/mongodump');
|
||||
});
|
||||
const smarts3 = await tapToolsNodeMod.tapNodeTools.createSmarts3();
|
||||
await smarts3.createBucket('cloudly-test');
|
||||
stopFunctions.push(async () => {
|
||||
await smarts3.stop();
|
||||
});
|
||||
const cloudlyConfig: cloudly.ICloudlyConfig = {
|
||||
cfToken: await testQenv.getEnvVarOnDemand('CF_TOKEN'),
|
||||
environment: 'integration',
|
||||
letsEncryptEmail: 'test@serve.zone',
|
||||
publicUrl: 'localhost',
|
||||
publicPort: '8080',
|
||||
mongoDescriptor: await smartmongo.getMongoDescriptor(),
|
||||
s3Descriptor: await smarts3.getS3Descriptor(),
|
||||
sslMode: 'none',
|
||||
};
|
||||
const cloudlyInstance = new cloudly.Cloudly(cloudlyConfig);
|
||||
const cloudlyInstance = new cloudly.Cloudly(testCloudlyConfig);
|
||||
return cloudlyInstance;
|
||||
}
|
||||
};
|
||||
|
||||
export const stopCloudly = async () => {
|
||||
await Promise.all(stopFunctions.map((stopFunction) => stopFunction()));
|
||||
@ -36,5 +47,4 @@ export const stopCloudly = async () => {
|
||||
|
||||
export const getEnvVarOnDemand = async (envVarName: string) => {
|
||||
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 () => {
|
||||
testClient = new cloudlyApiClient.CloudlyApiClient({
|
||||
registerAs: 'api',
|
||||
cloudlyUrl: `http://localhost:${await helpers.getEnvVarOnDemand('SERVEZONE_PORT')}`,
|
||||
cloudlyUrl: `http://${helpers.testCloudlyConfig.publicUrl}:${helpers.testCloudlyConfig.publicPort}`,
|
||||
});
|
||||
await testClient.start();
|
||||
expect(testClient).toBeTruthy();
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/cloudly',
|
||||
version: '4.3.5',
|
||||
version: '4.3.20',
|
||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export class CloudlyApiClient {
|
||||
plugins.servezoneInterfaces.requests.server.IRequest_TriggerServerAction['request']
|
||||
>();
|
||||
|
||||
constructor(optionsArg?: {
|
||||
constructor(optionsArg: {
|
||||
registerAs: TClientType;
|
||||
cloudlyUrl?: string;
|
||||
}) {
|
||||
|
@ -8,6 +8,11 @@ export interface IDeploymentDirective {
|
||||
id: string;
|
||||
name: string;
|
||||
imageClaim: string;
|
||||
/**
|
||||
* ports to be exposed
|
||||
* hostPort is the port on the host
|
||||
* containerPort is the port on the container
|
||||
*/
|
||||
ports: { hostPort: number; containerPort: number }[];
|
||||
environment: { [key: string]: string };
|
||||
resources?: IServiceRessources;
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/cloudly',
|
||||
version: '4.3.5',
|
||||
version: '4.3.20',
|
||||
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