Skip to content

Instantly share code, notes, and snippets.

@Thorium
Last active May 14, 2018 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thorium/99a06e4ab592101ec2198df234c2910f to your computer and use it in GitHub Desktop.
Save Thorium/99a06e4ab592101ec2198df234c2910f to your computer and use it in GitHub Desktop.
Bitbucket pipelines test to build FSharp repository
# Take FSharp docker image and run Fake build script using Paket FSharp and Gulp.
image: fsharp:latest
pipelines:
default:
- step:
script:
- echo "Runs on branches that don't have specific pipeline."
# Install general utilities for building
- apt-get -qq update
- apt-get -qq install curl sudo gnupg make build-essential g++ -y
# Add keys to update Mono to 5.10
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb http://download.mono-project.com/repo/debian stable-jessie/snapshots/5.10.0.160 main" > /etc/apt/sources.list.d/mono-official-stable.list
- apt-get -qq update
# install NPM and Gulp
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- apt-get install -y nodejs
- npm install npm -g
- npm install -g gulp
# Install/Update Mono
- apt-get install -y mono-runtime
- apt-get install -y binutils curl mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl
- rm -rf /var/lib/apt/lists/* /tmp/*
# Run repositorys build-script
- sh ./build.sh
# Another version, if you would like to include MySQL database
# Take FSharp docker image and run Fake build script using Paket, FSharp, Gulp and MySQL.
image: fsharp:latest
pipelines:
default:
- step:
script:
- echo "Runs on branches that don't have specific pipeline."
# Install general utilities for building
- apt-get -qq update
- apt-get -qq install curl sudo gnupg make build-essential g++ mysql-client -y
# Add keys to update Mono to 5.10
- apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb http://download.mono-project.com/repo/debian stable-jessie/snapshots/5.10.0.160 main" > /etc/apt/sources.list.d/mono-official-stable.list
- apt-get -qq update
# install NPM and Gulp
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- apt-get install -y nodejs
- npm install npm -g
- npm install -g gulp
- npm install gulp
- npm install
# Install/Update Mono
- apt-get install -y mono-runtime
- apt-get install -y binutils curl mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl
- rm -rf /var/lib/apt/lists/* /tmp/*
# Create database:
# mysql -h 127.0.0.1 -P 3306 -u myUser -pmyPwd -e "source createdatabase.sql"
# Run repositorys build-script
- sh ./build.sh
services:
- mysql
definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_DATABASE: 'myDatabase'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: 'myUser'
MYSQL_PASSWORD: 'myPwd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment