Skip to content

Commit

Permalink
fix: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Klesse committed Dec 20, 2024
1 parent 0805254 commit 590a6cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 29 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ Now Traefik UI will be available at `lb.YOUR_URL` and deploy.party at `YOUR_URL`
Traefik has basic auth lock and can be accessed with the `USERNAME` and `PASSWORD` you set in the init.sh script.

On **local setup**:
- Traefik UI: [http://localhost:8080](http://localhost:8080)
- Deploy Party API: [http://localhost:3000](http://localhost:3000)
- Deploy Party: [http://localhost:3001](http://localhost:3001)
- Deploy Party Terminal API: [http://localhost:3002](http://localhost:3002)
- Minio API: [http://localhost:3003](http://localhost:3003)
- Minio UI: [http://localhost:3004](http://localhost:3004)
- Deploy Party: [http://[IP]:3001](http://[IP]:3001)
- Minio UI: [http://[IP]:3004](http://[IP]:9000)
- Deploy Party API: [http://[IP]:3000](http://[IP]:3000)
- Deploy Party Terminal API: [http://[IP]:3002](http://[IP]:3002)
- Minio API: [http://[IP]:3003](http://[IP]:9001)

## First steps
Default credentails are:
Expand Down
1 change: 1 addition & 0 deletions projects/api/src/server/extern.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class ExternController {
// create build (queue handler will start build)
await this.buildService.create({
container: container.id,
}, {
callbackUrl: input.callbackUrl,
targetVersion: input.targetVersion,
deploymentType: input.deploymentType,
Expand Down
2 changes: 1 addition & 1 deletion projects/api/src/server/modules/build/build.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class BuildResolver {
@GraphQLUser() user: User,
@Args('input') input: BuildCreateInput
): Promise<Build> {
return await this.buildService.create(input, {
return await this.buildService.create(input, null, {
currentUser: user,
fieldSelection: { info, select: 'createBuild' },
inputType: BuildCreateInput
Expand Down
19 changes: 6 additions & 13 deletions projects/api/src/server/modules/build/build.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class BuildService extends CrudService<Build> {
return this.buildQueue.resume();
}

override async create(input: BuildCreateInput, serviceOptions?: ServiceOptions): Promise<Build> {
override async create(input: BuildCreateInput, additionalInfos?: AdditionalBuildInfos, serviceOptions?: ServiceOptions): Promise<Build> {
const lastBuild = await this.getLastBuild(getStringIds(input.container));

if (lastBuild && lastBuild?.status === BuildStatus.QUEUE) {
Expand All @@ -84,25 +84,18 @@ export class BuildService extends CrudService<Build> {
const createdBuild = await super.create(input, serviceOptions);
await this.containerService.update(getStringIds(createdBuild.container), {lastBuild: createdBuild.id})

if (input?.callbackUrl) {
await axios.post(input.callbackUrl, {
if (additionalInfos?.callbackUrl) {
await axios.post(additionalInfos.callbackUrl, {
status: BuildStatus.QUEUE,
deploymentType: input?.deploymentType,
currentVersion: input?.currentVersion,
targetVersion: input?.targetVersion,
duration: 0
duration: 0,
...additionalInfos
});
}

await this.buildQueue.add({
containerId: getStringIds(input.container),
buildId: createdBuild.id,
additionalInfos: {
callbackUrl: input?.callbackUrl,
deploymentType: input?.deploymentType,
currentVersion: input?.currentVersion,
targetVersion: input?.targetVersion
}
additionalInfos
}, {jobId: createdBuild.id});

return createdBuild;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {Field, InputType} from '@nestjs/graphql';
import {IsOptional} from 'class-validator';
import {BuildStatus} from '../enums/build-status.enum';
import {BuildInput} from './build.input';
import {DeploymentType} from "../../container/enums/deployment-type.enum";

/**
* Build create input
Expand Down Expand Up @@ -46,12 +45,4 @@ export class BuildCreateInput extends BuildInput {
})
@IsOptional()
override status?: BuildStatus = undefined;

callbackUrl?: string;

targetVersion?: string;

currentVersion?: string;

deploymentType?: DeploymentType;
}

0 comments on commit 590a6cb

Please sign in to comment.