Skip to content

Instantly share code, notes, and snippets.

@owainlewis
Created January 1, 2014 11:04
Show Gist options
  • Select an option

  • Save owainlewis/8206963 to your computer and use it in GitHub Desktop.

Select an option

Save owainlewis/8206963 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