Add ci-cd.yml to jam repo
This commit is contained in:
parent
1d0e8c0887
commit
d6542f933a
3 changed files with 61 additions and 5 deletions
57
.gitlab-ci.yml
Normal file
57
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
image:
|
||||
name: hashicorp/terraform:light
|
||||
entrypoint: [""]
|
||||
|
||||
stages:
|
||||
- tf-validate
|
||||
- tf-plan
|
||||
- tf-apply
|
||||
- tf-destroy
|
||||
|
||||
tf-validate:
|
||||
stage: tf-validate
|
||||
script:
|
||||
- terraform init
|
||||
- terraform validate
|
||||
|
||||
tf-plan:
|
||||
stage: tf-plan
|
||||
script:
|
||||
- terraform init
|
||||
- terraform plan -out plan.tfplan
|
||||
artifacts:
|
||||
paths:
|
||||
- plan.tfplan
|
||||
|
||||
tf-apply:
|
||||
stage: tf-apply
|
||||
image:
|
||||
name: hashicorp/terraform
|
||||
entrypoint: [""]
|
||||
before_script:
|
||||
- apk add ansible
|
||||
- ansible-galaxy collection install community.docker
|
||||
script:
|
||||
- terraform init
|
||||
- terraform apply plan.tfplan
|
||||
dependencies:
|
||||
- tf-plan
|
||||
when: manual
|
||||
only:
|
||||
- master
|
||||
|
||||
tf-destroy:
|
||||
stage: tf-destroy
|
||||
image:
|
||||
name: hashicorp/terraform
|
||||
entrypoint: [""]
|
||||
before_script:
|
||||
- apk add ansible
|
||||
script:
|
||||
- terraform init
|
||||
- terraform destroy plan.tfplan
|
||||
dependencies:
|
||||
- tf-plan
|
||||
when: manual
|
||||
only:
|
||||
- master
|
||||
|
|
@ -43,12 +43,12 @@
|
|||
|
||||
- name: Get jamulus
|
||||
get_url:
|
||||
url: https://github.com/jamulussoftware/jamulus/releases/download/r3_9_0/jamulus_headless_3.9.0_ubuntu_amd64.deb
|
||||
dest: /tmp/jamulus_headless_3.9.0_ubuntu_amd64.deb
|
||||
url: https://github.com/jamulussoftware/jamulus/releases/download/r3_9_1/jamulus-headless_3.9.1_ubuntu_amd64.deb
|
||||
dest: /tmp/jamulus_headless_3.9.1_ubuntu_amd64.deb
|
||||
|
||||
- name: Install jamulus
|
||||
apt:
|
||||
deb: /tmp/jamulus_headless_3.9.0_ubuntu_amd64.deb
|
||||
deb: /tmp/jamulus_headless_3.9.1_ubuntu_amd64.deb
|
||||
|
||||
- name: Move jamulus service file
|
||||
copy:
|
||||
|
|
|
|||
3
main.tf
3
main.tf
|
|
@ -1,6 +1,5 @@
|
|||
provider "aws" {
|
||||
region = "eu-west-2"
|
||||
profile = "vereto"
|
||||
}
|
||||
|
||||
terraform {
|
||||
|
|
@ -88,7 +87,7 @@ resource "aws_security_group_rule" "jamulus" {
|
|||
}
|
||||
|
||||
resource "aws_security_group" "node-exporter" {
|
||||
name = "node-exporter-port-access"
|
||||
name = "jam-node-exporter-port-access"
|
||||
description = "Allow jamulus inbound traffic"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue