Snippets

Tuomas Hietanen Bitbucket pipelines test to build FSharp repository

Created by Tuomas Hietanen last modified
# 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'

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.