Skip to content
This repository was archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
fix: cicd commands
Browse files Browse the repository at this point in the history
  • Loading branch information
arantespp committed May 11, 2021
1 parent acc4039 commit 6b33a38
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProxyHandler } from 'aws-lambda';
import { S3 } from 'aws-sdk';

import { getTriggerPipelinesObjectKey } from '../getTriggerPipelineObjectKey';
import { Pipeline, getPrCommands } from '../pipelines';
import { Pipeline, getPrCommands, getClosedPrCommands } from '../pipelines';

import { executeTasks, shConditionalCommands } from './executeTasks';
import { getProcessEnvVariable } from './getProcessEnvVariable';
Expand Down Expand Up @@ -101,12 +101,15 @@ export const githubWebhooksApiV1Handler: ProxyHandler = async (
);

webhooks.on(['pull_request.closed'], async ({ payload }) => {
/**
* https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html
*/
await executeTasks({
cpu: '256',
memory: '512',
cpu: '512',
commands: [
shConditionalCommands({
conditionalCommands: getPrCommands({
conditionalCommands: getClosedPrCommands({
branch: payload.pull_request.head.ref,
}),
}),
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/deploy/cicd/pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const getPrCommands = ({ branch }: { branch: string }) => [
* Execute tests only on the modified packages.
*/
`npx lerna run "test" --since --stream --parallel`,
/**
* Build only modified packages.
*/
`npx lerna run "build" --since --stream --parallel`,
/**
* Deploy only the modified packages.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"prebuild": "yarn workspace carlin build",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "rm -rf build && yarn build && carlin deploy static-app",
"deploy": "carlin deploy static-app",
"serve": "docusaurus serve",
"clear": "docusaurus clear"
},
Expand Down

0 comments on commit 6b33a38

Please sign in to comment.