Public | Automated Build

Last pushed: 9 months ago
Short Description
testing purpose
Full Description

An inspiration from: smartapps/bitbucket-pipelines-php-mysql
Bitbucket Pipelines Go/Golang/MySQL (with built in Goose Migrator)

Docker image based on golang
Docker image at gianebao/bitbucket-pipeline-go-mysql

Built in's:

  • ENV GOOSE_DIR
  • ENV MYSQL_ROOT_PASSWORD
  • mysql-server (/etc/init.d/mysql start)
  • redis (/etc/init.d/redis-server start)
  • goose (cp -v ./migrations $GOOSE_DIR/migrations && cd / && goose -env=test up)
  • mysql-client (mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE test;")

Sample bitbucket-pipelines.yml:

image: ramvasnth/gomysql
pipelines:
  default:
    - step:
        script:
          - /etc/init.d/mysql start
          - mysql --user=root --password=$MYSQL_ROOT_PASSWORD -e "CREATE DATABASE test;"
          - cp -v ./migrations $GOOSE_DIR/migrations && cd / && goose -env=test up
Docker Pull Command
Owner
ramamoorthyvasanth
Source Repository