Create a IAM user to be used in the pipeline. (Say a user with usernae: deploy)
Assign the following policies to that user:
eks:DescribeClustereks:ListClusters
deploy.yaml
name: Deploy
on:
push:| module.exports = { | |
| env: { | |
| es6: true, | |
| node: true, | |
| }, | |
| parser: "@typescript-eslint/parser", | |
| parserOptions: { | |
| sourceType: "module", | |
| tsconfigRootDir: __dirname, | |
| project: ["./tsconfig.json"], |
| #include <iostream> | |
| #include <fstream> | |
| #include <vector> | |
| #include <stack> | |
| using std::cout; using std::cerr; | |
| using std::endl; using std::string; | |
| using std::ifstream; using std::vector; | |
| using std::stack; | |
| using std::to_string; |
| import { map, Subject, tap } from "rxjs"; | |
| function getBalancedPipeline<T>( | |
| generator: AsyncGenerator<T, void, void>, | |
| pipeline = new Subject<T>() | |
| ) { | |
| pipeline.subscribe({ | |
| next: async () => { | |
| const nextInput = await generator.next(); | |
| if (!nextInput.done) { |
Create a IAM user to be used in the pipeline. (Say a user with usernae: deploy)
Assign the following policies to that user:
eks:DescribeClustereks:ListClustersdeploy.yaml
name: Deploy
on:
push:| FROM ubuntu:20.04 | |
| # Install Node | |
| ENV NODE_VERSION=18.0.0 | |
| RUN apt-get update && apt-get install -y curl | |
| RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash | |
| ENV NVM_DIR=/root/.nvm | |
| RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} | |
| RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} | |
| RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} |
| ... | |
| # Add this as a step to the job in which the branch name is needed | |
| - name: Set affected branch name | |
| id: vars | |
| run: echo ::set-output name=BRANCH_NAME::${GITHUB_REF#refs/*/} | |
| ... | |
| # Use this wherever the branch name is needed | |
| ${{ steps.vars.outputs.BRANCH_NAME }} |
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 |
| name: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure AWS credentials |
I hereby claim:
To claim this, I am signing this object: