Skip to content

CICD

Overview

To handle CICD concepts

Technique

  • Remove concurrency build in
# Cancel previous PR builds.
concurrency:
  # Cancel all workflow runs except latest within a concurrency group. This is achieved by defining a concurrency group for the PR.
  # Non-PR builds have singleton concurrency groups.
  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }}
  cancel-in-progress: true

ref: Trino CI

  • Use workflow_dispacth to handle CI
on:
  workflow_dispatch:
  • Using form to handle contruction for element:

Trino Workflow Issue Template

  • Using coverage check element

  • Handle trigger component

Handle the build with related comment at Github discussions #25389

  • CICD to filter actions with the notifications to Affected stakeholders.

Some services can turn ON/OFF by the UI or by code, using the CEL to filter out the actions and send SMS to the Head of Infra

Example: Datastream.

  • Authentication for all pipelines

  • Create document for policy and up-time for all run and functions

  • CD automatic log git Beginner from CodeCamp

  • Add SSL checkpoint for database

Ref: MySQL Cloud Connect Connectors

Ref: Cloud SQL - Postgres Authentication

Note:

TODO: The IAM Authentication just automaticly with Postgres Cloud SQL. For another drivers, such as MySQL Cloud SQL, you required using mannual way

Required for IAM required SSL connection, so we admit it with non-iam user now. This will increase the security layer for database connection

import mysql.connector
from mysql.connector.constants import ClientFlag

config = {
  'user': 'ssluser',
  'password': 'password',
  'host': '127.0.0.1',
  'client_flags': [ClientFlag.SSL],
  'ssl_ca': '/opt/mysql/ssl/ca.pem',
  'ssl_cert': '/opt/mysql/ssl/client-cert.pem',
  'ssl_key': '/opt/mysql/ssl/client-key.pem',
}

cnx = mysql.connector.connect(**config)

Read: MySQL Connector