Started by user Admin User Obtained Jenkinsfile from git https://github.com/DrPersico/authentik.git [Pipeline] Start of Pipeline [Pipeline] node Running on Jenkins in /var/jenkins_home/workspace/authentik-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/authentik-deploy/.git # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/DrPersico/authentik.git # timeout=10 Fetching upstream changes from https://github.com/DrPersico/authentik.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/authentik.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 Checking out Revision 1d0af07320a2d67c557ae3a8aaac3e690720d40e (refs/remotes/origin/main) > git config core.sparsecheckout # timeout=10 > git checkout -f 1d0af07320a2d67c557ae3a8aaac3e690720d40e # timeout=10 Commit message: "Remove env_file from docker-compose.yml for Jenkins compatibility" > git rev-list --no-walk 257f5905c669ce41bdfd4ef085167099a67bc31d # timeout=10 [Pipeline] } [Pipeline] // stage [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 15:03:26 [2025-11-14T15:03:26.039Z] [WS-CLEANUP] Deleting project workspace... 15:03:26 [2025-11-14T15:03:26.039Z] [WS-CLEANUP] Deferred wipeout is used... 15:03:26 [2025-11-14T15:03:26.057Z] [WS-CLEANUP] done [Pipeline] checkout 15:03:26 [2025-11-14T15:03:26.157Z] Selected Git installation does not exist. Using Default 15:03:26 [2025-11-14T15:03:26.158Z] The recommended git tool is: NONE 15:03:26 [2025-11-14T15:03:26.158Z] using credential f048d47c-1ea1-4dc6-b81c-f1ec032f0d77 15:03:26 [2025-11-14T15:03:26.170Z] Cloning the remote Git repository 15:03:26 [2025-11-14T15:03:26.170Z] Cloning repository https://github.com/DrPersico/authentik.git 15:03:26 [2025-11-14T15:03:26.171Z] > git init /var/jenkins_home/workspace/authentik-deploy # timeout=10 15:03:26 [2025-11-14T15:03:26.199Z] Fetching upstream changes from https://github.com/DrPersico/authentik.git 15:03:26 [2025-11-14T15:03:26.200Z] > git --version # timeout=10 15:03:26 [2025-11-14T15:03:26.212Z] > git --version # 'git version 2.47.3' 15:03:26 [2025-11-14T15:03:26.212Z] using GIT_ASKPASS to set credentials Github 15:03:26 [2025-11-14T15:03:26.232Z] > git fetch --tags --force --progress -- https://github.com/DrPersico/authentik.git +refs/heads/*:refs/remotes/origin/* # timeout=10 15:03:27 [2025-11-14T15:03:27.326Z] > git config remote.origin.url https://github.com/DrPersico/authentik.git # timeout=10 15:03:27 [2025-11-14T15:03:27.339Z] > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10 15:03:27 [2025-11-14T15:03:27.358Z] Avoid second fetch 15:03:27 [2025-11-14T15:03:27.358Z] > git rev-parse refs/remotes/origin/main^{commit} # timeout=10 15:03:27 [2025-11-14T15:03:27.373Z] Checking out Revision 1d0af07320a2d67c557ae3a8aaac3e690720d40e (refs/remotes/origin/main) 15:03:27 [2025-11-14T15:03:27.373Z] > git config core.sparsecheckout # timeout=10 15:03:27 [2025-11-14T15:03:27.385Z] > git checkout -f 1d0af07320a2d67c557ae3a8aaac3e690720d40e # timeout=10 15:03:27 [2025-11-14T15:03:27.409Z] Commit message: "Remove env_file from docker-compose.yml for Jenkins compatibility" [Pipeline] echo 15:03:27 [2025-11-14T15:03:27.469Z] βœ… Code checked out successfully [Pipeline] pwd [Pipeline] echo 15:03:27 [2025-11-14T15:03:27.518Z] πŸ“‚ Working directory: /var/jenkins_home/workspace/authentik-deploy [Pipeline] echo 15:03:27 [2025-11-14T15:03:27.577Z] 🌿 Git branch: null [Pipeline] echo 15:03:27 [2025-11-14T15:03:27.677Z] 🏷️ Git commit: 1d0af073 [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Validate Configuration) [Pipeline] script [Pipeline] { [Pipeline] echo 15:03:28 [2025-11-14T15:03:28.518Z] πŸ” Validating configuration files... [Pipeline] fileExists [Pipeline] echo 15:03:28 [2025-11-14T15:03:28.705Z] βœ… Found: docker-compose.yml [Pipeline] fileExists [Pipeline] echo 15:03:28 [2025-11-14T15:03:28.895Z] βœ… Found: .env.example [Pipeline] sh 15:03:29 [2025-11-14T15:03:29.218Z] + echo 🐳 Validating Docker Compose files... 15:03:29 [2025-11-14T15:03:29.218Z] 🐳 Validating Docker Compose files... 15:03:29 [2025-11-14T15:03:29.218Z] + export PG_PASS=validation_dummy_password 15:03:29 [2025-11-14T15:03:29.218Z] + export AUTHENTIK_SECRET_KEY=validation_dummy_secret_key_min_60_chars_aaaaaaaaaaaaaaaaaaaaaa 15:03:29 [2025-11-14T15:03:29.218Z] + docker compose -f docker-compose.yml config --quiet 15:03:29 [2025-11-14T15:03:29.469Z] + echo βœ… Docker Compose syntax is valid 15:03:29 [2025-11-14T15:03:29.469Z] βœ… Docker Compose syntax is valid [Pipeline] sh 15:03:29 [2025-11-14T15:03:29.832Z] + echo πŸ” Checking Jenkins credentials configuration... 15:03:29 [2025-11-14T15:03:29.832Z] πŸ” Checking Jenkins credentials configuration... 15:03:29 [2025-11-14T15:03:29.832Z] + echo ℹ️ Note: Make sure you have configured these Jenkins credentials: 15:03:29 [2025-11-14T15:03:29.832Z] ℹ️ Note: Make sure you have configured these Jenkins credentials: 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-pg-pass (Secret Text): PostgreSQL password 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-pg-pass (Secret Text): PostgreSQL password 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-secret-key (Secret Text): Authentik secret key (60+ chars) 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-secret-key (Secret Text): Authentik secret key (60+ chars) 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-pg-db (String, optional): Database name (default: authentik) 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-pg-db (String, optional): Database name (default: authentik) 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-pg-user (String, optional): Database user (default: authentik) 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-pg-user (String, optional): Database user (default: authentik) 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-postgres-host (String, optional): PostgreSQL host (default: postgres-postgres) 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-postgres-host (String, optional): PostgreSQL host (default: postgres-postgres) 15:03:29 [2025-11-14T15:03:29.832Z] + echo - authentik-postgres-port (String, optional): PostgreSQL port (default: 5432) 15:03:29 [2025-11-14T15:03:29.832Z] - authentik-postgres-port (String, optional): PostgreSQL port (default: 5432) 15:03:29 [2025-11-14T15:03:29.832Z] + echo πŸ“ Configure in: Jenkins β†’ Manage Jenkins β†’ Manage Credentials β†’ (global) 15:03:29 [2025-11-14T15:03:29.832Z] πŸ“ 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 15:03:30 [2025-11-14T15:03:30.395Z] πŸ” Checking system resources... [Pipeline] sh 15:03:30 [2025-11-14T15:03:30.687Z] + docker info 15:03:30 [2025-11-14T15:03:30.687Z] WARNING: No memory limit support 15:03:30 [2025-11-14T15:03:30.687Z] WARNING: No swap limit support 15:03:30 [2025-11-14T15:03:30.687Z] + echo βœ… Docker is running 15:03:30 [2025-11-14T15:03:30.687Z] βœ… Docker is running 15:03:30 [2025-11-14T15:03:30.687Z] + echo πŸ’Ύ Memory information: 15:03:30 [2025-11-14T15:03:30.687Z] πŸ’Ύ Memory information: 15:03:30 [2025-11-14T15:03:30.687Z] + free -h 15:03:30 [2025-11-14T15:03:30.687Z] total used free shared buff/cache available 15:03:30 [2025-11-14T15:03:30.687Z] Mem: 7.6Gi 2.2Gi 336Mi 75Mi 5.4Gi 5.4Gi 15:03:30 [2025-11-14T15:03:30.687Z] Swap: 0B 0B 0B 15:03:30 [2025-11-14T15:03:30.687Z] + echo πŸ’Ώ Disk space: 15:03:30 [2025-11-14T15:03:30.687Z] πŸ’Ώ Disk space: 15:03:30 [2025-11-14T15:03:30.687Z] + df -h . 15:03:30 [2025-11-14T15:03:30.687Z] Filesystem Size Used Avail Use% Mounted on 15:03:30 [2025-11-14T15:03:30.687Z] /dev/mmcblk0p2 29G 19G 8.6G 69% /var/jenkins_home 15:03:30 [2025-11-14T15:03:30.687Z] + echo πŸ–₯️ CPU information: 15:03:30 [2025-11-14T15:03:30.687Z] πŸ–₯️ CPU information: 15:03:30 [2025-11-14T15:03:30.687Z] + nproc 15:03:30 [2025-11-14T15:03:30.687Z] 4 [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Verify Database) [Pipeline] script [Pipeline] { [Pipeline] echo 15:03:31 [2025-11-14T15:03:31.794Z] πŸ—„οΈ Verifying Authentik database exists in PostgreSQL... [Pipeline] withCredentials 15:03:32 [2025-11-14T15:03:32.099Z] Masking supported pattern matches of $PG_PASS or $PG_DB or $PG_USER or $POSTGRES_HOST [Pipeline] { [Pipeline] sh 15:03:32 [2025-11-14T15:03:32.505Z] + export PG_DB=**** 15:03:32 [2025-11-14T15:03:32.505Z] + export PG_USER=**** 15:03:32 [2025-11-14T15:03:32.505Z] + export POSTGRES_HOST=**** 15:03:32 [2025-11-14T15:03:32.505Z] + export PGPASSWORD=**** 15:03:32 [2025-11-14T15:03:32.506Z] + echo πŸ” Checking if PostgreSQL server is running... 15:03:32 [2025-11-14T15:03:32.506Z] πŸ” Checking if PostgreSQL server is running... 15:03:32 [2025-11-14T15:03:32.506Z] + docker exec **** pg_isready 15:03:32 [2025-11-14T15:03:32.506Z] + echo βœ… PostgreSQL server is running 15:03:32 [2025-11-14T15:03:32.506Z] βœ… PostgreSQL server is running 15:03:32 [2025-11-14T15:03:32.507Z] + echo ℹ️ Checking if database and user already exist... 15:03:32 [2025-11-14T15:03:32.507Z] ℹ️ Checking if database and user already exist... 15:03:32 [2025-11-14T15:03:32.507Z] + docker exec -u postgres **** psql -tAc SELECT 1 FROM pg_database WHERE datname=**** 15:03:32 [2025-11-14T15:03:32.758Z] + echo 0 15:03:32 [2025-11-14T15:03:32.758Z] + DB_EXISTS=0 15:03:32 [2025-11-14T15:03:32.758Z] + [ 0 = 1 ] 15:03:32 [2025-11-14T15:03:32.759Z] + echo ❌ Database **** does not exist - it should have been created manually 15:03:32 [2025-11-14T15:03:32.759Z] ❌ Database **** does not exist - it should have been created manually 15:03:32 [2025-11-14T15:03:32.759Z] + echo ℹ️ Run this on the PostgreSQL server: 15:03:32 [2025-11-14T15:03:32.759Z] ℹ️ Run this on the PostgreSQL server: 15:03:32 [2025-11-14T15:03:32.759Z] + echo python3 /path/to/create_db_user.py --username **** --password <password> --databases **** 15:03:32 [2025-11-14T15:03:32.759Z] python3 /path/to/create_db_user.py --username **** --password <password> --databases **** 15:03:32 [2025-11-14T15:03:32.759Z] + exit 1 [Pipeline] } [Pipeline] // withCredentials [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Deploy Authentik) Stage "Deploy Authentik" skipped due to earlier failure(s) [Pipeline] getContext [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Verify Deployment) Stage "Verify Deployment" skipped due to earlier failure(s) [Pipeline] getContext [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Create Backup) Stage "Create Backup" skipped due to earlier failure(s) [Pipeline] getContext [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Declarative: Post Actions) [Pipeline] script [Pipeline] { [Pipeline] echo 15:03:35 [2025-11-14T15:03:35.026Z] πŸ“‹ Pipeline completed with status: FAILURE [Pipeline] echo 15:03:35 [2025-11-14T15:03:35.104Z] 15:03:35 [2025-11-14T15:03:35.104Z] 🎯 Authentik Deployment Pipeline 15:03:35 [2025-11-14T15:03:35.104Z] πŸ“… Build: 4 15:03:35 [2025-11-14T15:03:35.104Z] 🌿 Branch: null 15:03:35 [2025-11-14T15:03:35.104Z] 🏷️ Commit: 1d0af073 15:03:35 [2025-11-14T15:03:35.104Z] ⏱️ Duration: 15 sec and counting 15:03:35 [2025-11-14T15:03:35.104Z] βœ… Status: FAILURE 15:03:35 [2025-11-14T15:03:35.104Z] [Pipeline] sh 15:03:35 [2025-11-14T15:03:35.425Z] + find jenkins_backups -name *.sql -type f 15:03:35 [2025-11-14T15:03:35.425Z] + + + xargssort rmtail -r -f -n 15:03:35 [2025-11-14T15:03:35.425Z] 15:03:35 [2025-11-14T15:03:35.425Z] +6 15:03:35 [2025-11-14T15:03:35.425Z] find: β€˜jenkins_backups’: No such file or directory [Pipeline] } [Pipeline] // script [Pipeline] script [Pipeline] { [Pipeline] echo 15:03:36 [2025-11-14T15:03:36.008Z] ❌ Authentik deployment failed! [Pipeline] sh 15:03:36 [2025-11-14T15:03:36.327Z] + echo 🐳 Container logs: 15:03:36 [2025-11-14T15:03:36.327Z] 🐳 Container logs: 15:03:36 [2025-11-14T15:03:36.327Z] + docker compose logs --tail=100 15:03:36 [2025-11-14T15:03:36.578Z] time="2025-11-14T15:03:36Z" level=warning msg="The \"PG_PASS\" variable is not set. Defaulting to a blank string." 15:03:36 [2025-11-14T15:03:36.578Z] error while interpolating services.worker.environment.AUTHENTIK_SECRET_KEY: required variable AUTHENTIK_SECRET_KEY is missing a value: secret key required 15:03:36 [2025-11-14T15:03:36.578Z] + echo Could not get container logs 15:03:36 [2025-11-14T15:03:36.578Z] Could not get container logs 15:03:36 [2025-11-14T15:03:36.578Z] + echo πŸ“‹ System status: 15:03:36 [2025-11-14T15:03:36.578Z] πŸ“‹ System status: 15:03:36 [2025-11-14T15:03:36.578Z] + docker compose ps 15:03:36 [2025-11-14T15:03:36.829Z] time="2025-11-14T15:03:36Z" level=warning msg="The \"PG_PASS\" variable is not set. Defaulting to a blank string." 15:03:36 [2025-11-14T15:03:36.829Z] error while interpolating services.server.environment.AUTHENTIK_SECRET_KEY: required variable AUTHENTIK_SECRET_KEY is missing a value: secret key required 15:03:36 [2025-11-14T15:03:36.829Z] + echo Could not get container status 15:03:36 [2025-11-14T15:03:36.829Z] Could not get container status [Pipeline] } [Pipeline] // script [Pipeline] script [Pipeline] { [Pipeline] echo 15:03:37 [2025-11-14T15:03:37.233Z] 🧹 Cleaning up workspace... [Pipeline] sh 15:03:37 [2025-11-14T15:03:37.522Z] + rm -f *.tmp [Pipeline] echo 15:03:37 [2025-11-14T15:03:37.586Z] βœ… Keeping containers running for production (main branch) [Pipeline] } [Pipeline] // script [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // timestamps [Pipeline] } [Pipeline] // timeout [Pipeline] } [Pipeline] // withEnv [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE