include:
  - project: 'gaiax/helpers/mono-helpers'
    file:
      - ocm-engine.yml

stages:
  - lint
  - test
  - build
  - release
  - docker
  - registries
  - helm
  - deploy-test

# Lint microservices

lint-agent:
  extends: .lint-agent
  stage: lint

lint-attestation-manager:
  extends: .lint-attestation-manager
  stage: lint

lint-connection-manager:
  extends: .lint-connection-manager
  stage: lint

lint-proof-manager:
  extends: .lint-proof-manager
  stage: lint

lint-gateway:
  extends: .lint-gateway
  stage: lint

# Test microservices

test-agent:
  extends: .test-agent
  stage: test

test-attestation-manager:
  extends: .test-attestation-manager
  stage: test

test-connection-manager:
  extends: .test-connection-manager
  stage: test

test-proof-manager:
  extends: .test-proof-manager
  stage: test

test-gateway:
  extends: .test-gateway
  stage: test

# Bare microservice build

build-agent:
  extends: .build-agent
  stage: build

build-attestation-manager:
  extends: .build-attestation-manager
  stage: build

build-connection-manager:
  extends: .build-connection-manager
  stage: build

build-proof-manager:
  extends: .build-proof-manager
  stage: build

build-gateway:
  extends: .build-gateway
  stage: build

# Docker build microservices

docker-agent:
  extends: .docker-agent
  stage: docker

docker-attestation-manager:
  extends: .docker-attestation-manager
  stage: docker

docker-connection-manager:
  extends: .docker-connection-manager
  stage: docker

docker-proof-manager:
  extends: .docker-proof-manager
  stage: docker

docker-gateway:
  extends: .docker-gateway
  stage: docker

# Push to registries

registry-agent:
  extends: .registry-agent
  stage: registries

registry-attestation-manager:
  extends: .registry-attestation-manager
  stage: registries

registry-connection-manager:
  extends: .registry-connection-manager
  stage: registries

registry-proof-manager:
  extends: .registry-proof-manager
  stage: registries

registry-gateway:
  extends: .registry-gateway
  stage: registries

# Configure helm

helm-agent:
  extends: .helm-agent
  stage: helm

helm-attestation-manager:
  extends: .helm-attestation-manager
  stage: helm

helm-connection-manager:
  extends: .helm-connection-manager
  stage: helm

helm-proof-manager:
  extends: .helm-proof-manager
  stage: helm

helm-gateway:
  extends: .helm-gateway
  stage: helm

deploy agent ocm:
  extends: .deploy-agent-ocm-main
  stage: deploy-test

deploy agent ocm tagged:
  extends: .deploy-agent-ocm-main-tag
  stage: deploy-test

deploy agent ocm test:
  extends: .deploy-agent-ocm-test
  stage: deploy-test

deploy agent ocm test tagged:
  extends: .deploy-agent-ocm-test-tag
  stage: deploy-test

deploy attestation ocm:
  extends: .deploy-attestation-manager-ocm-main
  stage: deploy-test

deploy attestation ocm tagged:
  extends: .deploy-attestation-manager-ocm-main-tag
  stage: deploy-test

deploy attestation ocm test:
  extends: .deploy-attestation-manager-ocm-test
  stage: deploy-test

deploy attestation ocm test tagged:
  extends: .deploy-attestation-manager-ocm-test-tag
  stage: deploy-test

deploy connection ocm:
  extends: .deploy-connection-manager-ocm-main
  stage: deploy-test

deploy connection ocm tagged:
  extends: .deploy-connection-manager-ocm-main-tag
  stage: deploy-test

deploy connection ocm test:
  extends: .deploy-connection-manager-ocm-test
  stage: deploy-test

deploy connection ocm test tagged:
  extends: .deploy-connection-manager-ocm-test-tag
  stage: deploy-test

deploy proof ocm:
  extends: .deploy-proof-manager-ocm-main
  stage: deploy-test

deploy proof ocm tagged:
  extends: .deploy-proof-manager-ocm-main-tag
  stage: deploy-test

deploy proof ocm test:
  extends: .deploy-proof-manager-ocm-test
  stage: deploy-test

deploy proof ocm test tagged:
  extends: .deploy-proof-manager-ocm-test-tag
  stage: deploy-test

deploy gateway ocm:
  extends: .deploy-gateway-ocm-main
  stage: deploy-test

deploy gateway ocm tagged:
  extends: .deploy-gateway-ocm-main-tag
  stage: deploy-test

deploy gateway ocm test:
  extends: .deploy-gateway-ocm-test
  stage: deploy-test

deploy gateway ocm test tagged:
  extends: .deploy-gateway-ocm-test-tag
  stage: deploy-test

commit lint:
  extends: .commit-lint
  stage: lint

changelog:
  extends: .changelog
  stage: release
