Public | Automated Build

Last pushed: 4 months ago
Short Description
Bitbucket pipelines Go/Golang MySQL with groove and Redis
Full Description

bitbucket-pipeline-go-mysql

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: gianebao/bitbucket-pipeline-go-mysql
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
gianebao

Comments (0)