adds terraform to pipeline

This commit is contained in:
Victor Barba Martin 2021-11-17 15:19:27 +01:00
parent 894d9f192b
commit 3e5513d2b4
1 changed files with 21 additions and 13 deletions

View File

@ -25,19 +25,27 @@ pipelines:
- hadolint docker/coturn-dns/Dockerfile - hadolint docker/coturn-dns/Dockerfile
branches: branches:
main: main:
- step: - parallel:
name: Build images - step:
script: name: Build images
- docker build . --file docker/coturn/Dockerfile --tag coturn script:
- docker build . --file docker/coturn-dns/Dockerfile --tag coturn-dns - docker build . --file docker/coturn/Dockerfile --tag coturn
- docker save coturn --output "coturn.tar" - docker build . --file docker/coturn-dns/Dockerfile --tag coturn-dns
- docker save coturn-dns --output "coturn-dns.tar" - docker save coturn --output "coturn.tar"
services: - docker save coturn-dns --output "coturn-dns.tar"
- docker services:
caches: - docker
- docker caches:
artifacts: - docker
- "*.tar" artifacts:
- "*.tar"
- step:
name: Deploy terraform
image: hashicorp/terraform:full
script:
- cd terraform/
- terraform init
- terraform plan
- step: - step:
name: Push images name: Push images
image: google/cloud-sdk:alpine image: google/cloud-sdk:alpine