Skip to content

Commit 0bef5b4

Browse files
remove unneeded examples and make deployment steps a two step process
1 parent 5ce9130 commit 0bef5b4

16 files changed

Lines changed: 509 additions & 1229 deletions

Gitlab-Templatized/.env.example

Lines changed: 98 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
# Local GitLab environment configuration
2-
# These values are for the local Docker-based GitLab instance only.
1+
# =============================================================================
2+
# Local Environment Configuration
3+
# =============================================================================
34
# Copy this file to .env and fill in your values.
5+
# startup-services.ps1 reads these to create Docker containers.
6+
# generate_pipeline.py also reads .env when running locally.
7+
#
8+
# In GitLab CI/CD, set variables in Settings → CI/CD → Variables instead.
9+
# =============================================================================
410

5-
# ── Fixed IP addresses (on gitlab-net 172.30.0.0/24) ──
6-
# Rancher: 172.30.0.10 → host ports 80 / 443
7-
# GitLab: 172.30.0.2 → host ports 8080 / 8443 / 2222
8-
# GitLab Runner: 172.30.0.3 → no host ports
11+
# ── Docker Network (gitlab-net 172.30.0.0/24) ──────────────────────────────
12+
# Rancher: 172.30.0.10 → host ports 80 / 443
13+
# GitLab: 172.30.0.2 → host ports 8080 / 8443 / 2222
14+
# GitLab Runner: 172.30.0.3 → (no host ports)
15+
# SQL Server: 172.30.0.4 → host port 1434
16+
17+
18+
# ═══════════════════════════════════════════════════════════════════════════
19+
# 1. INFRASTRUCTURE (used by startup-services.ps1)
20+
# ═══════════════════════════════════════════════════════════════════════════
921

1022
# ── Rancher ──
1123
RANCHER_BOOTSTRAP_PASSWORD=your_rancher_password
@@ -16,23 +28,95 @@ GITLAB_RUNNER_REGISTRATION_TOKEN=your_runner_registration_token
1628
GITLAB_URL=http://172.30.0.2
1729
GITLAB_EXTERNAL_URL=http://localhost:8080
1830

19-
# SQL Server (SQLEXPRESS) — used by Flyway CI/CD variables
20-
# From Docker containers, use host.docker.internal (Rancher Desktop VM)
31+
# ── SQL Server — Prod (local SQLEXPRESS) ──
32+
# Your existing SQL Express instance. Containers reach it via host.docker.internal.
2133
SQL_HOST=host.docker.internal
2234
SQL_PORT=1433
2335
SQL_USER=sa
2436
SQL_PASSWORD=your_sql_password
2537

26-
# Flyway Pipeline Generator - registry connection
27-
# These map to the same SQL Server used for Flyway targets.
28-
# In GitLab CI/CD, set these as project/group CI/CD variables instead.
29-
REGISTRY_SERVER=host.docker.internal
38+
# ── SQL Server — QA (Docker container on gitlab-net) ──
39+
# Second SQL Server for QA targets and QA registry. SSMS: localhost,1434
40+
SQL2_HOST=172.30.0.4
41+
SQL2_PORT=1434
42+
SQL2_SA_PASSWORD=your_qa_sql_password
43+
44+
45+
# ═══════════════════════════════════════════════════════════════════════════
46+
# 2. FLYWAY PIPELINE (used by generate_pipeline.py and CI/CD jobs)
47+
# ═══════════════════════════════════════════════════════════════════════════
48+
#
49+
# The pipeline generator connects to a flyway_registry database to discover
50+
# deployment targets. QA and Prod each have their own registry on separate
51+
# SQL Servers. The staging-and-production pipeline passes these as
52+
# REGISTRY_* overrides per stage.
53+
#
54+
# ┌─────────────────────────────────────────────────────────────────────┐
55+
# │ CI/CD Variable │ Required │ Where to set │
56+
# ├─────────────────────────────────────────────────────────────────────┤
57+
# │ TARGET_DATABASE_USER │ Yes │ GitLab CI/CD Variables │
58+
# │ TARGET_DATABASE_PASSWORD │ Yes │ GitLab CI/CD (masked) │
59+
# │ QA_REGISTRY_SERVER │ Yes │ GitLab CI/CD Variables │
60+
# │ QA_REGISTRY_USER │ Yes │ GitLab CI/CD Variables │
61+
# │ QA_REGISTRY_PASSWORD │ Yes │ GitLab CI/CD (masked) │
62+
# │ PROD_REGISTRY_SERVER │ Yes │ GitLab CI/CD Variables │
63+
# │ PROD_REGISTRY_USER │ Yes │ GitLab CI/CD Variables │
64+
# │ PROD_REGISTRY_PASSWORD │ Yes │ GitLab CI/CD (masked) │
65+
# │ FLYWAY_EMAIL │ Yes │ GitLab CI/CD Variables │
66+
# │ FLYWAY_TOKEN │ Yes │ GitLab CI/CD (masked) │
67+
# │ │ │ │
68+
# │ TARGET_DATABASE_JDBC │ Schema* │ GitLab CI/CD Variables │
69+
# │ SHADOW_DATABASE_JDBC │ Schema* │ GitLab CI/CD Variables │
70+
# │ SHADOW_DATABASE_USER │ No │ defaults to TARGET_* │
71+
# │ SHADOW_DATABASE_PASSWORD │ No │ defaults to TARGET_* │
72+
# │ QA_REGISTRY_DATABASE │ No │ default: flyway_registry │
73+
# │ QA_REGISTRY_PORT │ No │ default: 1433 │
74+
# │ PROD_REGISTRY_DATABASE │ No │ default: flyway_registry │
75+
# │ PROD_REGISTRY_PORT │ No │ default: 1433 │
76+
# │ JDBC_PORT │ No │ default: 1433 │
77+
# │ FILTER_LOCATION │ No │ default: all │
78+
# │ INCLUDE_REPLICAS │ No │ default: false │
79+
# │ FLYWAY_LOCATIONS │ No │ default: filesystem:./m… │
80+
# │ RUNNER_TAG_MAP │ No │ JSON: {"London":"tag1"} │
81+
# │ RUNNER_TAG_DEFAULT │ No │ single tag for all jobs │
82+
# │ TEMPLATE_PROJECT │ No │ default: root/templati… │
83+
# │ TEMPLATE_REF │ No │ default: main │
84+
# │ GIT_PUSH_TOKEN │ Schema* │ if CI_JOB_TOKEN can't… │
85+
# │ GENERATE_DESCRIPTION │ No │ default: AutoGenerated │
86+
# │ GENERATE_TYPES │ No │ default: versioned,undo │
87+
# │ GITLAB_EXTERNAL_URL │ No │ default: CI_SERVER_URL │
88+
# │ │ │ │
89+
# │ * = required only for schema-model workflow │
90+
# └─────────────────────────────────────────────────────────────────────┘
91+
92+
# ── QA Registry (Docker SQL Server — 172.30.0.4) ──
93+
QA_REGISTRY_SERVER=172.30.0.4
94+
QA_REGISTRY_PORT=1433
95+
QA_REGISTRY_USER=sa
96+
QA_REGISTRY_PASSWORD=your_qa_sql_password
97+
QA_REGISTRY_DATABASE=flyway_registry
98+
99+
# ── Prod Registry (local SQLEXPRESS — host.docker.internal) ──
100+
PROD_REGISTRY_SERVER=host.docker.internal
101+
PROD_REGISTRY_PORT=1433
102+
PROD_REGISTRY_USER=sa
103+
PROD_REGISTRY_PASSWORD=your_sql_password
104+
PROD_REGISTRY_DATABASE=flyway_registry
105+
106+
# ── Legacy single-registry vars (used by generate_pipeline.py default) ──
107+
# When running the simple single-environment pipeline or testing locally.
108+
REGISTRY_SERVER=172.30.0.4
30109
REGISTRY_PORT=1433
31110
REGISTRY_USER=sa
32-
REGISTRY_PASSWORD=your_sql_password
111+
REGISTRY_PASSWORD=your_qa_sql_password
33112
REGISTRY_DATABASE=flyway_registry
34113

114+
115+
# ═══════════════════════════════════════════════════════════════════════════
116+
# 3. FLYWAY LICENSING
117+
# ═══════════════════════════════════════════════════════════════════════════
118+
35119
# Flyway Enterprise licensing (Personal Access Token)
36-
# See: https://documentation.red-gate.com/fd/licensing-164167730.html#Licensing-AccessToken(PAT)
120+
# See: https://documentation.red-gate.com/fd/licensing-164167730.html
37121
FLYWAY_EMAIL=your_email@example.com
38122
FLYWAY_TOKEN=your_flyway_personal_access_token

Gitlab-Templatized/.gitlab/ci/dev.yml

Lines changed: 0 additions & 143 deletions
This file was deleted.

Gitlab-Templatized/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ usage-examples/ # Ready-to-copy .gitlab-ci.yml files for consumer
1818

1919
## How It Works
2020

21+
schema-model-dynamic.gitlab-ci.yml is the pipeline that builds both the YML pipeline and the migration scripts from captured schema model
22+
2123
### Template Overview
2224

2325
| Template | Purpose |

0 commit comments

Comments
 (0)