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