-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: #8947 yarn 3 workspaces #8961
Merged
Merged
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e02d1c6
feat: added yarn berry option to enum
bashleigh 2a20aa0
feat: added condition for yarn berry install
bashleigh 9798bc6
feat: added option for yarn berry
bashleigh 3673006
chore: updated to node 18
bashleigh 28f68f6
chore: linting
bashleigh 6099cc0
fix: type in tests
bashleigh 483b447
fix: updated snapshots
bashleigh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,14 @@ import { AbstractWorkflow, PusherProvider, SqsProvider, Workflow } from '../even | |
import { SoruceProvider } from './source-provider' | ||
import { CodeBuild } from 'aws-sdk' | ||
import yaml from 'yaml' | ||
import { PackageManagerEnum } from '../pipeline/pipeline-dto' | ||
import { S3Provider } from '../s3' | ||
import { TaskEntity } from '../entities/task.entity' | ||
import { PipelineRunnerProvider } from '../pipeline-runner' | ||
import { plainToClass } from 'class-transformer' | ||
import { BitbucketClientData } from '../entities/bitbucket-client.entity' | ||
import { BitBucketEvent } from '../bitbucket' | ||
import { ParameterProvider } from '../pipeline' | ||
import { PackageManagerEnum } from '@reapit/foundations-ts-definitions/deployment-schema' | ||
|
||
@Workflow(QueueNamesEnum.CODEBUILD_EXECUTOR) | ||
export class CodebuildExecutorWorkflow extends AbstractWorkflow<{ | ||
|
@@ -125,6 +125,19 @@ export class CodebuildExecutorWorkflow extends AbstractWorkflow<{ | |
}) { | ||
const params = await this.parameterProvider.obtainParameters(pipeline.id as string) | ||
|
||
const setupCommands = [ | ||
'n install 14', | ||
'n use 14', | ||
'CACHE_FOLDER=$(find . -maxdepth 1 -mindepth 1 -type d)', | ||
'echo $CACHE_FOLDER', | ||
'mv $CACHE_FOLDER/* ./', | ||
'rm -rf $CACHE_FOLDER', | ||
] | ||
|
||
if (pipeline.packageManager && pipeline.packageManager === PackageManagerEnum.YARN_BERRY) { | ||
setupCommands.push('yarn set version berry') | ||
} | ||
|
||
const start = this.codeBuild.startBuild({ | ||
projectName: process.env.CODE_BUILD_PROJECT_NAME as string, | ||
buildspecOverride: yaml.stringify({ | ||
|
@@ -138,12 +151,7 @@ export class CodebuildExecutorWorkflow extends AbstractWorkflow<{ | |
nodejs: 12, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also Node 12 here! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
}, | ||
commands: [ | ||
'n install 14', | ||
'n use 14', | ||
'CACHE_FOLDER=$(find . -maxdepth 1 -mindepth 1 -type d)', | ||
'echo $CACHE_FOLDER', | ||
'mv $CACHE_FOLDER/* ./', | ||
'rm -rf $CACHE_FOLDER', | ||
...setupCommands, | ||
pipeline.packageManager === PackageManagerEnum.YARN | ||
? pipeline.packageManager | ||
: `${pipeline.packageManager} install`, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Node 18 please? See my prev on tech debt and Node EOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done