Started by timer Obtained Jenkinsfile from git https://github.com/DrPersico/postgresql.git [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/postgres-deploy [Pipeline] { [Pipeline] stage [Pipeline] { (Declarative: Checkout SCM) [Pipeline] checkout Selected Git installation does not exist. Using Default The recommended git tool is: NONE using credential f048d47c-1ea1-4dc6-b81c-f1ec032f0d77 > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/postgres-deploy/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/DrPersico/postgresql.git # timeout=10 Fetching upstream changes from https://github.com/DrPersico/postgresql.git > git --version # timeout=10 > git --version # 'git version 2.47.3' using GIT_ASKPASS to set credentials Github > git fetch --tags --force --progress -- https://github.com/DrPersico/postgresql.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 Checking out Revision ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da (refs/remotes/origin/main) > git config core.sparsecheckout # timeout=10 > git checkout -f ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da # timeout=10 Commit message: "Fix backup container restart loop - add command separators" > git rev-list --no-walk ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da # timeout=10 [Pipeline] } [Pipeline] // stage [Pipeline] withEnv [Pipeline] { [Pipeline] withEnv [Pipeline] { [Pipeline] timeout Timeout set to expire in 20 min [Pipeline] { [Pipeline] timestamps [Pipeline] { [Pipeline] stage [Pipeline] { (Checkout) [Pipeline] script [Pipeline] { [Pipeline] cleanWs [2025-11-22T02:45:17.443Z] [WS-CLEANUP] Deleting project workspace... [2025-11-22T02:45:17.443Z] [WS-CLEANUP] Deferred wipeout is used... [2025-11-22T02:45:17.489Z] [WS-CLEANUP] done [Pipeline] checkout [2025-11-22T02:45:17.692Z] Selected Git installation does not exist. Using Default [2025-11-22T02:45:17.692Z] The recommended git tool is: NONE [2025-11-22T02:45:17.693Z] using credential f048d47c-1ea1-4dc6-b81c-f1ec032f0d77 [2025-11-22T02:45:17.718Z] Cloning the remote Git repository [2025-11-22T02:45:17.718Z] Cloning repository https://github.com/DrPersico/postgresql.git [2025-11-22T02:45:17.719Z] > git init /var/jenkins_home/workspace/postgres-deploy # timeout=10 [2025-11-22T02:45:17.763Z] Fetching upstream changes from https://github.com/DrPersico/postgresql.git [2025-11-22T02:45:17.763Z] > git --version # timeout=10 [2025-11-22T02:45:17.777Z] > git --version # 'git version 2.47.3' [2025-11-22T02:45:17.778Z] using GIT_ASKPASS to set credentials Github [2025-11-22T02:45:17.849Z] > git fetch --tags --force --progress -- https://github.com/DrPersico/postgresql.git +refs/heads/*:refs/remotes/origin/* # timeout=10 [2025-11-22T02:45:23.489Z] > git config remote.origin.url https://github.com/DrPersico/postgresql.git # timeout=10 [2025-11-22T02:45:23.506Z] > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 [2025-11-22T02:45:23.532Z] Avoid second fetch [2025-11-22T02:45:23.532Z] > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 [2025-11-22T02:45:23.549Z] Checking out Revision ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da (refs/remotes/origin/main) [2025-11-22T02:45:23.549Z] > git config core.sparsecheckout # timeout=10 [2025-11-22T02:45:23.564Z] > git checkout -f ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da # timeout=10 [2025-11-22T02:45:23.599Z] Commit message: "Fix backup container restart loop - add command separators" [Pipeline] echo [2025-11-22T02:45:23.676Z] โœ… Code checked out successfully [Pipeline] pwd [Pipeline] echo [2025-11-22T02:45:23.746Z] ๐Ÿ“‚ Working directory: /var/jenkins_home/workspace/postgres-deploy [Pipeline] echo [2025-11-22T02:45:23.811Z] ๐ŸŒฟ Git branch: null [Pipeline] echo [2025-11-22T02:45:23.850Z] ๐Ÿท๏ธ Git commit: ade1f21be3ea31e81a6f387d5d2dfb8a955ff3da [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Validate Configuration) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:45:24.701Z] ๐Ÿ” Validating configuration files... [Pipeline] fileExists [Pipeline] echo [2025-11-22T02:45:24.980Z] โœ… Found: docker-compose.yml [Pipeline] fileExists [Pipeline] echo [2025-11-22T02:45:26.644Z] โœ… Found: postgresql/conf/postgresql.conf [Pipeline] fileExists [Pipeline] echo [2025-11-22T02:45:26.909Z] โœ… Found: postgresql/conf/pg_hba.conf [Pipeline] fileExists [Pipeline] echo [2025-11-22T02:45:27.270Z] โœ… Found: postgresql/init/01-init-database.sh [Pipeline] fileExists [Pipeline] echo [2025-11-22T02:45:27.532Z] โœ… Found: .env.example [Pipeline] sh [2025-11-22T02:45:27.870Z] + echo ๐Ÿณ Validating Docker Compose files... [2025-11-22T02:45:27.871Z] ๐Ÿณ Validating Docker Compose files... [2025-11-22T02:45:27.871Z] + docker-compose -f docker-compose.yml config --quiet [2025-11-22T02:45:27.871Z] time="2025-11-22T02:45:27Z" level=warning msg="The \"POSTGRES_PASSWORD\" variable is not set. Defaulting to a blank string." [2025-11-22T02:45:27.871Z] time="2025-11-22T02:45:27Z" level=warning msg="The \"POSTGRES_PASSWORD\" variable is not set. Defaulting to a blank string." [Pipeline] sh [2025-11-22T02:45:28.448Z] + echo ๐Ÿ—„๏ธ Validating PostgreSQL configuration... [2025-11-22T02:45:28.448Z] ๐Ÿ—„๏ธ Validating PostgreSQL configuration... [2025-11-22T02:45:28.448Z] + grep -E ^(shared_buffers|effective_cache_size|work_mem) postgresql/conf/postgresql.conf [2025-11-22T02:45:28.448Z] shared_buffers = 512MB # 25% of RAM [2025-11-22T02:45:28.448Z] effective_cache_size = 2GB # 50% of RAM [2025-11-22T02:45:28.448Z] work_mem = 8MB # Per connection [Pipeline] sh [2025-11-22T02:45:28.821Z] + echo ๐Ÿ” Checking Jenkins credentials configuration... [2025-11-22T02:45:28.821Z] ๐Ÿ” Checking Jenkins credentials configuration... [2025-11-22T02:45:28.821Z] + echo โ„น๏ธ Note: Make sure you have configured these Jenkins credentials: [2025-11-22T02:45:28.821Z] โ„น๏ธ Note: Make sure you have configured these Jenkins credentials: [2025-11-22T02:45:28.821Z] + echo - postgres-password (Secret Text): Your PostgreSQL password [2025-11-22T02:45:28.822Z] - postgres-password (Secret Text): Your PostgreSQL password [2025-11-22T02:45:28.822Z] + echo - postgres-db (String, optional): Database name (default: postgres) [2025-11-22T02:45:28.822Z] - postgres-db (String, optional): Database name (default: postgres) [2025-11-22T02:45:28.822Z] + echo - postgres-user (String, optional): Database user (default: postgres) [2025-11-22T02:45:28.822Z] - postgres-user (String, optional): Database user (default: postgres) [2025-11-22T02:45:28.822Z] + echo ๐Ÿ“ Configure in: Jenkins โ†’ Manage Jenkins โ†’ Manage Credentials โ†’ (global) [2025-11-22T02:45:28.822Z] ๐Ÿ“ Configure in: Jenkins โ†’ Manage Jenkins โ†’ Manage Credentials โ†’ (global) [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (System Health Check) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:45:29.593Z] ๐Ÿ” Checking system resources... [Pipeline] sh [2025-11-22T02:45:29.890Z] + docker info [2025-11-22T02:45:31.754Z] + echo โœ… Docker is running [2025-11-22T02:45:31.754Z] โœ… Docker is running [2025-11-22T02:45:31.754Z] + echo ๐Ÿ’พ Memory information: [2025-11-22T02:45:31.754Z] ๐Ÿ’พ Memory information: [2025-11-22T02:45:31.754Z] + free -h [2025-11-22T02:45:31.754Z] total used free shared buff/cache available [2025-11-22T02:45:31.754Z] Mem: 7.6Gi 3.9Gi 666Mi 649Mi 4.1Gi 3.7Gi [2025-11-22T02:45:31.754Z] Swap: 0B 0B 0B [2025-11-22T02:45:31.754Z] + echo ๐Ÿ’ฟ Disk space: [2025-11-22T02:45:31.754Z] ๐Ÿ’ฟ Disk space: [2025-11-22T02:45:31.754Z] + df -h . [2025-11-22T02:45:31.754Z] Filesystem Size Used Avail Use% Mounted on [2025-11-22T02:45:31.754Z] /dev/mmcblk0p2 29G 21G 7.4G 74% /var/jenkins_home [2025-11-22T02:45:31.754Z] + echo ๐Ÿ–ฅ๏ธ CPU information: [2025-11-22T02:45:31.754Z] ๐Ÿ–ฅ๏ธ CPU information: [2025-11-22T02:45:31.754Z] + nproc [2025-11-22T02:45:31.754Z] 4 [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy PostgreSQL) [Pipeline] echo [2025-11-22T02:45:33.170Z] Warning, empty changelog. Have you run checkout? [Pipeline] echo [2025-11-22T02:45:33.330Z] Warning, empty changelog. Have you run checkout? [Pipeline] echo [2025-11-22T02:45:33.464Z] Warning, empty changelog. Have you run checkout? [Pipeline] echo [2025-11-22T02:45:33.628Z] Warning, empty changelog. Have you run checkout? [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:45:33.994Z] ๐Ÿš€ Deploying PostgreSQL... [Pipeline] sh [2025-11-22T02:45:34.296Z] + chmod +x postgresql/scripts/backup.sh postgresql/scripts/backup_check.sh postgresql/scripts/deploy.sh [Pipeline] withCredentials [2025-11-22T02:45:34.447Z] Masking supported pattern matches of $POSTGRES_PASSWORD or $POSTGRES_DB or $POSTGRES_USER [Pipeline] { [Pipeline] sh [2025-11-22T02:45:34.846Z] + echo ๐Ÿ”ง Using Jenkins credentials for deployment... [2025-11-22T02:45:34.846Z] ๐Ÿ”ง Using Jenkins credentials for deployment... [2025-11-22T02:45:34.846Z] + export POSTGRES_DB=**** [2025-11-22T02:45:34.846Z] + export POSTGRES_USER=**** [2025-11-22T02:45:34.846Z] + export POSTGRES_PASSWORD=**** [2025-11-22T02:45:34.846Z] + export PROJECT_NAME=Generic PostgreSQL [2025-11-22T02:45:34.846Z] + export PROJECT_SCHEMA=none [2025-11-22T02:45:34.847Z] + export JENKINS_WORKSPACE=/home/geeplo/services/jenkins_home/workspace/****-deploy/****ql [2025-11-22T02:45:34.847Z] + echo ๐Ÿ“‹ Deployment configuration: [2025-11-22T02:45:34.847Z] ๐Ÿ“‹ Deployment configuration: [2025-11-22T02:45:34.847Z] + echo Database: **** [2025-11-22T02:45:34.847Z] Database: **** [2025-11-22T02:45:34.847Z] + echo User: **** [2025-11-22T02:45:34.847Z] User: **** [2025-11-22T02:45:34.847Z] + echo Project: Generic PostgreSQL [2025-11-22T02:45:34.847Z] Project: Generic PostgreSQL [2025-11-22T02:45:34.847Z] + echo Schema: none [2025-11-22T02:45:34.847Z] Schema: none [2025-11-22T02:45:34.847Z] + echo Workspace: /home/geeplo/services/jenkins_home/workspace/****-deploy/****ql [2025-11-22T02:45:34.848Z] Workspace: /home/geeplo/services/jenkins_home/workspace/****-deploy/****ql [2025-11-22T02:45:34.848Z] + echo Password: [REDACTED] [2025-11-22T02:45:34.848Z] Password: [REDACTED] [2025-11-22T02:45:34.848Z] + docker-compose -f docker-compose.yml down [2025-11-22T02:45:35.099Z] Container datashield-backup Stopping [2025-11-22T02:45:51.387Z] Container datashield-backup Stopped [2025-11-22T02:45:51.387Z] Container datashield-backup Removing [2025-11-22T02:45:51.387Z] Container datashield-backup Removed [2025-11-22T02:45:51.387Z] Container ****-**** Stopping [2025-11-22T02:45:51.938Z] Container ****-**** Stopped [2025-11-22T02:45:51.939Z] Container ****-**** Removing [2025-11-22T02:45:51.939Z] Container ****-**** Removed [2025-11-22T02:45:51.939Z] Network ****-deploy_datashield-network Removing [2025-11-22T02:45:51.939Z] Network ****-deploy_datashield-network Resource is still in use [2025-11-22T02:45:51.939Z] + sed s/\${POSTGRES_DB}/****/g docker-compose.yml [2025-11-22T02:45:51.939Z] + sed -i s/\${POSTGRES_USER}/****/g docker-compose.tmp.yml [2025-11-22T02:45:51.939Z] + sed -i s/\${POSTGRES_PASSWORD}/****/g docker-compose.tmp.yml [2025-11-22T02:45:51.939Z] + sed -i s/\${PROJECT_NAME}/Generic PostgreSQL/g docker-compose.tmp.yml [2025-11-22T02:45:51.939Z] + sed -i s/\${PROJECT_SCHEMA}/none/g docker-compose.tmp.yml [2025-11-22T02:45:51.940Z] + sed -i s|\${JENKINS_WORKSPACE:-./****ql}|/home/geeplo/services/jenkins_home/workspace/****-deploy/****ql|g docker-compose.tmp.yml [2025-11-22T02:45:51.940Z] + docker-compose -f docker-compose.tmp.yml up -d **** [2025-11-22T02:45:52.191Z] Container ****-**** Creating [2025-11-22T02:45:53.535Z] **** Your kernel does not support memory limit capabilities or the cgroup is not mounted. Limitation discarded. [2025-11-22T02:45:53.536Z] **** Your kernel does not support memory soft limit capabilities or the cgroup is not mounted. Limitation discarded. [2025-11-22T02:45:53.536Z] Container ****-**** Created [2025-11-22T02:45:53.536Z] Container ****-**** Starting [2025-11-22T02:45:56.766Z] Container ****-**** Started [2025-11-22T02:45:56.766Z] + echo โณ Waiting for PostgreSQL to be ready... [2025-11-22T02:45:56.766Z] โณ Waiting for PostgreSQL to be ready... [2025-11-22T02:45:56.766Z] + docker exec ****-**** pg_isready -U **** -d **** [2025-11-22T02:45:56.767Z] + echo โณ Waiting for PostgreSQL (attempt {1..60}/60)... [2025-11-22T02:45:56.767Z] โณ Waiting for PostgreSQL (attempt {1..60}/60)... [2025-11-22T02:45:56.767Z] + sleep 2 [2025-11-22T02:45:58.630Z] + docker exec ****-**** pg_isready -U **** -d **** [2025-11-22T02:45:58.881Z] /var/run/****ql:5432 - accepting connections [2025-11-22T02:45:58.882Z] + docker-compose -f docker-compose.tmp.yml up -d ****-backup [2025-11-22T02:45:59.133Z] Container ****-**** Running [2025-11-22T02:45:59.133Z] Container datashield-backup Creating [2025-11-22T02:46:01.617Z] Container datashield-backup Created [2025-11-22T02:46:01.618Z] Container ****-**** Waiting [2025-11-22T02:46:02.169Z] Container ****-**** Healthy [2025-11-22T02:46:02.169Z] Container datashield-backup Starting [2025-11-22T02:46:03.081Z] Container datashield-backup Started [2025-11-22T02:46:03.082Z] + rm docker-compose.tmp.yml [Pipeline] } [Pipeline] // withCredentials [Pipeline] echo [2025-11-22T02:46:03.570Z] โœ… PostgreSQL deployed successfully [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Verify Deployment) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:04.641Z] ๐Ÿ” Verifying deployment... [Pipeline] withCredentials [2025-11-22T02:46:04.848Z] Masking supported pattern matches of $POSTGRES_PASSWORD or $POSTGRES_DB or $POSTGRES_USER [Pipeline] { [Pipeline] sh [2025-11-22T02:46:05.291Z] + export POSTGRES_DB=**** [2025-11-22T02:46:05.292Z] + export POSTGRES_USER=**** [2025-11-22T02:46:05.292Z] + export PGPASSWORD=**** [2025-11-22T02:46:05.292Z] + echo ๐Ÿณ Container status: [2025-11-22T02:46:05.292Z] ๐Ÿณ Container status: [2025-11-22T02:46:05.292Z] + docker ps [2025-11-22T02:46:05.292Z] + grep **** [2025-11-22T02:46:05.292Z] b2f6b19ed9b2 ****:18-alpine "docker-entrypoint.sโ€ฆ" 7 seconds ago Up 2 seconds 5432/tcp datashield-backup [2025-11-22T02:46:05.293Z] 43c4a0615d1e ****:18-alpine "docker-entrypoint.sโ€ฆ" 13 seconds ago Up 11 seconds (healthy) 0.0.0.0:5432->5432/tcp, [::]:5432->5432/tcp ****-**** [2025-11-22T02:46:05.293Z] + echo ๐Ÿ”— Testing database connection... [2025-11-22T02:46:05.293Z] ๐Ÿ”— Testing database connection... [2025-11-22T02:46:05.293Z] + docker exec -e PGPASSWORD=**** ****-**** psql -h localhost -U **** -d **** -c SELECT 1 as connection_test; [2025-11-22T02:46:05.544Z] connection_test [2025-11-22T02:46:05.544Z] ----------------- [2025-11-22T02:46:05.544Z] 1 [2025-11-22T02:46:05.544Z] (1 row) [2025-11-22T02:46:05.545Z] [2025-11-22T02:46:05.545Z] + echo ๐Ÿ“Š Database statistics: [2025-11-22T02:46:05.545Z] ๐Ÿ“Š Database statistics: [2025-11-22T02:46:05.545Z] + docker exec -e PGPASSWORD=**** ****-**** psql -h localhost -U **** -d **** -c [2025-11-22T02:46:05.545Z] SELECT [2025-11-22T02:46:05.545Z] 'total schemas' as check, [2025-11-22T02:46:05.545Z] COUNT(*)::text as result [2025-11-22T02:46:05.545Z] FROM information_schema.schemata [2025-11-22T02:46:05.545Z] WHERE schema_name NOT IN ('information_schema', 'pg_catalog'); [2025-11-22T02:46:05.545Z] [2025-11-22T02:46:06.097Z] check | result [2025-11-22T02:46:06.097Z] ---------------+-------- [2025-11-22T02:46:06.097Z] total schemas | 2 [2025-11-22T02:46:06.097Z] (1 row) [2025-11-22T02:46:06.097Z] [2025-11-22T02:46:06.097Z] + echo ๐Ÿ’พ Testing backup system... [2025-11-22T02:46:06.097Z] ๐Ÿ’พ Testing backup system... [2025-11-22T02:46:06.097Z] + docker exec ****-backup /scripts/backup_check.sh [2025-11-22T02:46:06.097Z] Error response from daemon: No such container: ****-backup [2025-11-22T02:46:06.098Z] + echo โš ๏ธ Backup check not available (container might be starting) [2025-11-22T02:46:06.098Z] โš ๏ธ Backup check not available (container might be starting) [Pipeline] } [Pipeline] // withCredentials [Pipeline] echo [2025-11-22T02:46:06.511Z] โœ… Deployment verification completed [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Performance Test) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:08.869Z] โšก Running performance tests... [Pipeline] withCredentials [2025-11-22T02:46:09.122Z] Masking supported pattern matches of $POSTGRES_PASSWORD or $POSTGRES_DB or $POSTGRES_USER [Pipeline] { [Pipeline] sh [2025-11-22T02:46:09.541Z] + export POSTGRES_DB=**** [2025-11-22T02:46:09.542Z] + export POSTGRES_USER=**** [2025-11-22T02:46:09.542Z] + export PGPASSWORD=**** [2025-11-22T02:46:09.542Z] + echo ๐Ÿ“ˆ Running basic performance queries... [2025-11-22T02:46:09.542Z] ๐Ÿ“ˆ Running basic performance queries... [2025-11-22T02:46:09.542Z] + docker exec -e PGPASSWORD=**** ****-**** psql -h localhost -U **** -d **** -c [2025-11-22T02:46:09.542Z] -- Test basic query performance [2025-11-22T02:46:09.542Z] EXPLAIN ANALYZE SELECT 1 as test_query; [2025-11-22T02:46:09.542Z] [2025-11-22T02:46:09.542Z] -- Test system catalog performance [2025-11-22T02:46:09.542Z] EXPLAIN ANALYZE SELECT COUNT(*) FROM information_schema.tables; [2025-11-22T02:46:09.542Z] [2025-11-22T02:46:09.542Z] -- Test connection info [2025-11-22T02:46:09.543Z] SELECT database_name, process_count FROM ( [2025-11-22T02:46:09.543Z] SELECT datname as database_name, COUNT(*) as process_count [2025-11-22T02:46:09.543Z] FROM pg_stat_activity [2025-11-22T02:46:09.543Z] GROUP BY datname [2025-11-22T02:46:09.543Z] ) as activity_stats; [2025-11-22T02:46:09.543Z] [2025-11-22T02:46:09.794Z] QUERY PLAN [2025-11-22T02:46:09.794Z] --------------------------------------------------------------------------------------- [2025-11-22T02:46:09.794Z] Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.005..0.011 rows=1.00 loops=1) [2025-11-22T02:46:09.794Z] Planning: [2025-11-22T02:46:09.794Z] Buffers: shared hit=3 [2025-11-22T02:46:09.794Z] Planning Time: 0.233 ms [2025-11-22T02:46:09.794Z] Execution Time: 0.147 ms [2025-11-22T02:46:09.794Z] (5 rows) [2025-11-22T02:46:09.794Z] [2025-11-22T02:46:09.795Z] QUERY PLAN [2025-11-22T02:46:09.795Z] -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [2025-11-22T02:46:09.795Z] Aggregate (cost=71.97..71.98 rows=1 width=8) (actual time=11.703..11.754 rows=1.00 loops=1) [2025-11-22T02:46:09.795Z] Buffers: shared hit=28 read=12 [2025-11-22T02:46:09.795Z] -> Hash Left Join (cost=36.66..71.69 rows=112 width=0) (actual time=7.963..11.240 rows=215.00 loops=1) [2025-11-22T02:46:09.795Z] Hash Cond: (c.reloftype = t.oid) [2025-11-22T02:46:09.795Z] Buffers: shared hit=28 read=12 [2025-11-22T02:46:09.796Z] -> Hash Join (cost=1.09..34.58 rows=112 width=4) (actual time=0.687..2.964 rows=215.00 loops=1) [2025-11-22T02:46:09.796Z] Hash Cond: (c.relnamespace = nc.oid) [2025-11-22T02:46:09.796Z] Buffers: shared hit=22 read=1 [2025-11-22T02:46:09.796Z] -> Seq Scan on pg_class c (cost=0.00..32.67 rows=150 width=8) (actual time=0.109..1.324 rows=215.00 loops=1) [2025-11-22T02:46:09.796Z] Filter: ((relkind = ANY ('{r,v,f,p}'::"char"[])) AND (pg_has_role(relowner, 'USAGE'::text) OR has_table_privilege(oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text))) [2025-11-22T02:46:09.796Z] Rows Removed by Filter: 202 [2025-11-22T02:46:09.796Z] Buffers: shared hit=13 read=1 [2025-11-22T02:46:09.796Z] -> Hash (cost=1.05..1.05 rows=3 width=4) (actual time=0.482..0.489 rows=4.00 loops=1) [2025-11-22T02:46:09.797Z] Buckets: 1024 Batches: 1 Memory Usage: 9kB [2025-11-22T02:46:09.797Z] Buffers: shared hit=9 [2025-11-22T02:46:09.797Z] -> Seq Scan on pg_namespace nc (cost=0.00..1.05 rows=3 width=4) (actual time=0.189..0.428 rows=4.00 loops=1) [2025-11-22T02:46:09.797Z] Filter: (NOT pg_is_other_temp_schema(oid)) [2025-11-22T02:46:09.797Z] Buffers: shared hit=9 [2025-11-22T02:46:09.797Z] -> Hash (cost=27.29..27.29 rows=662 width=4) (actual time=7.200..7.221 rows=639.00 loops=1) [2025-11-22T02:46:09.797Z] Buckets: 1024 Batches: 1 Memory Usage: 31kB [2025-11-22T02:46:09.797Z] Buffers: shared hit=6 read=11 [2025-11-22T02:46:09.797Z] -> Hash Join (cost=1.09..27.29 rows=662 width=4) (actual time=0.288..5.416 rows=639.00 loops=1) [2025-11-22T02:46:09.797Z] Hash Cond: (t.typnamespace = nt.oid) [2025-11-22T02:46:09.797Z] Buffers: shared hit=6 read=11 [2025-11-22T02:46:09.798Z] -> Seq Scan on pg_type t (cost=0.00..22.62 rows=662 width=8) (actual time=0.062..1.819 rows=639.00 loops=1) [2025-11-22T02:46:09.798Z] Buffers: shared hit=5 read=11 [2025-11-22T02:46:09.798Z] -> Hash (cost=1.04..1.04 rows=4 width=4) (actual time=0.173..0.180 rows=4.00 loops=1) [2025-11-22T02:46:09.798Z] Buckets: 1024 Batches: 1 Memory Usage: 9kB [2025-11-22T02:46:09.798Z] Buffers: shared hit=1 [2025-11-22T02:46:09.798Z] -> Seq Scan on pg_namespace nt (cost=0.00..1.04 rows=4 width=4) (actual time=0.116..0.129 rows=4.00 loops=1) [2025-11-22T02:46:09.798Z] Buffers: shared hit=1 [2025-11-22T02:46:09.798Z] Planning: [2025-11-22T02:46:09.798Z] Buffers: shared hit=332 read=14 [2025-11-22T02:46:09.798Z] Planning Time: 14.504 ms [2025-11-22T02:46:09.798Z] Execution Time: 13.485 ms [2025-11-22T02:46:09.798Z] (35 rows) [2025-11-22T02:46:09.798Z] [2025-11-22T02:46:09.798Z] database_name | process_count [2025-11-22T02:46:09.799Z] ---------------+--------------- [2025-11-22T02:46:09.799Z] | 8 [2025-11-22T02:46:09.799Z] **** | 1 [2025-11-22T02:46:09.799Z] authentik | 5 [2025-11-22T02:46:09.799Z] (3 rows) [2025-11-22T02:46:09.799Z] [Pipeline] } [Pipeline] // withCredentials [Pipeline] echo [2025-11-22T02:46:10.167Z] โœ… Performance tests completed [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Create Backup) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:11.236Z] ๐Ÿ’พ Creating deployment backup: jenkins_backup_20251122_024611.sql [Pipeline] withCredentials [2025-11-22T02:46:11.414Z] Masking supported pattern matches of $POSTGRES_PASSWORD or $POSTGRES_DB or $POSTGRES_USER [Pipeline] { [Pipeline] sh [2025-11-22T02:46:11.599Z] Warning: A secret was passed to "sh" using Groovy String interpolation, which is insecure. [2025-11-22T02:46:11.599Z] Affected argument(s) used the following variable(s): [POSTGRES_DB] [2025-11-22T02:46:11.599Z] See https://jenkins.io/redirect/groovy-string-interpolation for details. [2025-11-22T02:46:11.862Z] + export POSTGRES_DB=**** [2025-11-22T02:46:11.862Z] + export POSTGRES_USER=**** [2025-11-22T02:46:11.862Z] + export PGPASSWORD=**** [2025-11-22T02:46:11.862Z] + mkdir -p jenkins_backups [2025-11-22T02:46:11.862Z] + docker exec -e PGPASSWORD=**** ****-**** pg_dump -h localhost -U **** -d **** --format=custom --compress=9 --file=/tmp/jenkins_backup_20251122_024611.sql [2025-11-22T02:46:13.207Z] + docker cp ****-****:/tmp/jenkins_backup_20251122_024611.sql jenkins_backups/ [2025-11-22T02:46:13.207Z] + cd jenkins_backups [2025-11-22T02:46:13.208Z] + sha256sum jenkins_backup_20251122_024611.sql [2025-11-22T02:46:13.208Z] + echo โœ… Backup created: jenkins_backup_20251122_024611.sql [2025-11-22T02:46:13.208Z] โœ… Backup created: jenkins_backup_20251122_024611.sql [2025-11-22T02:46:13.208Z] + ls -lh jenkins_backup_20251122_024611.sql [2025-11-22T02:46:13.208Z] -rw-r--r-- 1 root root 6.9K Nov 22 02:46 jenkins_backup_20251122_024611.sql [Pipeline] } [Pipeline] // withCredentials [Pipeline] archiveArtifacts [2025-11-22T02:46:15.106Z] Archiving artifacts [2025-11-22T02:46:15.113Z] Recording fingerprints [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:16.267Z] ๐Ÿ“‹ Pipeline completed with status: SUCCESS [Pipeline] echo [2025-11-22T02:46:16.349Z] [2025-11-22T02:46:16.349Z] ๐ŸŽฏ PostgreSQL Deployment Pipeline [2025-11-22T02:46:16.349Z] ๐Ÿ“… Build: 28 [2025-11-22T02:46:16.349Z] ๐ŸŒฟ Branch: null [2025-11-22T02:46:16.349Z] ๐Ÿท๏ธ Commit: ade1f21b [2025-11-22T02:46:16.349Z] โฑ๏ธ Duration: 1 min 15 sec and counting [2025-11-22T02:46:16.349Z] โœ… Status: SUCCESS [2025-11-22T02:46:16.349Z] [Pipeline] sh [2025-11-22T02:46:16.698Z] + find jenkins_backups -name *.sql -type f [2025-11-22T02:46:16.698Z] + sort -r [2025-11-22T02:46:16.698Z] + tail -n +6 [2025-11-22T02:46:16.698Z] + xargs rm -f [Pipeline] } [Pipeline] // script [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:17.285Z] ๐ŸŽ‰ PostgreSQL deployment successful! [Pipeline] } [Pipeline] // script [Pipeline] script [Pipeline] { [Pipeline] echo [2025-11-22T02:46:17.753Z] ๐Ÿงน Cleaning up workspace... [Pipeline] sh [2025-11-22T02:46:18.100Z] + rm -f *.tmp [Pipeline] echo [2025-11-22T02:46:18.228Z] โœ… Keeping containers running for automated backups (main branch or production) [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // timeout [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline Finished: SUCCESS