Skip to content

Commit

Permalink
Merge pull request #143 from jobtome-labs/feat/cloud-run-and-gcr
Browse files Browse the repository at this point in the history
Container Registry Push/Override and Cloud Run Templates
  • Loading branch information
daniel-toncu authored Feb 23, 2023
2 parents f1d065c + fab9f66 commit 6c6a8db
Show file tree
Hide file tree
Showing 55 changed files with 263 additions and 168 deletions.
2 changes: 1 addition & 1 deletion bucket-production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/bucket-quality.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/bucket-quality.yml'

deploy:production:
extends: .deploy
Expand Down
2 changes: 1 addition & 1 deletion bucket-quality.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/bucket.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/bucket.yml'

deploy:quality:
extends: .deploy
Expand Down
37 changes: 27 additions & 10 deletions cloudrun-production.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
---
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/cloudrun-quality.yml'
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/cloudrun.yml"

deploy:production:
extends: deploy:quality
extends: .cloudrun:deploy

variables:
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION}
ENVIRONMENT: production
CLUSTER_NAME: ${CLUSTER_NAME_PRODUCTION}
CLUSTER_ZONE: ${CLUSTER_ZONE_PRODUCTION}
ENV: ${ENV_PRODUCTION}
DOMAIN: "${SERVICE_NAME}.${NAMESPACE}.example.com"
SECRET_YAML: "${SECRET_YAML_PRODUCTION}"
CONFIGMAP_PATH: "${CONFIGMAP_PATH_PRODUCTION}"
DOMAIN: ${DOMAIN_PRODUCTION}

GOOGLE_PROJECT: ${GOOGLE_PROJECT_PRODUCTION}
REGION: ${REGION_PRODUCTION}
GOOGLE_KEY: ${GOOGLE_KEY_PRODUCTION}
SERVICE_NAME: ${SERVICE_NAME_PRODUCTION}
PLATFORM: ${PLATFORM_PRODUCTION}
GAR_IMAGE: ${GAR_IMAGE_PRODUCTION}
IMAGE_TAG: ${CI_COMMIT_TAG}

SERVICE_ACCOUNT: ${SERVICE_ACCOUNT_PRODUCTION}
CONNECTIVITY: ${CONNECTIVITY_PRODUCTION}
TIMEOUT: ${TIMEOUT_PRODUCTION}
CONCURRENCY: ${CONCURRENCY_PRODUCTION}
CPU: ${CPU_PRODUCTION}
MEMORY: ${MEMORY_PRODUCTION}
MAX_INSTANCES: ${MAX_INSTANCES_PRODUCTION}
ENV_FILE_PATH: ${ENV_FILE_PATH_PRODUCTION}
SECRETS: ${SECRETS_PRODUCTION}
INGRESS: ${INGRESS_PRODUCTION}

only:
- /^v.+$/i
except:
- branches
- branches
37 changes: 26 additions & 11 deletions cloudrun-quality.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
---
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/docker.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/cloudrun.yml'
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/cloudrun.yml"

deploy:quality:
extends: .cloudrun:deploy

variables:
GOOGLE_KEY: ${GOOGLE_KEY_QUALITY}
CI_COMMIT_TAG: ${CI_COMMIT_SHORT_SHA}
ENVIRONMENT: quality
CLUSTER_NAME: ${CLUSTER_NAME_QUALITY}
CLUSTER_ZONE: ${CLUSTER_ZONE_QUALITY}
ENV: ${ENV_QUALITY}
DOMAIN: "${SERVICE_NAME}.${NAMESPACE}.example.com"
SECRET_YAML: "${SECRET_YAML_QUALITY}"
CONFIGMAP_PATH: "${CONFIGMAP_PATH_QUALITY}"
DOMAIN: ${DOMAIN_QUALITY}

GOOGLE_PROJECT: ${GOOGLE_PROJECT_QUALITY}
REGION: ${REGION_QUALITY}
GOOGLE_KEY: ${GOOGLE_KEY_QUALITY}
SERVICE_NAME: ${SERVICE_NAME_QUALITY}
PLATFORM: ${PLATFORM_QUALITY}
GAR_IMAGE: ${GAR_IMAGE_QUALITY}
IMAGE_TAG: ${CI_COMMIT_SHORT_SHA}

SERVICE_ACCOUNT: ${SERVICE_ACCOUNT_QUALITY}
CONNECTIVITY: ${CONNECTIVITY_QUALITY}
TIMEOUT: ${TIMEOUT_QUALITY}
CONCURRENCY: ${CONCURRENCY_QUALITY}
CPU: ${CPU_QUALITY}
MEMORY: ${MEMORY_QUALITY}
MAX_INSTANCES: ${MAX_INSTANCES_QUALITY}
ENV_FILE_PATH: ${ENV_FILE_PATH_QUALITY}
SECRETS: ${SECRETS_QUALITY}
INGRESS: ${INGRESS_QUALITY}

only:
- master
- /^qa.+$/i
- /^qa.+$/i
29 changes: 29 additions & 0 deletions container-registry-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/container-registry-push.yml"

container-registry:push:quality:
extends: .container-registry:push

stage: push

variables:
IMAGE_TAG: ${CI_COMMIT_SHORT_SHA}

only:
- master
- main
- /^qa.+$/i

container-registry:push:production:
extends: .container-registry:push

stage: push

variables:
IMAGE_TAG: ${CI_COMMIT_TAG}

only:
- /^v.+$/i
except:
- branches
2 changes: 1 addition & 1 deletion dataflow-production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/dataflow-quality.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/dataflow-quality.yml'

deploy:production:dataflow:
extends: .deploy:dataflow
Expand Down
2 changes: 1 addition & 1 deletion dataflow-quality.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/dataflow.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/dataflow.yml'

deploy:quality:dataflow:
extends: .deploy:dataflow
Expand Down
2 changes: 1 addition & 1 deletion docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/docker.yml"

build:
stage: build
Expand Down
2 changes: 1 addition & 1 deletion endpoints-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/endpoints-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/endpoints-quality.yml"

# EUROPE

Expand Down
2 changes: 1 addition & 1 deletion endpoints-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/endpoints.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/endpoints.yml"

endpoints:validate:quality:
extends: .endpoints:validate
Expand Down
2 changes: 1 addition & 1 deletion endpoints-regional.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/endpoints-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/endpoints-quality.yml"

endpoints:validate:production:
extends: .endpoints:validate
Expand Down
2 changes: 1 addition & 1 deletion endpoints-validate.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/endpoints.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/endpoints.yml"

endpoints:validate:
extends: .endpoints:validate
Expand Down
2 changes: 1 addition & 1 deletion helm-fullstack-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-fullstack-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-fullstack-quality.yml"

# EUROPE

Expand Down
4 changes: 2 additions & 2 deletions helm-fullstack-quality.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/helm.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/helm.yml"

deploy:helm:api:quality:
extends: .deploy:quality:helm
Expand Down
2 changes: 1 addition & 1 deletion helm-fullstack-regional.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-fullstack-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-fullstack-quality.yml"

deploy:helm:api:production:
extends: .deploy:production:helm
Expand Down
2 changes: 1 addition & 1 deletion helm-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-quality.yml"

# EUROPE

Expand Down
2 changes: 1 addition & 1 deletion helm-only-internal.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/helm.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/helm.yml"

deploy:internal:helm:
extends: .deploy:internal:helm
Expand Down
2 changes: 1 addition & 1 deletion helm-only-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-only-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-only-quality.yml"

# EUROPE
deploy:production:europe:helm:
Expand Down
2 changes: 1 addition & 1 deletion helm-only-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/helm.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/helm.yml"

deploy:quality:helm:
extends: .deploy:quality:helm
Expand Down
2 changes: 1 addition & 1 deletion helm-only-regional.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-only-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-only-quality.yml"

deploy:production:helm:
extends: .deploy:production:helm
Expand Down
4 changes: 2 additions & 2 deletions helm-quality.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/helm.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/docker.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/helm.yml"

deploy:quality:helm:
extends: .deploy:quality:helm
Expand Down
2 changes: 1 addition & 1 deletion helm-regional.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/helm-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/helm-quality.yml"

deploy:production:helm:
extends: .deploy:production:helm
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/kubernetes-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/kubernetes-quality.yml"

# EUROPE
deploy:production:europe:image:
Expand Down
4 changes: 2 additions & 2 deletions kubernetes-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/docker.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/kubernetes.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/docker.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/kubernetes.yml'

deploy:quality:image:
extends: .deploy:image
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-regional.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/kubernetes-quality.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/kubernetes-quality.yml'

deploy:production:image:
extends: .deploy:image
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-task-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/kubernetes-task-quality.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/kubernetes-task-quality.yml'

task:production:europe:
extends: .task
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-task-production.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/kubernetes-task-quality.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/kubernetes-task-quality.yml'

task:production:
extends: .task
Expand Down
2 changes: 1 addition & 1 deletion kubernetes-task-quality.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/kubernetes-task.yml'
- remote: 'https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/kubernetes-task.yml'

task:quality:
extends: .task
Expand Down
2 changes: 1 addition & 1 deletion lint-generic.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/lint.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/lint.yml"

lint:
extends: .lint
Expand Down
2 changes: 1 addition & 1 deletion lint-go.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/lint.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/lint.yml"

lint:go:
extends: .lint
Expand Down
2 changes: 1 addition & 1 deletion lint-javascript.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/lint.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/lint.yml"

lint:eslint:
extends: .lint
Expand Down
2 changes: 1 addition & 1 deletion lint-python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/lint.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/lint.yml"

lint:python:
extends: .lint
Expand Down
2 changes: 1 addition & 1 deletion lint-typescript.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/lint.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/lint.yml"

lint:typecheck:
extends: .lint
Expand Down
6 changes: 6 additions & 0 deletions override-container-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
variables:
CI_REGISTRY: ${CONTAINER_REGISTRY_URL}
CI_REGISTRY_USER: ${CONTAINER_REGISTRY_USERNAME}
CI_REGISTRY_PASSWORD: ${CONTAINER_REGISTRY_PASSWORD}
CI_REGISTRY_IMAGE: ${CONTAINER_REGISTRY_IMAGE_FULL_PATH}
2 changes: 1 addition & 1 deletion sast.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/sast.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/sast.yml"

sast:
extends: .sast
Expand Down
2 changes: 1 addition & 1 deletion secrets-multiregion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/secrets-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/secrets-quality.yml"

# EUROPE
deploy:production:europe:secrets:
Expand Down
2 changes: 1 addition & 1 deletion secrets-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/templates/secrets.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/templates/secrets.yml"

deploy:quality:secrets:
extends: .deploy:quality:secrets
Expand Down
2 changes: 1 addition & 1 deletion secrets-regional.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
include:
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.21.0/secrets-quality.yml"
- remote: "https://raw.githubusercontent.com/jobtome-labs/ci-templates/v3.22.0/secrets-quality.yml"

deploy:production:secrets:
extends: .deploy:production:secrets
Expand Down
Loading

0 comments on commit 6c6a8db

Please sign in to comment.