<commit_before>{
  "variables": {
    "aws_access_key": "",
    "aws_secret_key": "",
    "jenkins_packer": "1.0",
    "jenkins_git": "2.3.4",
    "jenkins_git_client": "1.15.0",
    "jenkins_scm_api": "0.2",
    "release": null
  },
  "builders": [
  {
    "type": "amazon-ebs",
    "name": "amazon-us-west-2",
    "access_key": "{{user `aws_access_key`}}",
    "secret_key": "{{user `aws_secret_key`}}",
    "region": "us-west-2",
    "source_ami": "ami-3d50120d",
    "instance_type": "m3.medium",
    "ssh_username": "ubuntu",
    "ami_name": "mozilla nubis-ci v{{user `release`}}",
    "ami_description": "Nubis - CI",
    "ami_regions" : [ "eu-west-1","us-east-1" ],
    "tags" : {
       "release": "{{user `release`}}",
       "owner": "Gozer"
    }
  }
  ],
  "provisioners": [
  {
  "type": "file",
  "source": "jenkins/job.xml",
  "destination": "/tmp/jenkins.xml"
  },
  {
  "type": "file",
  "source": "jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
  "destination": "/tmp/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml"
  },
  {
    "type": "shell",
    "inline": [
      "sleep 30",
      "wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -",
      "sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'",
      "sudo apt-get update",
      "sudo apt-get -y install puppet=3.4.3-1"
      
  ]},
  {
      "type": "puppet-masterless",
      "manifest_file": "packer/puppet.pp",
      "facter": {
          "ami_release": "{{user `release`}}"
      }
  },
  {
    "type": "shell",
    "inline": [
      "sudo mkdir -p /var/lib/jenkins/plugins /var/lib/jenkins/jobs/nubis-ci",
      "sudo wget -O /var/lib/jenkins/plugins/packer.hpi http://updates.jenkins-ci.org/download/plugins/packer/{{user `jenkins_packer`}}/packer.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/git.hpi http://updates.jenkins-ci.org/download/plugins/git/{{user `jenkins_git`}}/git.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/git-client.hpi http://updates.jenkins-ci.org/download/plugins/git-client/{{user `jenkins_git_client`}}/git-client.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/scm-api.hpi http://updates.jenkins-ci.org/download/plugins/scm-api/{{user `jenkins_scm_api`}}/scm-api.hpi",
      "sudo mv /tmp/jenkins.xml /var/lib/jenkins/jobs/nubis-ci/config.xml",
      "echo $(( {{user `release`}} + 1 )) | sudo tee /var/lib/jenkins/jobs/nubis-ci/nextBuildNumber",
      "sudo mv /tmp/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml /var/lib/jenkins/",
      "sudo perl -pi -e's[%%AWS_ACCESS_KEY%%][{{user `aws_access_key`}}]'  /var/lib/jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
      "sudo perl -pi -e's[%%AWS_SECRET_KEY%%][{{user `aws_secret_key`}}]'  /var/lib/jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
      "sudo chown -R jenkins:jenkins /var/lib/jenkins"
    ]
  }
  ]
}
<commit_msg>Temoprary: install postfix so we can send emails<commit_after>{
  "variables": {
    "aws_access_key": "",
    "aws_secret_key": "",
    "jenkins_packer": "1.0",
    "jenkins_git": "2.3.4",
    "jenkins_git_client": "1.15.0",
    "jenkins_scm_api": "0.2",
    "release": null
  },
  "builders": [
  {
    "type": "amazon-ebs",
    "name": "amazon-us-west-2",
    "access_key": "{{user `aws_access_key`}}",
    "secret_key": "{{user `aws_secret_key`}}",
    "region": "us-west-2",
    "source_ami": "ami-3d50120d",
    "instance_type": "m3.medium",
    "ssh_username": "ubuntu",
    "ami_name": "mozilla nubis-ci v{{user `release`}}",
    "ami_description": "Nubis - CI",
    "ami_regions" : [ "eu-west-1","us-east-1" ],
    "tags" : {
       "release": "{{user `release`}}",
       "owner": "Gozer"
    }
  }
  ],
  "provisioners": [
  {
  "type": "file",
  "source": "jenkins/job.xml",
  "destination": "/tmp/jenkins.xml"
  },
  {
  "type": "file",
  "source": "jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
  "destination": "/tmp/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml"
  },
  {
    "type": "shell",
    "inline": [
      "sleep 30",
      "wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -",
      "sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'",
      "sudo apt-get update",
      "sudo apt-get -y install puppet=3.4.3-1 postfix=2.11.0-1"
      
  ]},
  {
      "type": "puppet-masterless",
      "manifest_file": "packer/puppet.pp",
      "facter": {
          "ami_release": "{{user `release`}}"
      }
  },
  {
    "type": "shell",
    "inline": [
      "sudo mkdir -p /var/lib/jenkins/plugins /var/lib/jenkins/jobs/nubis-ci",
      "sudo wget -O /var/lib/jenkins/plugins/packer.hpi http://updates.jenkins-ci.org/download/plugins/packer/{{user `jenkins_packer`}}/packer.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/git.hpi http://updates.jenkins-ci.org/download/plugins/git/{{user `jenkins_git`}}/git.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/git-client.hpi http://updates.jenkins-ci.org/download/plugins/git-client/{{user `jenkins_git_client`}}/git-client.hpi",
      "sudo wget -O /var/lib/jenkins/plugins/scm-api.hpi http://updates.jenkins-ci.org/download/plugins/scm-api/{{user `jenkins_scm_api`}}/scm-api.hpi",
      "sudo mv /tmp/jenkins.xml /var/lib/jenkins/jobs/nubis-ci/config.xml",
      "echo $(( {{user `release`}} + 1 )) | sudo tee /var/lib/jenkins/jobs/nubis-ci/nextBuildNumber",
      "sudo mv /tmp/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml /var/lib/jenkins/",
      "sudo perl -pi -e's[%%AWS_ACCESS_KEY%%][{{user `aws_access_key`}}]'  /var/lib/jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
      "sudo perl -pi -e's[%%AWS_SECRET_KEY%%][{{user `aws_secret_key`}}]'  /var/lib/jenkins/biz.neustar.jenkins.plugins.packer.PackerPublisher.xml",
      "sudo chown -R jenkins:jenkins /var/lib/jenkins"
    ]
  }
  ]
}

{'fraction_non_alphanumeric': 0.21030547163477678, 'fraction_numerical': 0.010574018126888218, 'mean_word_length': 3.0537414965986396, 'pattern_counts': {'":': 72, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6839409', 'n_tokens_mistral': 2539, 'n_tokens_neox': 2421, 'n_words': 332}