Skip to content

Instantly share code, notes, and snippets.

@inspire12
Forked from owainlewis/JenkinsPostgres.md
Created May 12, 2018 11:45
Show Gist options
  • Select an option

  • Save inspire12/24860c319ca4611b338775cc6aa94aa5 to your computer and use it in GitHub Desktop.

Select an option

Save inspire12/24860c319ca4611b338775cc6aa94aa5 to your computer and use it in GitHub Desktop.
Jenkins Postgres

Setup Postgres for Jenkins

sudo -u postgres psql -c "CREATE ROLE jenkins WITH SUPERUSER LOGIN;" 
sudo -u postgres psql -c "ALTER ROLE jenkins WITH CREATEDB;"

Modify the postgres pg_hba.conf to enable trusted local authentication for the jenkins user:

echo "local all jenkins trust" | sudo tee --append /etc/postgresql/9.1/main/pg_hba.conf

Restart postgres

sudo /etc/init.d/postgresql restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment