Skip to content
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

ci: automatically creates an EC2 instance for builds #220

Merged
merged 156 commits into from
Apr 26, 2021
Merged

Conversation

fakirAyoub
Copy link
Contributor

@fakirAyoub fakirAyoub commented Apr 22, 2021

Automatic creation of an EC2 instance to host the build and tests in the CI workflow

Each build has its own EC2 instance

Copy link
Member

@mrq1911 mrq1911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fakirAyoub the runner should be removed from repository after instance destroy

here's API reference https://docs.github.com/en/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository

seems like you cannot rerun action of the same commit without removing runner 1st

@mrq1911 mrq1911 self-requested a review April 25, 2021 11:50
Copy link
Member

@mrq1911 mrq1911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git has to be part of the runner environment so that action can clone repo by using it

see error in https://github.com/galacticcouncil/HydraDX-node/runs/2431407553

@jak-pan jak-pan changed the title feat: automatically creates an EC2 instance for builds ci: automatically creates an EC2 instance for builds Apr 25, 2021
@auto-add-label auto-add-label bot added area/ci and removed type/enhancement New feature or request labels Apr 25, 2021
@mrq1911 mrq1911 merged commit 8762b4a into master Apr 26, 2021
mrq1911 pushed a commit that referenced this pull request Apr 28, 2021
* ci: run on aws

* ci: run always

* branching draft - deploy EC2 from CI

* commands inside of workflow

* use terraform

* go to the right directory for terraform

* where am I

* go to the right directory for terraform

* node error

* node error

* checkout action

* switch lib

* setup terraform CLI

* setup terraform CLI

* setup terraform CLI

* where am I

* infra dir

* infra dir

* infra dir

* infra dir

* apply infra

* separate run commands

* separate run commands

* separate run commands

* workspace select

* workspace select

* fix terraform file

* using ssh key

* adding security group

* add key

* add connection

* fix pem path

* add host

* add key

* add key

* remove agent

* fix paths

* remove key

* with custom AMI

* key name

* test

* new AMI image

* add plan

* add plan

* add ssh type

* user data

* user data

* agent to false

* bootstrap runner

* variable name

* with user data

* test

* wrap

* aws image

* update access to instance

* access token

* fix path

* runner image

* runner not blocking

* runner not blocking

* runner not blocking

* runner not blocking

* run bash

* run bash

* run

* run

* run

* run

* run

* add run conf

* run conf

* run conf

* run build on the newly created instance

* run build on the newly created instance

* sleep between steps

* sleep between steps

* runs on aws

* runs on aws

* runs on aws

* check build

* check build

* check build

* check build

* check build

* check build

* check build

* needs

* needs

* needs

* needs

* needs

* needs

* ref

* ref

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* dynamic branch name

* with destroy

* with destroy

* with destroy

* with destroy

* with destroy

* with destroy

* with destroy

* with wait

* test destroy

* test destroy

* test destroy

* test destroy

* variabilise s3 bucket key

* trigger

* trigger

* trigger

* trigger

* trigger

* trigger

* trigger

* trigger

* trigger

* trigger with build

* trigger with build

* removed init.sh

* ☠️ test sabotage

* to hash commit

* to hash commit

* to hash commit

* to hash commit

* to hash commit

* to hash commit

* destroy runs anyway

* release

* release

* release

* always run destroy

* Revert "☠️ test sabotage"

This reverts commit bd294be

* merge master

* Revert "merge master"

This reverts commit 6cd0675

* merged ci changes from master

* new EC2 instance image with git 2.31

* remove redundant init

* remove redundant init

Co-authored-by: Lumir Mrkva <[email protected]>
Co-authored-by: Ayoub <[email protected]>
Co-authored-by: Lumir Mrkva <[email protected]>

(cherry picked from commit 8762b4a)
@jak-pan jak-pan deleted the aws-runner branch January 21, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants