No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Mattermost build

Jenkins automation for building mattermost

Command to hook up new kuberntes cluster to docker repository

kubectl create secret docker-registry myregistrykey --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD

Deploying the build server locally


  • virtualization platform
  • docker
  • install minikube, kubectl, helm by following instructions here:


  • startup minikube cluster
  • deploy mattermost-build (Jenkins)
  • run builds
  • destroy minikube cluster


minikube start

This will start a minikube environment with a default of 2GB and 2 cpus. These values can be set like this:

minikube start --memory 8192 --cpus 4 --mount

Config is stored in ~/.minikube

enable ingress

minikube addons enable ingress

Add tiller to the Kube cluster

helm init

Clone repo

git clone
cd mattermost-build

Pull dependent charts

cd mattermost-jenkins
helm dep update

Deploy build server

Reuse the Docker daemon:

eval $(minikube docker-env)

Now all docker commands on the host will actually run inside the minikube VM.

Build the server in k8s

make deploy-local

Get credentials for Jenkins

kubectl get secret build-mattermost-com-jenkins -o yaml
apiVersion: v1
  jenkins-admin-password: ZG9ZcDJ0QzZXZg==
  jenkins-admin-user: YWRtaW4=
kind: Secret
  creationTimestamp: 2017-11-04T14:12:40Z
    app: build-mattermost-com-jenkins
    chart: jenkins-0.8.9
    heritage: Tiller
    release: build-mattermost-com
  name: build-mattermost-com-jenkins
  namespace: default
  resourceVersion: "15793"
  selfLink: /api/v1/namespaces/default/secrets/build-mattermost-com-jenkins
  uid: 38049232-c16a-11e7-bb92-080027fb5028
type: Opaque

Decode password

echo "ZG9ZcDJ0QzZXZg==" | base64 --decode

Get service URL to login to Jenkins

minikube service list

Run build jobs

Builds start running as soon as Jenkins is up. The current config pulls all branches from and runs build/Jenkinsfile


Delete all pods but leave minikube up for a new deployment

make delete

Delete everything and shutdown minikube

make nuke


  • Currently bypassing the ingress controller. Should either adjust to use the ingress, or just remove it from local builds.
  • Change build job to stop it pulling all branches from github. Instead, it should pull from user-specified branch/location.