Setting up CI
This commit is contained in:
parent
3b82fd333f
commit
ab61f0eb4e
|
@ -1,20 +0,0 @@
|
|||
version: 2
|
||||
workflows:
|
||||
version: 2
|
||||
ci:
|
||||
jobs:
|
||||
- build_and_deploy:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
tags:
|
||||
ignore: /.*/
|
||||
jobs:
|
||||
build_and_deploy:
|
||||
machine:
|
||||
image: ubuntu-2004:202010-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: tools/ci-bootstrap.bash
|
||||
no_output_timeout: 2h
|
|
@ -0,0 +1,21 @@
|
|||
name: Build and deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build and deploy
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
DOCKER_REPO: 084011155226.dkr.ecr.us-west-1.amazonaws.com/riju
|
||||
S3_BUCKET: riju
|
||||
run: |
|
||||
make image shell I=ci CMD="tools/ci-bootstrap.bash"
|
|
@ -10,4 +10,6 @@ set -a
|
|||
. "${root}/.env"
|
||||
set +a
|
||||
|
||||
cd "${root}/packer"
|
||||
|
||||
exec packer "$@"
|
||||
|
|
|
@ -10,4 +10,6 @@ set -a
|
|||
. "${root}/.env"
|
||||
set +a
|
||||
|
||||
cd "${root}/tf"
|
||||
|
||||
exec terraform "$@"
|
||||
|
|
|
@ -63,7 +63,7 @@ resource "aws_launch_template" "server" {
|
|||
device_name = "/dev/sdh"
|
||||
ebs {
|
||||
volume_type = "gp3"
|
||||
volume_size = 125
|
||||
volume_size = 256
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,7 @@ set -euo pipefail
|
|||
|
||||
: ${AWS_ACCESS_KEY_ID}
|
||||
: ${AWS_SECRET_ACCESS_KEY}
|
||||
: ${DEPLOY_SSH_PRIVATE_KEY}
|
||||
: ${DOCKER_PASSWORD}
|
||||
: ${DOCKER_REPO}
|
||||
: ${DOCKER_USERNAME}
|
||||
: ${DOMAIN}
|
||||
: ${S3_BUCKET}
|
||||
|
||||
make image shell I=ci CMD="tools/ci-run.bash"
|
||||
|
|
Loading…
Reference in New Issue