This repository was archived by the owner on Jun 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pipelines commands. Update CICD docs
- Loading branch information
Showing
13 changed files
with
200 additions
and
54 deletions.
There are no files selected for viewing
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,6 +5,9 @@ export default { | |
sshKey: './ssh-key', | ||
sshUrl: '[email protected]:ttoss/carlin.git', | ||
taskEnvironment: [ | ||
{ Name: 'NPM_TOKEN', Value: fs.readFileSync('./npmtoken', 'utf-8') }, | ||
{ | ||
name: 'NPM_TOKEN', | ||
value: fs.readFileSync('./npmtoken', 'utf-8'), | ||
}, | ||
], | ||
}; |
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 |
---|---|---|
|
@@ -82,7 +82,7 @@ export const getCicdTemplate = ({ | |
key: string; | ||
versionId: string; | ||
}; | ||
taskEnvironment?: Array<{ Name: string; Value: string }>; | ||
taskEnvironment?: Array<{ name: string; value: string }>; | ||
}): CloudFormationTemplate => { | ||
const resources: CloudFormationTemplate['Resources'] = {}; | ||
|
||
|
@@ -109,14 +109,12 @@ export const getCicdTemplate = ({ | |
}; | ||
|
||
/** | ||
* #### Elastic Container Registry | ||
* | ||
* The algorithm will clone the repository and will create a Docker image | ||
* to be used to perform commands. [Yarn cache](https://classic.yarnpkg.com/en/docs/cli/cache/) | ||
* will also be saved together with the code to reduce tasks installation | ||
* to be used to perform your commands. [Yarn cache](https://classic.yarnpkg.com/en/docs/cli/cache/) | ||
* will also be saved together with the code to reduce packages installation | ||
* time. The created image will be pushed to [Amazon Elastic Container Registry](https://aws.amazon.com/ecr/). | ||
* | ||
* A expiration rule is also defined. The registry only keeps the latest image. | ||
* with a defined expiration rule is also defined. The registry only keeps | ||
* the latest image. | ||
*/ | ||
const getEcrRepositoryResource = () => ({ | ||
Type: 'AWS::ECR::Repository', | ||
|
@@ -258,6 +256,9 @@ export const getCicdTemplate = ({ | |
// Install Yarn | ||
'RUN npm install -g yarn', | ||
|
||
// Install carlin CLI | ||
'RUN npm install -g carlin', | ||
|
||
// Configure git | ||
'RUN git config --global user.name carlin', | ||
'RUN git config --global user.email [email protected]', | ||
|
@@ -367,10 +368,7 @@ export const getCicdTemplate = ({ | |
}; | ||
})(); | ||
|
||
/** | ||
* API | ||
*/ | ||
(() => { | ||
const createApiResources = () => { | ||
resources[API_LOGICAL_ID] = { | ||
Type: 'AWS::Serverless::Api', | ||
Properties: { | ||
|
@@ -542,7 +540,9 @@ export const getCicdTemplate = ({ | |
Timeout: 60, | ||
}, | ||
}; | ||
})(); | ||
}; | ||
|
||
createApiResources(); | ||
|
||
/** | ||
* ECS | ||
|
@@ -635,14 +635,21 @@ export const getCicdTemplate = ({ | |
ContainerDefinitions: [ | ||
{ | ||
Environment: [ | ||
...taskEnvironment, | ||
{ | ||
/** | ||
* https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-metadata.html#enable-metadata | ||
*/ | ||
Name: 'ECS_ENABLE_CONTAINER_METADATA', | ||
Value: 'true', | ||
}, | ||
{ | ||
Name: 'CI', | ||
Value: 'true', | ||
}, | ||
...taskEnvironment.map((te) => ({ | ||
Name: te.name, | ||
Value: te.value, | ||
})), | ||
], | ||
Image: { | ||
'Fn::Sub': [ | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: deploy cicd | ||
--- | ||
|
||
import Api from '../../src/components/Api'; | ||
import OptionAliasesInline from '../../src/components/OptionAliasesInline'; | ||
import OptionHeader from '../../src/components/OptionHeader'; | ||
|
||
import { deployCicdApi } from '../../.docusaurus/carlin/default/deployCicdApi'; | ||
|
||
<Api api={deployCicdApi} /> |
Oops, something went wrong.