├── .gitignore ├── LICENSE ├── README.md ├── ansible ├── README.md ├── Vagrantfile ├── buildslave-four.yml ├── buildslave-one.yml ├── buildslave-three.yml ├── buildslave-two.yml ├── develop.yml ├── docker-config.yml ├── host-config.yml ├── inventory │ ├── buildslave-four │ │ ├── group_vars │ │ │ └── all │ │ └── inventory │ ├── buildslave-one │ │ ├── group_vars │ │ │ └── all │ │ └── inventory │ ├── buildslave-three │ │ ├── group_vars │ │ │ └── all │ │ └── inventory │ ├── buildslave-two │ │ ├── group_vars │ │ │ └── all │ │ └── inventory │ ├── develop │ │ └── inventory │ ├── poc-server-develop │ │ ├── group_vars │ │ │ └── all │ │ └── inventory │ └── poc-server │ │ ├── group_vars │ │ └── all │ │ └── inventory ├── poc-server-develop.yml ├── poc-server.yml └── roles │ ├── buildslave │ ├── tasks │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── common │ └── tasks │ │ └── main.yml │ ├── docker │ └── tasks │ │ └── main.yml │ ├── poc-server-develop │ ├── tasks │ │ └── main.yml │ └── vars │ │ └── main.yml │ ├── poc-server │ ├── tasks │ │ └── main.yml │ └── vars │ │ └── mail.yml │ └── user │ └── tasks │ └── main.yml ├── buildbot.tac ├── builders.py ├── buildstatusimage.py ├── changehook.passwd.sample ├── cppcheck.py ├── crontab-startup ├── factories ├── __init__.py ├── buildslaves.py ├── cpp_ethereum.py ├── cpp_ethereum_brew.py ├── cpp_ethereum_osx.py ├── cpp_ethereum_windows.py ├── debian.py ├── debian_backport.py ├── ethereumj.py ├── factory.py ├── go_ethereum.py ├── go_ethereum_arm.py ├── go_ethereum_brew.py ├── go_ethereum_osx.py ├── go_ethereum_windows.py ├── integration.py ├── mist.py ├── poc_servers.py ├── pyethapp.py ├── pyethereum.py ├── self_update.py └── serpent.py ├── integration-transfer.yaml ├── ircbot.json.sample ├── master.cfg ├── monkeypatch.py ├── pbuilderrc ├── public_html ├── bg_gradient.jpg ├── default.css ├── favicon.ico ├── robots.txt ├── status_error.svg ├── status_exception.svg ├── status_failure.svg ├── status_retry.svg ├── status_skipped.svg ├── status_success.svg ├── status_unknown.svg └── status_warnings.svg ├── requirements.txt ├── schedulers.py ├── setup.cfg ├── slaves.json.sample ├── slaves.py ├── startup ├── buildslave-osx.plist ├── eth-supervisord-develop.conf ├── eth-supervisord-integration-test.conf ├── eth-supervisord-integration-user.conf ├── eth-supervisord-integration.conf ├── eth-supervisord-master.conf ├── eth-supervisord.conf └── geth-supervisord.conf ├── status.py ├── templates ├── README.txt └── console.html ├── tests └── catalog.py ├── tokens.json.sample └── users.json.sample /.gitignore: -------------------------------------------------------------------------------- 1 | build-*/ 2 | gitpoller-work/ 3 | gitpoller-workdir/ 4 | changehook.passwd 5 | http.log 6 | ircbot.json 7 | master.cfg.sample 8 | buildbot.tac.new 9 | public_html/builds/ 10 | public_html/reports/ 11 | runtests/ 12 | slaves.json 13 | state.sqlite 14 | tokens.json 15 | twistd.log* 16 | twistd.pid 17 | users.json 18 | venv/ 19 | *.pyc 20 | ansible/.vagrant 21 | *~ 22 | *.swp 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ethereum Buildbot 2 | 3 | This project contains the configuration for the [Ethereum Buildbot](https://builds.ethereum.org/waterfall) 4 | 5 | Changes to this repository are automatically deployed once they are pushed to GitHub. Please open a pull request unless you really know what you are doing. 6 | 7 | 8 | ## Configuration / Development 9 | 10 | This is to create a local installation of buildbot for development purposes or to test changes to the buildbot's configurations. 11 | 12 | Start by cloning this repository locally and follow the steps below for your platform. 13 | 14 | ``` 15 | git clone https://github.com/ethereum/ethereum-buildbot.git 16 | cd ethereum-buildbot 17 | ``` 18 | 19 | ### Ubuntu 20 | 21 | Install Docker using the [official documentation](https://docs.docker.com/installation/ubuntulinux/). Following the "Docker-maintained Package Installation" is recommended, as opposed to the "Ubuntu-maintained Package Installation". 22 | 23 | Make sure you have `pip` installed, then install the requirements: 24 | ``` 25 | sudo apt-get install python-dev 26 | wget https://bootstrap.pypa.io/get-pip.py 27 | sudo python get-pip.py 28 | sudo pip install -r requirements.txt 29 | ``` 30 | 31 | ### OSX 32 | 33 | Install Docker and boot2docker using Homebrew: 34 | ``` 35 | brew install docker boot2docker 36 | ``` 37 | 38 | Install requirements: 39 | ``` 40 | pip install -r requirements.txt 41 | ``` 42 | 43 | ### Common installation steps 44 | 45 | Generate a new sqlite database: 46 | ``` 47 | buildbot upgrade-master . 48 | ``` 49 | 50 | Copy every `.sample` file to their respective filename without the `.sample` extension. Edit each file with your desired credentials and configurations if you plan on running the buildbot in a production environment, otherwise you can keep the default not-so-secret `secret` password. 51 | 52 | Verify that your installation should work with: 53 | ``` 54 | buildbot checkconfig 55 | ``` 56 | 57 | You should get `Config file is good!` from the last step. Run `buildbot checkconfig` after making changes, especially before pushing changes or making pull requests. This will catch syntax errors and will notify you if you missed something in your buildbot configurations. 58 | 59 | **Note:** For local testing, you'll need to change the WebStatus' `http_port` in `status.py` to something else than the SSL configurations, typically `8010`. 60 | 61 | You should now be able to start your buildmaster instance with: 62 | ``` 63 | buildbot start . 64 | ``` 65 | 66 | Your buildmaster should now be accessible at `http://localhost:8010` 67 | 68 | 69 | ### Buildslaves configuration 70 | 71 | This part can get quite complex, make sure you have your thinking cap well adjusted, grab a coffee and be ready for a lot of tinkering. You've been warned. 72 | 73 | Remember installing Docker earlier on? This is where it comes into play. 74 | 75 | Make sure Docker is running and well configured. On OSX, you need to run `boot2docker up` and follow the instructions about environment variables. On Ubuntu, make sure `docker info` mentions it is using AUFS (you'll see `Storage Driver: aufs`). 76 | 77 | Create a test buildslave, we'll call it `testslave` and put it in a folder with the same name: 78 | ``` 79 | buildslave create-slave testslave localhost testslave secret 80 | ``` 81 | 82 | That test buildslave will be used to create the other buildslaves using Docker containers. 83 | 84 | On OSX, you can use that same technique to create a native OSX buildslave, just give it a different name or use `osx` for the currently configured buildslave name. Be careful as this will affect your main system since it is not running in a container. 85 | 86 | Open `builders.py` and look for the `# Buildslave builders` section. Add your `testslave` to the `slavenames` parameter of the builder of your choice, or all the buildslave builders. 87 | 88 | Save your change and reconfigure your buildmaster with: 89 | ``` 90 | buildbot reconfig . 91 | ``` 92 | 93 | You can now start your buildslave with: 94 | ``` 95 | buildslave start testslave 96 | ``` 97 | 98 | It should attach itself to your buildmaster. Once you have at least one instance of our `testslave` running and attached, you should see the builder become available in the waterfall. Trigger a forced build and enjoy the first run fail on a missing `buildbot.tac`. This is where tinkering really gets taken to a whole new level. 99 | 100 | You'll need to enter the failing container and set the appropriate values in the right `buildbot.tac` file at the right location. 101 | 102 | First, note your host's IP under Docker using `ifconfig` to find Docker's network interface. You need this to tell the buildslave we're trying to create to connect to your host's buildmaster. 103 | 104 | Click on the `stdio` link of the failing step, and note the second line that should look like: 105 | ``` 106 | in dir /home/your_username/ethereum-buildbot/testslave/build-buildslave-cpp-one/build 107 | ``` 108 | 109 | Move to that folder: 110 | ``` 111 | cd /home/your_username/ethereum-buildbot/testslave/build-buildslave-cpp-one/build 112 | ``` 113 | 114 | Copy the failing buildslave's `buildbot.tac.sample` to `buildbot.tac`: 115 | ``` 116 | cp cpp-ethereum-buildslave/buildbot.tac.sample cpp-ethereum-buildslave/buildbot.tac 117 | ``` 118 | 119 | Edit the `buildbot.tac` file with your favorite editor: 120 | ``` 121 | vim cpp-ethereum-buildslave/buildbot.tac 122 | ``` 123 | 124 | Set `buildmaster_host` to your previously noted host IP. Make sure `slavename` and `passwd` also correspond to the buildslave you're trying to create. 125 | 126 | Rinse and repeat for every buildslave. 127 | 128 | 129 | ### Useful tricks 130 | 131 | Enter a running container with: 132 | ``` 133 | docker exec -ti CONTAINER_NAME bash 134 | ``` 135 | 136 | ### Contributing 137 | 138 | Make sure you have a local installation of the Ethereum Buildbot to test your changes, since any modification can greatly affect many builders and processes, and even bring the whole buildmaster to a halt if changes are blindly pushed to the repository. Pull requests are always welcome and recommended for any modification. 139 | -------------------------------------------------------------------------------- /ansible/README.md: -------------------------------------------------------------------------------- 1 | # Automatic buildbot / buildslave provion with Ansible 2 | 3 | Testing is done in a Vagrant virtual machine 4 | 5 | install vagrant, virtualbox, ansible, then do `vagrant up`. it should provison a basic buildslave. `vagrant ssh` to verify a buildslave is installed 6 | -------------------------------------------------------------------------------- /ansible/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 5 | VAGRANTFILE_API_VERSION ||= "2" 6 | 7 | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 8 | # All Vagrant configuration is done here. The most common configuration 9 | # options are documented and commented below. For a complete reference, 10 | # please see the online documentation at vagrantup.com. 11 | 12 | # Every Vagrant virtual environment requires a box to build off of. 13 | config.vm.box = "ubuntu/trusty64" 14 | config.vm.define "buildslave-test" 15 | 16 | # Disable automatic box update checking. If you disable this, then 17 | # boxes will only be checked for updates when the user runs 18 | # `vagrant box outdated`. This is not recommended. 19 | # config.vm.box_check_update = false 20 | 21 | # Create a forwarded port mapping which allows access to a specific port 22 | # within the machine from a port on the host machine. In the example below, 23 | # accessing "localhost:8080" will access port 80 on the guest machine. 24 | # config.vm.network "forwarded_port", guest: 80, host: 8080 25 | 26 | # Create a private network, which allows host-only access to the machine 27 | # using a specific IP. 28 | # config.vm.network "private_network", ip: "192.168.33.10" 29 | 30 | # If true, then any SSH connections made will enable agent forwarding. 31 | # Default value: false 32 | # config.ssh.forward_agent = true 33 | 34 | # Provider-specific configuration so you can fine-tune various 35 | # backing providers for Vagrant. These expose provider-specific options. 36 | # Example for VirtualBox: 37 | # 38 | # config.vm.provider "virtualbox" do |vb| 39 | # # Don't boot with headless mode 40 | # vb.gui = true 41 | # 42 | # # Use VBoxManage to customize the VM. For example to change memory: 43 | # vb.customize ["modifyvm", :id, "--memory", "1024"] 44 | # end 45 | 46 | 47 | # Ubuntu / Virtualbox workaround. 48 | # see http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client 49 | config.vm.provider "virtualbox" do |vb| 50 | vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] 51 | end 52 | 53 | # 54 | # View the documentation for the provider you're using for more 55 | # information on available options. 56 | 57 | # Ansible local develop setup 58 | config.vm.provision "develop-config", type: "ansible" do |dc| 59 | dc.playbook = "develop.yml" 60 | dc.inventory_path = "inventory/develop" 61 | dc.limit = "vagrant" 62 | dc.extra_vars = { ansible_ssh_user: 'vagrant' } 63 | end 64 | 65 | end 66 | 67 | -------------------------------------------------------------------------------- /ansible/buildslave-four.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include: host-config.yml 3 | 4 | - name: setting up buildslave configuration 5 | hosts: all 6 | remote_user: buildslave 7 | vars: 8 | buildslave_name: buildslave-four 9 | roles: 10 | - buildslave 11 | 12 | - name: setting up docker configuration 13 | hosts: all 14 | remote_user: root 15 | roles: 16 | - docker 17 | -------------------------------------------------------------------------------- /ansible/buildslave-one.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include: host-config.yml 3 | 4 | - name: setting up buildslave configuration 5 | hosts: all 6 | remote_user: buildslave 7 | vars: 8 | buildslave_name: buildslave-one 9 | roles: 10 | - buildslave 11 | 12 | - name: setting up docker configuration 13 | hosts: all 14 | remote_user: root 15 | roles: 16 | - docker 17 | -------------------------------------------------------------------------------- /ansible/buildslave-three.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include: host-config.yml 3 | 4 | - name: setting up buildslave configuration 5 | hosts: all 6 | remote_user: buildslave 7 | vars: 8 | buildslave_name: buildslave-three 9 | roles: 10 | - buildslave 11 | 12 | - name: setting up docker configuration 13 | hosts: all 14 | remote_user: root 15 | roles: 16 | - docker 17 | -------------------------------------------------------------------------------- /ansible/buildslave-two.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include: host-config.yml 3 | 4 | - name: setting up buildslave configuration 5 | hosts: all 6 | remote_user: buildslave 7 | vars: 8 | buildslave_name: buildslave-two 9 | roles: 10 | - buildslave 11 | 12 | - name: setting up docker configuration 13 | hosts: all 14 | remote_user: root 15 | roles: 16 | - docker 17 | -------------------------------------------------------------------------------- /ansible/develop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # only used on vagrant machines. 3 | - include: host-config.yml 4 | - include: poc-server-develop.yml 5 | -------------------------------------------------------------------------------- /ansible/docker-config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: setting up docker 3 | hosts: all 4 | remote_user: root 5 | roles: 6 | - docker 7 | -------------------------------------------------------------------------------- /ansible/host-config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Provision the OS for buildslave 3 | hosts: all 4 | remote_user: root 5 | roles: 6 | - common 7 | - user 8 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-four/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 37383236343833646531636165326430656539353662306637643131613562646539396535373364 3 | 6661383035343231623966393532323639383736303532370a393539373235636533633532353263 4 | 37346336316330316433613561366462363434326665323636663934656333323839623764646438 5 | 3238353162373832660a363736363266366237633765633339326637653966336264656136376632 6 | 35363162666563636137373137373032303134323730326432376562353562633362353831373435 7 | 38323335306263643137393563666331356435363864333162316461336136353934656333623038 8 | 33346134303661383838396636353432623732613339626133363437376161306538366666653163 9 | 65376366636238633231613538356230366361326561393262376262626261633633656137333434 10 | 36353438343332616137343238356334646633633836333634323835313436626166633166656463 11 | 62623864323465326563366166616530303865646637396662653265326534373637323264323266 12 | 63663839333735663365656430313234323762396365373131646430643532626430636264663562 13 | 32656265326437653539323030393161373531633363653639636461636136323063633035366663 14 | 63336638393433636338613064666665323239643031316161653462396436333639303365343065 15 | 38353332393731306636613936316165663138613231366338666335666638393762363834313966 16 | 37653638316664396661323165613638353563333933643361373736316638626234316232383035 17 | 34356665326531306665353739666666343135336562656365666235613361626630643731386464 18 | 62353038396165653733616266616339336565633539643865363565333661343661343339396662 19 | 30373732666561623563623739326531613938636266643234633635393239386531393934616339 20 | 62666634306237653164663665633565376133363830646564333031653237303834613835326664 21 | 64613738633730666438 22 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-four/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.35.254.57 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-one/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 30636264386461303834613366633462353132663738343436643265663734363233626535616239 3 | 6432373665396334653862353566666538303864653264300a393265363266346232333065353639 4 | 39353362363763616433363566333661313463656330356635343935633636663930636165386662 5 | 3431623863633839340a313065363130633261323637646138636238633166633639623962363530 6 | 66353735306138333437353539663964306636353135613736363638623537326332353564643635 7 | 34303931633935306638326463336533633064386635386536356434303635366161633030353464 8 | 61363361646666303661323734336333313562303635396238653663306162366437383934343633 9 | 62353862313833396634386435306139343035373664393165666664656138346334326331376538 10 | 35646538666534666661386263333034636638313562383036646166656664363663653664366361 11 | 64363739643937353034303130343232623937623833313539306563616633336339646336636335 12 | 61313035306462663334343939653561336461633166666465626162613136373332376462316430 13 | 39666566383662613735346466666162626466396633643433333933346263323135343731383234 14 | 37356164663339393530323263363432383737346438616438646431643331343936623862386264 15 | 63636363333965656364636432383565633663396232633964626163653636633362316130653266 16 | 38363963656336626633663865333364346435633236656661643963663733633336366134366537 17 | 39316634386339313937313638616130393662623261396162656131656164636662653230623533 18 | 38346365643363376236323863393336363335306333303138303163613235646636646265306436 19 | 63326330616634303733376333376362326462616365393937663931393065336566363532306365 20 | 35646439643461343236633038343663306439363432666133623938383064613035343334323035 21 | 30333666396264363363 22 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-one/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.1.83.183 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-three/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 38323166313139336461643735643563316333643331323364366562363537333364343063643433 3 | 3362346330663531383834346365303131666239333634390a313666316130386435343739643932 4 | 37623534643532323564313063366263393565343435336464303137326230383961366332363961 5 | 6138386135633233330a613162343338306530373634613363613333613737343866313234643239 6 | 38666330373865333761303062386463666264323130663833353737666436393465636530663038 7 | 63333365626535373961643135333162613961333630393965643164343964623836366138363363 8 | 33313638386564653930633266633166636332336433383034616435346362386638356235303465 9 | 64616531623035626334333939316431326634346162653036366135366361326562336338383239 10 | 63613365326635376262333137626565303965656336643366366663663531393133353033306161 11 | 62353862363364663533633631353563323765613930323764313030623539316238666262613530 12 | 61613531333139666331306138663564643430343865643564633235643934313266313239393930 13 | 66643637326130376333363162623234383862316335326538613332663237653834666239383461 14 | 31353137323833656532613161663130363032313365303631393563626438353833326662666462 15 | 34343966393532313330376130386234386563336634616162643432313130646165373563396163 16 | 31633635616635396462353462633263376131386466386438343032303439373037636164663763 17 | 37323939383261393839303561376332336133323765653137303933363563393436303039346336 18 | 62333861623766373538366135376632666436363037666362653663383737313037396566613031 19 | 62363663316439333939366139326632613035373964373231356437643964383430333533373839 20 | 39333130653432333132663831636163653234616535613239396133313437643535616431323961 21 | 32613630323762366166 22 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-three/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.35.253.243 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-two/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 32623264333735656366656638363361346136326631643064363265333161646335316335613562 3 | 3335353865333565613361363062383661306561373935370a333962376133303133333133646561 4 | 66383431366163333066346537363934663935653364653931633033343736396563663433666537 5 | 3131386461363962340a303635646333366433663534336465313530653830336434303833383737 6 | 62323930666238306536613232613037653134643334366534626637613862646364333339666337 7 | 37663933646564613334643730333431303536336133323339633438393638636130373537386165 8 | 63636531616338663131613764346633343461356363633937396262383432383664646237653639 9 | 65363863623132323764666636643366306164656662376334333931393430376162363931663062 10 | 31616261316564623736353236623039386230313632366465653765613339316431313735393362 11 | 65366163396661613236336532623531666666323361353161386630616162346531363037613935 12 | 63646231636364336233326233636265623632336237336664633938373534393533316461313866 13 | 62643139333035636532646137633933653064666562656137613636643166306638306535313939 14 | 36653634306535663832643636373961323737643836336433316562663031333334656561353437 15 | 38643930653339396161313565303930633961613962383935653434333738316637363838653239 16 | 39633539373466386436346538326230383338363566326438386237663061633230346166373339 17 | 61623764343962336535373239633839386435343033326166356663636131366239613730346161 18 | 66613965656330636635346361323766396461653933333434306664666533383062396363306237 19 | 64313737376436343136336138633666626633396263633238336134366266303935613261643766 20 | 37656137393632373339316635323661343263303335353932363834363134313337646664636262 21 | 36346264643763653165 22 | -------------------------------------------------------------------------------- /ansible/inventory/buildslave-two/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.1.83.213 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/develop/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 127.0.0.1 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/poc-server-develop/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 32363635623933353266373430623236376333643439353634336536623264333331643833313333 3 | 6262303465373434623466646661303332623362326139350a343133636561346633643964393361 4 | 33316635323230346438643465633965376266626431363138353265316235613138643737633864 5 | 6439633637343530650a663464356331643936363730316435353763393261346431366633323739 6 | 64313765306333356330393462383637336663373835346234633665646661306665636433336633 7 | 66363730666463653961353265303635656662613738333135316539383035333438336139646535 8 | 36396234356565646535353937626435386435313736626437336530636531376430343733313231 9 | 32393862643130336330333930323432393937386539653766653165633139613364306566653933 10 | 37393533326561376137306133626134646432636131663666653934353032626564393936303135 11 | 33626536663638643631366361623535646538383962336233396637653439356661333963656463 12 | 35346265643034323162653336663135326130663633373930316630306639616261303038323439 13 | 62343463393934353934316435353131303738373061386366396637373136313033373436303535 14 | 37313835383731343632313835666634333263376664636337313032303230326637626265343331 15 | 36626666333036333736303535383339393136313663353764646461376432363436313462353632 16 | 61626333383962313036376536306239323762666366363933326231396264343637613435386638 17 | 62313538626532376166656234356266323461303234646663363835313266613534326133653865 18 | 64636336633438353061653237326339626335666564343433363436646234643961396335346437 19 | 31306666356561636465363135346366353539636132363565393932613965303935626433316334 20 | 31313162346532366234646636333266363263376163646539346166613230643538306233383933 21 | 30393630623564623330 22 | -------------------------------------------------------------------------------- /ansible/inventory/poc-server-develop/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.1.83.226 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/inventory/poc-server/group_vars/all: -------------------------------------------------------------------------------- 1 | $ANSIBLE_VAULT;1.1;AES256 2 | 62656162373937663565383934666530383939666232396438353738333130373166373835363762 3 | 6662303733633935666662623930663564333431623232390a626262636439663139613731313930 4 | 37323036613439666232623934356231626339633031643030666236643536346138366366333832 5 | 6663633162316432650a353437373830613135386563386363653831366530316461653539343434 6 | 62386539303436613238363136303865343638653932616530346462333231396637613836316261 7 | 36306437666338306138646538346233356336666633336334663133653961636538383630376539 8 | 38323234373838343261393964386562626635303235393763316137396230313039613862306233 9 | 34656433343836323333393361333666343464643633373832333838656134353935386236323839 10 | 37343330653761643830393736643639616366336633316162333666663134356361653032636264 11 | 62396130353231323664383261323635643638363062313264616166643066616265353632623133 12 | 61666138393132373536373864616139333039623539663338656661353865383435366538326435 13 | 31633866373364613430313966353431306232306130616133306437353037336533663637303761 14 | 61383561656432653365633131363833333832376633376131623866663266353665373933376434 15 | 64323332303865666264353439346630356435366433343731376534306162653336626136363538 16 | 30303137623830306230613436386131613331383437313364393263616539333837636466333534 17 | 31373864366631643134333865613366333535353039633737653935346639643164303531353531 18 | 37316431663233393330393339653934326361326336376334306131333137396338323063373733 19 | 31643636613064393633393534366534303335356262396136313132393131333737623236613031 20 | 31353338316436643532396137336465643966313864353131643534633139343465313830353734 21 | 33386331346539616139 22 | -------------------------------------------------------------------------------- /ansible/inventory/poc-server/inventory: -------------------------------------------------------------------------------- 1 | [vagrant] 2 | buildslave-test ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 3 | 4 | [production] 5 | 5.1.83.225 6 | 7 | [servers:children] 8 | vagrant 9 | production 10 | -------------------------------------------------------------------------------- /ansible/poc-server-develop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: setting up poc-server-develop 3 | hosts: all 4 | remote_user: root 5 | roles: 6 | - poc-server-develop 7 | -------------------------------------------------------------------------------- /ansible/poc-server.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: setting up poc-server 3 | hosts: all 4 | remote_user: root 5 | roles: 6 | - poc-server 7 | -------------------------------------------------------------------------------- /ansible/roles/buildslave/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: create buildslave project directory 3 | file: 4 | path: "{{ basedir }}" 5 | state: directory 6 | 7 | - name: create buildslave 8 | shell: buildslave create-slave {{ basedir }} {{ buildmaster_url }} {{ buildslave_name }} "{{ buildslave_service_password | default('password') }}" 9 | -------------------------------------------------------------------------------- /ansible/roles/buildslave/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | basedir: slave 3 | buildmaster_url: build.ethdev.com:9989 4 | -------------------------------------------------------------------------------- /ansible/roles/common/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install package dependencies 3 | sudo: true 4 | apt: name={{ item }} install_recommends=no 5 | with_items: 6 | - python-pip 7 | - python-dev 8 | - python-apt 9 | - htop 10 | 11 | - name: install buildslave 12 | sudo: true 13 | pip: name=buildbot-slave 14 | -------------------------------------------------------------------------------- /ansible/roles/docker/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | - name: Make sure apt-transport-https is installed 4 | apt: 5 | pkg: "apt-transport-https" 6 | state: installed 7 | 8 | - name: Add Docker repository key 9 | apt_key: 10 | id: "36A1D7869245C8950F966E92D8576A8BA88D21E9" 11 | keyserver: "hkp://keyserver.ubuntu.com:80" 12 | state: present 13 | 14 | - name: Add Docker repository and update apt cache 15 | apt_repository: 16 | repo: "deb http://get.docker.io/ubuntu docker main" 17 | update_cache: yes 18 | state: present 19 | 20 | - name: Install lxc-docker 21 | apt: 22 | pkg: "lxc-docker" 23 | state: installed 24 | 25 | - name: Install docker-py 26 | pip: 27 | name: docker-py 28 | 29 | - name: Make sure docker is running 30 | service: 31 | name: docker 32 | state: started 33 | 34 | - name: Add buildslave to docker group 35 | shell: gpasswd -a buildslave docker 36 | 37 | - name: Restart Docker 38 | shell: gpasswd -a buildslave docker -------------------------------------------------------------------------------- /ansible/roles/poc-server-develop/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install ethereum ppa 3 | sudo: true 4 | apt_repository: repo=ppa:ethereum/ethereum 5 | 6 | - name: install ethereum-dev ppa 7 | sudo: true 8 | apt_repository: repo=ppa:ethereum/ethereum-dev 9 | 10 | - name: install ethereum 11 | sudo: true 12 | apt: name=ethereum install_recommends=no -------------------------------------------------------------------------------- /ansible/roles/poc-server-develop/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | basedir: slave 3 | buildslave_name: poc-server-develop 4 | buildmaster_url: build.ethdev.com:9989 5 | -------------------------------------------------------------------------------- /ansible/roles/poc-server/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: install ethereum ppa 3 | sudo: true 4 | apt_repository: repo=ppa:ethereum/ethereum 5 | 6 | - name: install ethereum 7 | sudo: true 8 | apt: name=ethereum install_recommends=no 9 | -------------------------------------------------------------------------------- /ansible/roles/poc-server/vars/mail.yml: -------------------------------------------------------------------------------- 1 | --- 2 | basedir: slave 3 | buildslave_name: poc-server-master 4 | buildmaster_url: build.ethdev.com:9989 5 | -------------------------------------------------------------------------------- /ansible/roles/user/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: create default group for buildslave account 3 | sudo: true 4 | group: name=buildslave 5 | 6 | - name: create dedicated buildslave account 7 | sudo: true 8 | user: 9 | name: buildslave 10 | # http://docs.ansible.com/faq.html#how-do-i-generate-crypted-passwords-for-the-user-module 11 | password: "{{ buildslave_user_salted_password | default('password') }}" 12 | group: buildslave 13 | shell: /bin/bash 14 | -------------------------------------------------------------------------------- /buildbot.tac: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | sys.path.insert(0, os.path.dirname(__file__)) 5 | 6 | from monkeypatch import apply_patches 7 | apply_patches() 8 | 9 | from twisted.application import service 10 | from buildbot.master import BuildMaster 11 | 12 | basedir = '.' 13 | rotateLength = 10000000 14 | maxRotatedFiles = 10 15 | configfile = 'master.cfg' 16 | 17 | # Default umask for server 18 | umask = None 19 | 20 | # if this is a relocatable tac file, get the directory containing the TAC 21 | if basedir == '.': 22 | import os.path 23 | basedir = os.path.abspath(os.path.dirname(__file__)) 24 | 25 | # note: this line is matched against to check that this is a buildmaster 26 | # directory; do not edit it. 27 | application = service.Application('buildmaster') 28 | from twisted.python.logfile import LogFile 29 | from twisted.python.log import ILogObserver, FileLogObserver 30 | logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength, 31 | maxRotatedFiles=maxRotatedFiles) 32 | application.setComponent(ILogObserver, FileLogObserver(logfile).emit) 33 | 34 | m = BuildMaster(basedir, configfile, umask) 35 | m.setServiceParent(application) 36 | m.log_rotation.rotateLength = rotateLength 37 | m.log_rotation.maxRotatedFiles = maxRotatedFiles 38 | -------------------------------------------------------------------------------- /buildstatusimage.py: -------------------------------------------------------------------------------- 1 | # From https://github.com/agroszer/buildbot-status-image/ 2 | # 3 | # this is a snippet ready to be pasted into master.cfg 4 | # then you can get the image by: 5 | # http://localhost:8010/buildstatusimage?builder=runtests 6 | 7 | import os 8 | from buildbot.status import html # NOQA 9 | try: 10 | # buildbot 0.8.7p1 11 | from buildbot.status.results import SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION # NOQA 12 | from buildbot.status.results import Results 13 | except ImportError: 14 | # buildbot 0.8.0 15 | from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION, RETRY # NOQA 16 | from buildbot.status.builder import Results 17 | from buildbot.status.web.base import HtmlResource 18 | 19 | class BuildStatusImageResource(HtmlResource): 20 | contentType = "image/svg+xml" 21 | 22 | def __init__(self, categories=None): 23 | HtmlResource.__init__(self) 24 | 25 | def content(self, request, ctx): 26 | """Display a build status image like Travis does.""" 27 | 28 | status = self.getStatus(request) 29 | request.setHeader('Cache-Control', 'no-cache') 30 | 31 | # Get the parameters. 32 | name = request.args.get("builder", [None])[0] 33 | 34 | # Check if the builder in parameter exists. 35 | try: 36 | builder = status.getBuilder(name) 37 | except: 38 | # unknown builder 39 | return self._image('unknown') 40 | 41 | # Check if the build in parameter exists. 42 | build = builder.getLastFinishedBuild() 43 | if not build: 44 | # unknown build 45 | return self._image('unknown') 46 | 47 | # SUCCESS, WARNINGS, FAILURE, SKIPPED or EXCEPTION 48 | res = build.getResults() 49 | resname = Results[res] 50 | return self._image(resname) 51 | 52 | def _image(self, resname): 53 | img = 'public_html/status_%s.svg' % resname 54 | here = os.path.dirname(__file__) 55 | imgfile = os.path.join(here, img) 56 | 57 | return open(imgfile, 'rb').read() 58 | 59 | # class WebStatus(html.WebStatus): 60 | # def setupUsualPages(self, numbuilds, num_events, num_events_max): 61 | # html.WebStatus.setupUsualPages(self, numbuilds, num_events, num_events_max) 62 | # self.putChild("buildstatusimage", BuildStatusImageResource()) 63 | 64 | 65 | # and use the WebStatus defined above instead of buildbot's 66 | # c['status'].append(WebStatus(http_port=8010)) 67 | -------------------------------------------------------------------------------- /changehook.passwd.sample: -------------------------------------------------------------------------------- 1 | changehook:secret -------------------------------------------------------------------------------- /cppcheck.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import re 17 | 18 | from buildbot.process import logobserver 19 | from buildbot.status.results import FAILURE 20 | from buildbot.status.results import SUCCESS 21 | from buildbot.status.results import WARNINGS 22 | from buildbot.steps.shell import ShellCommand 23 | 24 | 25 | class Cppcheck(ShellCommand): 26 | # Highly inspirated from the Pylint step. 27 | name = "cppcheck" 28 | description = ["running", "cppcheck"] 29 | descriptionDone = ["cppcheck"] 30 | flunkingIssues = ('error',) 31 | 32 | MESSAGES = ( 33 | 'error', 'warning', 'style', 'performance', 'portability', 'information') 34 | 35 | renderables = ('binary', 'source', 'extra_args') 36 | 37 | def __init__(self, *args, **kwargs): 38 | 39 | for name, default in [('binary', 'cppcheck'), 40 | ('source', ['.']), 41 | ('enable', []), 42 | ('inconclusive', False), 43 | ('extra_args', [])]: 44 | setattr(self, name, default) 45 | if name in kwargs: 46 | setattr(self, name, kwargs[name]) 47 | del kwargs[name] 48 | 49 | ShellCommand.__init__(self, *args, **kwargs) 50 | self.addLogObserver( 51 | 'stdio', logobserver.LogLineObserver()) 52 | 53 | command = [self.binary] 54 | command.extend(self.source) 55 | if self.enable: 56 | command.append('--enable=%s' % ','.join(self.enable)) 57 | if self.inconclusive: 58 | command.append('--inconclusive') 59 | command.extend(self.extra_args) 60 | self.setCommand(command) 61 | 62 | counts = self.counts = {} 63 | summaries = self.summaries = {} 64 | for m in self.MESSAGES: 65 | counts[m] = 0 66 | summaries[m] = [] 67 | 68 | def logConsumer(self): 69 | line_re = re.compile( 70 | r'(?:\[.+\]: )?\((?P%s)\) .+' % '|'.join(self.MESSAGES)) 71 | 72 | while True: 73 | stream, line = yield 74 | m = line_re.match(line) 75 | if m is not None: 76 | msgsev = m.group('severity') 77 | self.summaries[msgsev].append(line) 78 | self.counts[msgsev] += 1 79 | 80 | def createSummary(self, log): 81 | self.descriptionDone = self.descriptionDone[:] 82 | for msg in self.MESSAGES: 83 | self.setProperty('cppcheck-%s' % msg, self.counts[msg], 'Cppcheck') 84 | if not self.counts[msg]: 85 | continue 86 | self.descriptionDone.append("%s=%d" % (msg, self.counts[msg])) 87 | self.addCompleteLog(msg, '\n'.join(self.summaries[msg])) 88 | self.setProperty('cppcheck-total', sum(self.counts.values()), 'Cppcheck') 89 | 90 | def evaluateCommand(self, cmd): 91 | """ cppcheck always return 0, unless a special parameter is given """ 92 | for msg in self.flunkingIssues: 93 | if self.counts[msg] != 0: 94 | return FAILURE 95 | if self.getProperty('cppcheck-total') != 0: 96 | return WARNINGS 97 | return SUCCESS 98 | -------------------------------------------------------------------------------- /crontab-startup: -------------------------------------------------------------------------------- 1 | # crontab buildslave startup on reboot 2 | 3 | @reboot cd /home/buildslave && /usr/local/bin/buildslave start slave 4 | 5 | # cpp-ethereum 6 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-cpp 7 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-cpp-pr 8 | @reboot /usr/bin/docker run -d --privileged=true -t cptobvious/buildslave-cpp-deb 9 | 10 | # go-ethereum 11 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-go 12 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-go-pr 13 | @reboot /usr/bin/docker run -d --privileged=true -t cptobvious/buildslave-go-deb 14 | 15 | # pyethereum 16 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-python 17 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-python-pr 18 | 19 | # ethereumj 20 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-java 21 | @reboot /usr/bin/docker run -d -t cptobvious/buildslave-java-pr 22 | -------------------------------------------------------------------------------- /factories/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/ethereum-buildbot/8a4c75e27da68d00cccb9cceadb3742d3814a1de/factories/__init__.py -------------------------------------------------------------------------------- /factories/buildslaves.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | @properties.renderer 9 | def _buildslave_stop_cmd(props): 10 | if 'last-container' in props: 11 | cmds = [] 12 | for container in props['last-container'].splitlines(): 13 | cmds.append("docker stop %s" % container) 14 | return " && ".join(cmds) 15 | return None 16 | 17 | # 18 | # Buildslave factories 19 | # 20 | def buildslave_factory(lang="cpp", client="cpp-ethereum"): 21 | factory = BuildFactory() 22 | 23 | # Build base image 24 | for step in [ 25 | Git( 26 | haltOnFailure=True, 27 | logEnviron=False, 28 | repourl='https://github.com/ethereum/ethereum-dockers.git', 29 | mode='incremental', 30 | codebase='ethereum-dockers', 31 | retry=(5, 3) 32 | ), 33 | ShellCommand( 34 | flunkOnFailure=False, 35 | logEnviron=False, 36 | name="cleanup-containers", 37 | description="cleaning up containers", 38 | descriptionDone="clean up containers", 39 | command="docker rm $(docker ps -a -q)", 40 | decodeRC={0: SUCCESS, 1: WARNINGS, 123: WARNINGS} 41 | ), 42 | ShellCommand( 43 | flunkOnFailure=False, 44 | logEnviron=False, 45 | name="cleanup-images", 46 | description="cleaning up images", 47 | descriptionDone="clean up images", 48 | command="docker rmi $(docker images -f 'dangling=true' -q)", 49 | decodeRC={0: SUCCESS, 1: WARNINGS, 123: WARNINGS} 50 | ), 51 | ShellCommand( 52 | haltOnFailure=True, 53 | logEnviron=False, 54 | name="docker-%s" % lang, 55 | description="building %s base" % lang, 56 | descriptionDone="build %s base" % lang, 57 | command=["docker", "build", "--no-cache", "-t", "cptobvious/%s-base" % client, "%s-base" % client], 58 | timeout=1800 59 | ), 60 | # ShellCommand( 61 | # logEnviron=False, 62 | # name="docker-%s-push" % lang, 63 | # command=["docker", "push", "cptobvious/%s-base" % client], 64 | # warnOnFailure=True, 65 | # decodeRC={0: SUCCESS, 1: WARNINGS} 66 | # ), 67 | SetPropertyFromCommand( 68 | haltOnFailure=True, 69 | logEnviron=False, 70 | name="last-container", 71 | command="docker ps -a | grep buildslave-%s | awk '{print $1}'" % lang, 72 | property="last-container" 73 | ), 74 | ShellCommand( 75 | haltOnFailure=True, 76 | logEnviron=False, 77 | name="buildslave-%s" % lang, 78 | description="building %s buildslave" % lang, 79 | descriptionDone="build %s buildslave" % lang, 80 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s" % lang, "%s-buildslave" % client], 81 | timeout=1800 82 | ) 83 | ]: factory.addStep(step) 84 | 85 | # Build develop buildslave 86 | if lang in ['cpp', 'go']: 87 | for step in [ 88 | ShellCommand( 89 | warnOnFailure=True, 90 | logEnviron=False, 91 | name="buildslave-%s-develop" % lang, 92 | description="building %s develop buildslave" % lang, 93 | descriptionDone="build %s develop buildslave" % lang, 94 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s-develop" % lang, "%s-buildslave-develop" % client], 95 | timeout=1800 96 | ) 97 | ]: factory.addStep(step) 98 | 99 | # Build deb packaging buildslave 100 | if lang in ['cpp', 'go']: 101 | factory.addStep( 102 | ShellCommand( 103 | warnOnFailure=True, 104 | logEnviron=False, 105 | name="buildslave-%s-deb" % lang, 106 | description="building %s deb buildslave" % lang, 107 | descriptionDone="build %s deb buildslave" % lang, 108 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s-deb" % lang, "%s-buildslave-deb" % client] 109 | )) 110 | 111 | # Build integration buildslave 112 | if lang in ['cpp']: 113 | factory.addStep( 114 | ShellCommand( 115 | warnOnFailure=True, 116 | logEnviron=False, 117 | name="buildslave-%s-integration" % lang, 118 | description="building %s integration buildslave" % lang, 119 | descriptionDone="build %s integration buildslave" % lang, 120 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s-integration" % lang, "%s-buildslave-integration" % client] 121 | )) 122 | 123 | # Build ARM buildslave 124 | if lang in ['go']: 125 | factory.addStep( 126 | ShellCommand( 127 | warnOnFailure=True, 128 | logEnviron=False, 129 | name="buildslave-%s-arm" % lang, 130 | description="building %s ARM buildslave" % lang, 131 | descriptionDone="build %s ARM buildslave" % lang, 132 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s-arm" % lang, "%s-buildslave-arm" % client] 133 | )) 134 | 135 | # Build pull request buildslave 136 | for step in [ 137 | ShellCommand( 138 | warnOnFailure=True, 139 | logEnviron=False, 140 | name="buildslave-%s-pr" % lang, 141 | description="building %s pr buildslave" % lang, 142 | descriptionDone="build %s pr buildslave" % lang, 143 | command=["docker", "build", "--no-cache", "-t", "cptobvious/buildslave-%s-pr" % lang, "%s-buildslave-pr" % client] 144 | ) 145 | ]: factory.addStep(step) 146 | 147 | # 148 | # Stop containers and run new ones 149 | # 150 | for step in [ 151 | ShellCommand( 152 | haltOnFailure=True, 153 | logEnviron=False, 154 | name="buildslave-%s-stop" % lang, 155 | description="stopping %s buildslave" % lang, 156 | descriptionDone="stop %s buildslave" % lang, 157 | command=_buildslave_stop_cmd, 158 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 159 | ), 160 | ShellCommand( 161 | haltOnFailure=True, 162 | logEnviron=False, 163 | name="buildslave-%s-run" % lang, 164 | description="starting %s buildslave" % lang, 165 | descriptionDone="start %s buildslave" % lang, 166 | command=["docker", "run", "--restart", "always", "-d", "-t", "cptobvious/buildslave-%s" % lang] 167 | ), 168 | ShellCommand( 169 | warnOnFailure=True, 170 | logEnviron=False, 171 | name="buildslave-%s-pr-run" % lang, 172 | description="starting %s pr buildslave" % lang, 173 | descriptionDone="start %s pr buildslave" % lang, 174 | command=["docker", "run", "--restart", "always", "-d", "-t", "cptobvious/buildslave-%s-pr" % lang] 175 | ) 176 | ]: factory.addStep(step) 177 | 178 | # Run develop buildslave 179 | if lang in ['cpp', 'go']: 180 | for step in [ 181 | ShellCommand( 182 | warnOnFailure=True, 183 | logEnviron=False, 184 | name="buildslave-%s-develop-run" % lang, 185 | description="starting %s develop buildslave" % lang, 186 | descriptionDone="start %s develop buildslave" % lang, 187 | command=["docker", "run", "--restart", "always", "-d", "-t", "cptobvious/buildslave-%s-develop" % lang] 188 | ) 189 | ]: factory.addStep(step) 190 | 191 | # Run deb packaging buildslave 192 | if lang in ['cpp', 'go']: 193 | for step in [ 194 | ShellCommand( 195 | warnOnFailure=True, 196 | logEnviron=False, 197 | name="buildslave-%s-deb-run" % lang, 198 | description="starting %s deb buildslave" % lang, 199 | descriptionDone="start %s deb buildslave" % lang, 200 | command=["docker", "run", "--restart", "always", "-d", "--privileged=true", "-t", "cptobvious/buildslave-%s-deb" % lang] 201 | ) 202 | ]: factory.addStep(step) 203 | 204 | # Run integration buildslave 205 | if lang in ['cpp']: 206 | for step in [ 207 | ShellCommand( 208 | warnOnFailure=True, 209 | logEnviron=False, 210 | name="buildslave-%s-integration-run" % lang, 211 | description="starting %s integration buildslave" % lang, 212 | descriptionDone="start %s integration buildslave" % lang, 213 | command=["docker", "run", "--restart", "always", "-d", "-t", "cptobvious/buildslave-%s-integration" % lang] 214 | ) 215 | ]: factory.addStep(step) 216 | 217 | # Run ARM buildslave 218 | if lang in ['go']: 219 | for step in [ 220 | ShellCommand( 221 | warnOnFailure=True, 222 | logEnviron=False, 223 | name="buildslave-%s-arm-run" % lang, 224 | description="starting %s ARM buildslave" % lang, 225 | descriptionDone="start %s ARM buildslave" % lang, 226 | command=["docker", "run", "--restart", "always", "-d", "-t", "cptobvious/buildslave-%s-arm" % lang] 227 | ) 228 | ]: factory.addStep(step) 229 | 230 | return factory 231 | -------------------------------------------------------------------------------- /factories/cpp_ethereum.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | @properties.renderer 9 | def get_cpp_revision(props): 10 | if 'got_revision' in props: 11 | return props['got_revision']['cpp-ethereum'] 12 | return None 13 | 14 | @properties.renderer 15 | def get_short_revision(props): 16 | if 'got_revision' in props: 17 | return props['got_revision']['cpp-ethereum'][:7] 18 | return None 19 | 20 | 21 | def testeth_cmd(cmd=[], evmjit=False): 22 | if evmjit: 23 | cmd += ['--vm', 'jit'] 24 | return cmd 25 | 26 | def cmake_cmd(cmd=[], ccache=True, evmjit=False, headless=True): 27 | # cmd.append("-DBUNDLE=default") 28 | cmd.append("-DFATDB=1") 29 | if headless: 30 | cmd.append("-DGUI=0") 31 | if evmjit: 32 | cmd.append("-DEVMJIT=1") 33 | elif ccache: 34 | cmd.append("-DEVMJIT=0") 35 | cmd.append("-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++") 36 | return cmd 37 | 38 | 39 | def cpp_ethereum_factory(branch='master', deb=False, evmjit=False, headless=True): 40 | factory = BuildFactory() 41 | 42 | for step in [ 43 | Git( 44 | haltOnFailure=True, 45 | logEnviron=False, 46 | repourl='https://github.com/ethereum/cpp-ethereum.git', 47 | branch=branch, 48 | mode='full', 49 | method='copy', 50 | codebase='cpp-ethereum', 51 | retry=(5, 3) 52 | ), 53 | Git( 54 | haltOnFailure=True, 55 | logEnviron=False, 56 | repourl='https://github.com/ethereum/tests.git', 57 | branch=branch, 58 | mode='incremental', 59 | codebase='tests', 60 | retry=(5, 3), 61 | workdir='tests' 62 | ), 63 | SetPropertyFromCommand( 64 | haltOnFailure=True, 65 | logEnviron=False, 66 | name="set-protocol", 67 | command='sed -ne "s/.*c_protocolVersion = \(.*\);/\\1/p" libethcore/Common.cpp', 68 | property="protocol" 69 | ), 70 | SetPropertyFromCommand( 71 | haltOnFailure=True, 72 | logEnviron=False, 73 | name="set-version", 74 | command='sed -ne "s/^set(PROJECT_VERSION \\"\(.*\)\\")$/\\1/p" CMakeLists.txt', 75 | property="version" 76 | ), 77 | Configure( 78 | haltOnFailure=True, 79 | logEnviron=False, 80 | command=cmake_cmd(["cmake", "."], evmjit=evmjit, headless=headless), 81 | env={"PATH": "${QTDIR}/bin:${PATH}"} 82 | ), 83 | Compile( 84 | haltOnFailure=True, 85 | logEnviron=False, 86 | command="make -j $(cat /proc/cpuinfo | grep processor | wc -l)" 87 | ), 88 | ShellCommand( 89 | haltOnFailure=True, 90 | logEnviron=False, 91 | name="make-install", 92 | description="installing", 93 | descriptionDone="install", 94 | command=["make", "install"] 95 | ), 96 | ShellCommand( 97 | haltOnFailure=True, 98 | logEnviron=False, 99 | name="ldconfig", 100 | description="running ldconfig", 101 | descriptionDone="ldconfig", 102 | command=["ldconfig"] 103 | ), 104 | Test( 105 | haltOnFailure=True, 106 | warnOnFailure=True, 107 | logEnviron=False, 108 | name="test-cpp", 109 | description="testing", 110 | descriptionDone="test", 111 | command=testeth_cmd(["./testeth"], evmjit=evmjit), 112 | env={ 113 | 'CTEST_OUTPUT_ON_FAILURE': '1', 114 | 'ETHEREUM_TEST_PATH': Interpolate('%(prop:workdir)s/tests'), 115 | 'EVMJIT': '-cache=0' 116 | }, 117 | workdir="build/test", 118 | maxTime=900 119 | ) 120 | ]: factory.addStep(step) 121 | 122 | # Trigger check and integration builders 123 | if not evmjit and not headless: 124 | for step in [ 125 | Trigger( 126 | schedulerNames=["cpp-ethereum-%s-check" % branch], 127 | waitForFinish=False, 128 | set_properties={ 129 | "protocol": Interpolate("%(prop:protocol)s"), 130 | "version": Interpolate("%(prop:version)s") 131 | }) 132 | ]: factory.addStep(step) 133 | 134 | # if branch is not 'master': 135 | # for step in [ 136 | # Trigger( 137 | # schedulerNames=["cpp-ethereum-integration"], 138 | # waitForFinish=False, 139 | # set_properties={ 140 | # "database": Interpolate("%(prop:database)s"), 141 | # "protocol": Interpolate("%(prop:protocol)s"), 142 | # "version": Interpolate("%(prop:version)s") 143 | # }) 144 | # ]: factory.addStep(step) 145 | 146 | # Trigger deb builders 147 | if not evmjit and headless: 148 | if deb: 149 | for architecture in ['i386', 'amd64']: 150 | for distribution in distributions: 151 | for step in [ 152 | Trigger( 153 | schedulerNames=["cpp-ethereum-%s-%s-%s" % (branch, architecture, distribution)], 154 | waitForFinish=False, 155 | set_properties={ 156 | "version": Interpolate("%(prop:version)s") 157 | }) 158 | ]: factory.addStep(step) 159 | 160 | # Trigger PoC server buildslave 161 | if deb and not evmjit and headless: 162 | for step in [ 163 | Trigger( 164 | schedulerNames=["cpp-ethereum-%s-server" % branch], 165 | waitForFinish=False, 166 | set_properties={ 167 | "protocol": Interpolate("%(prop:protocol)s"), 168 | "version": Interpolate("%(prop:version)s") 169 | } 170 | ) 171 | ]: factory.addStep(step) 172 | 173 | return factory 174 | 175 | 176 | def cpp_check_factory(branch='develop'): 177 | factory = BuildFactory() 178 | 179 | for step in [ 180 | Git( 181 | haltOnFailure=True, 182 | logEnviron=False, 183 | repourl='https://github.com/ethereum/cpp-ethereum.git', 184 | branch=branch, 185 | mode='full', 186 | method='copy', 187 | codebase='cpp-ethereum', 188 | retry=(5, 3) 189 | ), 190 | WarningCountingShellCommand( 191 | logEnviron=False, 192 | name="cppcheck", 193 | description="running cppcheck", 194 | descriptionDone="cppcheck", 195 | command=["cppcheck", "--force", "--enable=all", "--template", "gcc", "."] 196 | ) 197 | ]: factory.addStep(step) 198 | 199 | return factory 200 | -------------------------------------------------------------------------------- /factories/cpp_ethereum_brew.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import cpp_ethereum 9 | reload(cpp_ethereum) 10 | from cpp_ethereum import * 11 | 12 | def brew_cpp_factory(branch='develop', headless=True): 13 | factory = BuildFactory() 14 | for step in [ 15 | Git( 16 | haltOnFailure=True, 17 | logEnviron=False, 18 | repourl='https://github.com/ethereum/cpp-ethereum.git', 19 | branch=branch, 20 | mode='full', 21 | method='copy', 22 | codebase='cpp-ethereum', 23 | retry=(5, 3) 24 | ), 25 | Git( 26 | haltOnFailure=True, 27 | logEnviron=False, 28 | repourl='https://github.com/ethereum/homebrew-ethereum.git', 29 | branch='master', 30 | mode='incremental', 31 | codebase='homebrew-ethereum', 32 | retry=(5, 3), 33 | workdir='brew' 34 | ), 35 | SetPropertyFromCommand( 36 | haltOnFailure=True, 37 | logEnviron=False, 38 | name="set-old-version", 39 | descriptionDone='set old version', 40 | command='sed -ne "s/^%s version \'\(.*\)\'/\\1/p" cpp-ethereum.rb' % ("" if branch == 'master' else " "), 41 | property='old_version', 42 | workdir='brew', 43 | ) 44 | ]: factory.addStep(step) 45 | 46 | if headless: 47 | if branch == 'master': 48 | for step in [ 49 | ShellCommand( 50 | haltOnFailure=True, 51 | logEnviron=False, 52 | name="update-version", 53 | descriptionDone='update version', 54 | command=Interpolate('sed -i "" "s/^ version \'\(.*\)\'/ version \'%(prop:version)s\'/" cpp-ethereum.rb'), 55 | workdir='brew', 56 | ) 57 | ]: factory.addStep(step) 58 | 59 | if branch == 'develop': 60 | for step in [ 61 | ShellCommand( 62 | haltOnFailure=True, 63 | logEnviron=False, 64 | name="update-version", 65 | descriptionDone='update version', 66 | command=Interpolate('sed -i "" "s/^ version \'\(.*\)\'/ version \'%(prop:version)s\'/" cpp-ethereum.rb'), 67 | workdir='brew', 68 | ) 69 | ]: factory.addStep(step) 70 | 71 | for step in [ 72 | ShellCommand( 73 | haltOnFailure=True, 74 | logEnviron=False, 75 | name="git-add", 76 | descriptionDone='git add', 77 | command='git add cpp-ethereum.rb', 78 | workdir='brew', 79 | ), 80 | ShellCommand( 81 | logEnviron=False, 82 | name="git-commit", 83 | descriptionDone='git commit', 84 | command=Interpolate('git commit -m "bump cpp-ethereum to %(prop:version)s on %(kw:branch)s"', branch=branch), 85 | workdir='brew', 86 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 87 | ), 88 | ShellCommand( 89 | haltOnFailure=True, 90 | logEnviron=False, 91 | name="git-push", 92 | descriptionDone='git push', 93 | command='git pull --no-edit && git push', 94 | workdir='brew', 95 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 96 | ) 97 | ]: factory.addStep(step) 98 | 99 | for step in [ 100 | ShellCommand( 101 | haltOnFailure=True, 102 | logEnviron=False, 103 | name="clean-up", 104 | description='cleaning up', 105 | descriptionDone='clean up', 106 | command=["brew", "remove", "cpp-ethereum"], 107 | workdir='brew', 108 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 109 | ), 110 | ShellCommand( 111 | haltOnFailure=True, 112 | logEnviron=False, 113 | name="clean-up-bottles", 114 | description='cleaning up bottles', 115 | descriptionDone='clean up bottles', 116 | command="rm *.tar.gz", 117 | workdir='brew', 118 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 119 | ), 120 | ShellCommand( 121 | haltOnFailure=True, 122 | logEnviron=False, 123 | name="brew-update", 124 | description='brew updating', 125 | descriptionDone='brew update', 126 | command=["brew", "update"], 127 | workdir='brew' 128 | ), 129 | Compile( 130 | haltOnFailure=True, 131 | logEnviron=False, 132 | description='brewing', 133 | descriptionDone='brew', 134 | command=brew_install_cmd(cmd=['brew', 'install', 'cpp-ethereum.rb', '--with-evmjit', '-v', '--build-bottle'], branch=branch, headless=headless), 135 | workdir='brew' 136 | ) 137 | ]: factory.addStep(step) 138 | 139 | if headless: 140 | for step in [ 141 | ShellCommand( 142 | haltOnFailure=True, 143 | logEnviron=False, 144 | name="bottle", 145 | command=brew_install_cmd(cmd=['brew', 'bottle', 'cpp-ethereum.rb', '--with-evmjit', '-v'], branch=branch, headless=headless), 146 | description="bottling", 147 | descriptionDone="bottle", 148 | workdir='brew' 149 | ), 150 | SetPropertyFromCommand( 151 | haltOnFailure=True, 152 | logEnviron=False, 153 | name="set-old-revision", 154 | command='sed -ne "s/^%s revision \(.*\)/\\1/p" cpp-ethereum.rb' % ("" if branch == 'master' else " "), 155 | property='old_revision', 156 | workdir='brew' 157 | ), 158 | SetProperty( 159 | name="set-bottle", 160 | description="setting bottle", 161 | descriptionDone="set bottle", 162 | property="bottle", 163 | value=Interpolate("cpp-ethereum-%(prop:version)s.yosemite.bottle%(kw:revision)s.tar.gz", revision=brew_revision_suffix) 164 | ), 165 | SetPropertyFromCommand( 166 | haltOnFailure=True, 167 | logEnviron=False, 168 | name="sha1sum", 169 | command=Interpolate('sha1sum %(prop:bottle)s | grep -o -w "\w\{40\}"'), 170 | property='sha1sum', 171 | workdir='brew' 172 | ), 173 | FileUpload( 174 | haltOnFailure=True, 175 | name='upload-bottle', 176 | slavesrc=Interpolate("%(prop:bottle)s"), 177 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:buildnumber)s/bottle/" 178 | "cpp-ethereum-%(prop:version)s.yosemite.bottle.%(prop:buildnumber)s.tar.gz"), 179 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:buildnumber)s/bottle/" 180 | "cpp-ethereum-%(prop:version)s.yosemite.bottle.%(prop:buildnumber)s.tar.gz"), 181 | workdir='brew' 182 | ) 183 | ]: factory.addStep(step) 184 | 185 | if branch == 'master' and headless: 186 | for step in [ 187 | ShellCommand( 188 | haltOnFailure=True, 189 | logEnviron=False, 190 | name="update-bottle-url", 191 | descriptionDone='update bottle url', 192 | command=Interpolate('sed -i "" "s/^ root_url \'\(.*\)\'/ root_url \'https:\/\/build.ethdev.com\/builds\/' 193 | '%(kw:urlbuildername)s\/%(prop:buildnumber)s\/bottle\'/" cpp-ethereum.rb', urlbuildername=urlbuildername), 194 | workdir='brew', 195 | ), 196 | ShellCommand( 197 | haltOnFailure=True, 198 | logEnviron=False, 199 | name="update-brew-revision", 200 | descriptionDone='update brew revision', 201 | command=Interpolate('sed -i "" "s/^ revision \(.*\)/ revision %(prop:buildnumber)s/" cpp-ethereum.rb'), 202 | workdir='brew', 203 | ), 204 | ShellCommand( 205 | haltOnFailure=True, 206 | logEnviron=False, 207 | name="update-sha1sum", 208 | descriptionDone='update sha1sum', 209 | command=Interpolate('sed -i "" "s/^ sha1 \'\(.*\)\' => :yosemite/ sha1 \'%(prop:sha1sum)s\' => :yosemite/" cpp-ethereum.rb'), 210 | workdir='brew', 211 | ), 212 | ShellCommand( 213 | haltOnFailure=True, 214 | logEnviron=False, 215 | name="git-add", 216 | descriptionDone='git add', 217 | command='git add cpp-ethereum.rb', 218 | workdir='brew', 219 | ), 220 | ShellCommand( 221 | logEnviron=False, 222 | name="git-commit", 223 | descriptionDone='git commit', 224 | command=Interpolate('git commit -m "bump version to %(prop:version)s at ethereum/cpp-ethereum@%(kw:cpp_revision)s"', 225 | cpp_revision=get_short_revision), 226 | workdir='brew', 227 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 228 | ), 229 | ShellCommand( 230 | haltOnFailure=True, 231 | logEnviron=False, 232 | name="git-push", 233 | descriptionDone='git push', 234 | command='git pull --no-edit && git push', 235 | workdir='brew', 236 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 237 | ) 238 | ]: factory.addStep(step) 239 | 240 | if branch == 'develop' and headless: 241 | for step in [ 242 | ShellCommand( 243 | haltOnFailure=True, 244 | logEnviron=False, 245 | name="update-bottle-url", 246 | descriptionDone='update bottle url', 247 | command=Interpolate('sed -i "" "s/^ root_url \'\(.*\)\'/ root_url \'https:\/\/build.ethdev.com\/builds\/' 248 | '%(kw:urlbuildername)s\/%(prop:buildnumber)s\/bottle\'/" cpp-ethereum.rb', urlbuildername=urlbuildername), 249 | workdir='brew', 250 | ), 251 | ShellCommand( 252 | haltOnFailure=True, 253 | logEnviron=False, 254 | name="update-brew-revision", 255 | descriptionDone='update brew revision', 256 | command=Interpolate('sed -i "" "s/^ revision \(.*\)/ revision %(prop:buildnumber)s/" cpp-ethereum.rb'), 257 | workdir='brew', 258 | ), 259 | ShellCommand( 260 | haltOnFailure=True, 261 | logEnviron=False, 262 | name="update-sha1sum", 263 | descriptionDone='update sha1sum', 264 | command=Interpolate('sed -i "" "s/^ sha1 \'\(.*\)\' => :yosemite/ sha1 \'%(prop:sha1sum)s\' => :yosemite/" cpp-ethereum.rb'), 265 | workdir='brew', 266 | ), 267 | ShellCommand( 268 | haltOnFailure=True, 269 | logEnviron=False, 270 | name="update-successful-version", 271 | descriptionDone='update successful version', 272 | command=Interpolate('sed -i "" "s/^ version \'\(.*\)\'/ version \'%(prop:version)s\'/" cpp-ethereum.rb'), 273 | workdir='brew', 274 | ), 275 | ShellCommand( 276 | haltOnFailure=True, 277 | logEnviron=False, 278 | name="update-successful-revision", 279 | descriptionDone='update successful revision', 280 | command=Interpolate('sed -i "" "s/:revision => \'\(.*\)\'/:revision => \'%(kw:cpp_revision)s\'/" cpp-ethereum.rb', 281 | cpp_revision=get_cpp_revision), 282 | workdir='brew', 283 | ), 284 | ShellCommand( 285 | haltOnFailure=True, 286 | logEnviron=False, 287 | name="git-add", 288 | descriptionDone='git add', 289 | command='git add cpp-ethereum.rb', 290 | workdir='brew', 291 | ), 292 | ShellCommand( 293 | logEnviron=False, 294 | name="git-commit", 295 | descriptionDone='git commit', 296 | command=Interpolate('git commit -m "bump successful to %(prop:version)s at ethereum/cpp-ethereum@%(kw:cpp_revision)s"', 297 | cpp_revision=get_short_revision), 298 | workdir='brew', 299 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 300 | ), 301 | ShellCommand( 302 | haltOnFailure=True, 303 | logEnviron=False, 304 | name="git-push", 305 | descriptionDone='git push', 306 | command='git pull --no-edit && git push', 307 | workdir='brew', 308 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 309 | ) 310 | ]: factory.addStep(step) 311 | return factory 312 | -------------------------------------------------------------------------------- /factories/cpp_ethereum_osx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import cpp_ethereum 9 | reload(cpp_ethereum) 10 | from cpp_ethereum import * 11 | 12 | def cmake_osx_cmd(cmd=[], ccache=True, evmjit=False, headless=True): 13 | # cmd.append("-DBUNDLE=default") 14 | cmd.append("-DFATDB=1") 15 | cmd.append("-DETHASHCL=1") 16 | if headless: 17 | cmd.append("-DGUI=0") 18 | if evmjit: 19 | cmd += [ 20 | "-DCMAKE_BUILD_TYPE=RelWithDebInfo", 21 | "-DLLVM_DIR=/usr/local/opt/llvm/share/llvm/cmake", 22 | "-DEVMJIT=1" 23 | ] 24 | elif ccache: 25 | cmd.append("-DCMAKE_CXX_COMPILER=/usr/local/opt/ccache/libexec/g++") 26 | return cmd 27 | 28 | def osx_cpp_check_factory(branch='develop'): 29 | factory = BuildFactory() 30 | 31 | scan_build_path = "/usr/local/opt/llvm/share/clang/tools/scan-build" 32 | analyzer = "c++-analyzer" 33 | 34 | for step in [ 35 | Git( 36 | haltOnFailure=True, 37 | logEnviron=False, 38 | repourl='https://github.com/ethereum/cpp-ethereum.git', 39 | branch=branch, 40 | mode='full', 41 | method='copy', 42 | codebase='cpp-ethereum', 43 | retry=(5, 3) 44 | ), 45 | Configure( 46 | haltOnFailure=True, 47 | logEnviron=False, 48 | command=["cmake", ".", "-DCMAKE_CXX_COMPILER=%s/%s" % (scan_build_path, analyzer)] 49 | ), 50 | Compile( 51 | logEnviron=False, 52 | name="scan-build", 53 | command=["%s/scan-build" % scan_build_path, "--use-analyzer=%s/%s" % (scan_build_path, analyzer), "make", "-j", "6"] 54 | ) 55 | ]: factory.addStep(step) 56 | 57 | return factory 58 | 59 | # C++ 60 | def osx_cpp_factory(branch='develop', isPullRequest=False, evmjit=False, headless=True): 61 | factory = BuildFactory() 62 | 63 | for step in [ 64 | Git( 65 | haltOnFailure=True, 66 | logEnviron=False, 67 | repourl='https://github.com/ethereum/cpp-ethereum.git', 68 | branch=branch, 69 | mode='full', 70 | method='copy', 71 | codebase='cpp-ethereum', 72 | retry=(5, 3) 73 | ), 74 | Git( 75 | haltOnFailure=True, 76 | logEnviron=False, 77 | repourl='https://github.com/ethereum/tests.git', 78 | branch=branch, 79 | mode='incremental', 80 | codebase='tests', 81 | retry=(5, 3), 82 | workdir='tests' 83 | ), 84 | SetPropertyFromCommand( 85 | haltOnFailure=True, 86 | logEnviron=False, 87 | name="set-version", 88 | command='sed -ne "s/^set(PROJECT_VERSION \\"\(.*\)\\")$/\\1/p" CMakeLists.txt', 89 | property="version" 90 | ), 91 | Configure( 92 | haltOnFailure=True, 93 | logEnviron=False, 94 | command=cmake_osx_cmd(['cmake', '.'], evmjit=evmjit, headless=headless) 95 | ), 96 | Compile( 97 | haltOnFailure=True, 98 | logEnviron=False, 99 | command="make -j $(sysctl -n hw.ncpu)" 100 | ) 101 | ]: factory.addStep(step) 102 | 103 | if not headless: 104 | for step in [ 105 | ShellCommand( 106 | haltOnFailure=True, 107 | logEnviron=False, 108 | name="make-install", 109 | description='running make install', 110 | descriptionDone='make install', 111 | command=['make', 'install'], 112 | workdir='build/alethzero' 113 | ), 114 | ShellCommand( 115 | haltOnFailure=True, 116 | logEnviron=False, 117 | name="make-install-mix", 118 | description='running mix make install', 119 | descriptionDone='make install mix', 120 | command=['make', 'install'], 121 | workdir='build/mix' 122 | ) 123 | ]: factory.addStep(step) 124 | 125 | for step in [ 126 | Test( 127 | haltOnFailure=True, 128 | warnOnFailure=True, 129 | logEnviron=False, 130 | name="test-cpp", 131 | description="testing", 132 | descriptionDone="test", 133 | command=testeth_cmd(["./testeth"], evmjit=evmjit), 134 | env={'CTEST_OUTPUT_ON_FAILURE': '1', 'ETHEREUM_TEST_PATH': Interpolate('%(prop:workdir)s/tests')}, 135 | workdir="build/test", 136 | maxTime=900 137 | ), 138 | ]: factory.addStep(step) 139 | 140 | # Trigger check 141 | if not evmjit and not headless: 142 | for step in [ 143 | Trigger( 144 | schedulerNames=["cpp-ethereum-%s-osx-check" % branch], 145 | waitForFinish=False, 146 | set_properties={ 147 | "version": Interpolate("%(prop:version)s") 148 | } 149 | ) 150 | ]: factory.addStep(step) 151 | 152 | # Trigger deb builders 153 | if not evmjit and headless: 154 | if not isPullRequest: 155 | for step in [ 156 | Trigger( 157 | schedulerNames=["cpp-ethereum-%s-brew" % branch], 158 | waitForFinish=False, 159 | set_properties={ 160 | "version": Interpolate("%(prop:version)s") 161 | } 162 | ) 163 | ]: factory.addStep(step) 164 | 165 | # Package AlethZero.app 166 | if not isPullRequest and not headless: 167 | for step in [ 168 | Compile( 169 | haltOnFailure=True, 170 | logEnviron=False, 171 | command="make -j $(sysctl -n hw.ncpu) appdmg" 172 | ), 173 | SetPropertyFromCommand( 174 | haltOnFailure=True, 175 | logEnviron=False, 176 | name="set-sha1sum", 177 | command=Interpolate('sha1sum Ethereum.dmg | grep -o -w "\w\{40\}"'), 178 | property='sha1sum' 179 | ), 180 | SetProperty( 181 | description="setting filename", 182 | descriptionDone="set filename", 183 | name="set-filename", 184 | property="filename", 185 | value=Interpolate("AlethZero-OSX-%(kw:time_string)s-%(prop:version)s-%(kw:short_revision)s.dmg", 186 | time_string=get_time_string, 187 | short_revision=get_short_revision) 188 | ), 189 | FileUpload( 190 | haltOnFailure=True, 191 | name='upload-alethzero', 192 | slavesrc="Ethereum.dmg", 193 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:filename)s"), 194 | url=Interpolate("builds/%(prop:buildername)s/%(prop:filename)s") 195 | ), 196 | MasterShellCommand( 197 | name="clean-latest-link", 198 | description='cleaning latest link', 199 | descriptionDone='clean latest link', 200 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/AlethZero-OSX-latest.dmg")] 201 | ), 202 | MasterShellCommand( 203 | haltOnFailure=True, 204 | name="link-latest", 205 | description='linking latest', 206 | descriptionDone='link latest', 207 | command=['ln', '-sf', Interpolate("%(prop:filename)s"), Interpolate("public_html/builds/%(prop:buildername)s/AlethZero-OSX-latest.dmg")] 208 | ) 209 | ]: factory.addStep(step) 210 | 211 | return factory 212 | -------------------------------------------------------------------------------- /factories/cpp_ethereum_windows.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import cpp_ethereum 9 | reload(cpp_ethereum) 10 | from cpp_ethereum import * 11 | 12 | # 13 | # Windows factories 14 | # 15 | def win_cpp_factory(branch='master', isPullRequest=False): 16 | factory = BuildFactory() 17 | 18 | sed = '"C:\\Program Files (x86)\\GnuWin32\\bin\\sed.exe"' 19 | 20 | for step in [ 21 | Git( 22 | haltOnFailure=True, 23 | logEnviron=False, 24 | repourl='https://github.com/ethereum/cpp-ethereum.git', 25 | branch=branch, 26 | mode='full', 27 | method='copy', 28 | codebase='cpp-ethereum', 29 | retry=(5, 3) 30 | ), 31 | SetPropertyFromCommand( 32 | haltOnFailure=True, 33 | logEnviron=False, 34 | name="set-protocol", 35 | command='%s -ne "s/.*c_protocolVersion = \(.*\);/\\1/p" libethcore\Common.cpp' % sed, 36 | property="protocol" 37 | ), 38 | SetPropertyFromCommand( 39 | haltOnFailure=True, 40 | logEnviron=False, 41 | name="set-version", 42 | command='%s -ne "s/^set(PROJECT_VERSION \\"\(.*\)\\")$/\\1/p" CMakeLists.txt' % sed, 43 | property="version" 44 | ), 45 | ShellCommand( 46 | haltOnFailure=True, 47 | logEnviron=False, 48 | name="dependencies", 49 | description='dependencies', 50 | descriptionDone='dependencies', 51 | command=['getstuff.bat'], 52 | workdir="build/extdep" 53 | ), 54 | Configure( 55 | haltOnFailure=True, 56 | logEnviron=False, 57 | command=["cmake", ".", "-G", "Visual Studio 12 Win64"] 58 | ), 59 | MsBuild12( 60 | haltOnFailure=True, 61 | logEnviron=False, 62 | projectfile="ethereum.sln", 63 | config="Release", 64 | platform="x64" 65 | ) 66 | ]: factory.addStep(step) 67 | 68 | if not isPullRequest: 69 | for step in [ 70 | MsBuild12( 71 | haltOnFailure=True, 72 | logEnviron=False, 73 | name="installer", 74 | projectfile="PACKAGE.vcxproj", 75 | config="Release", 76 | platform="x64" 77 | ), 78 | SetProperty( 79 | description="setting filename", 80 | descriptionDone="set filename", 81 | name="set-filename", 82 | property="filename", 83 | value=Interpolate("Ethereum-%(prop:version)s-win64-%(kw:time_string)s-%(kw:short_revision)s.exe", 84 | time_string=get_time_string, 85 | short_revision=get_short_revision) 86 | ), 87 | FileUpload( 88 | name="upload", 89 | slavesrc=Interpolate("Ethereum-%(prop:version)s-win64.exe"), 90 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:filename)s"), 91 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:filename)s") 92 | ), 93 | MasterShellCommand( 94 | name="clean-latest-link", 95 | description='cleaning latest link', 96 | descriptionDone='clean latest link', 97 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/Ethereum-win64-latest.exe")] 98 | ), 99 | MasterShellCommand( 100 | haltOnFailure=True, 101 | name="link-latest", 102 | description='linking latest', 103 | descriptionDone='link latest', 104 | command=['ln', '-sf', Interpolate("%(prop:filename)s"), Interpolate("public_html/builds/%(prop:buildername)s/Ethereum-win64-latest.exe")] 105 | ) 106 | ]: factory.addStep(step) 107 | 108 | return factory 109 | -------------------------------------------------------------------------------- /factories/debian.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import go_ethereum 9 | reload(go_ethereum) 10 | from go_ethereum import _go_cmds 11 | 12 | @properties.renderer 13 | def jsonrpc_for_develop(props): 14 | if 'version' in props: 15 | return int(props['version'][2:3]) > 3 16 | return None 17 | 18 | @properties.renderer 19 | def deb_version(props): 20 | if 'version' in props: 21 | if ":" in props['version']: 22 | return props['version'][2:] 23 | else: 24 | return props['version'] 25 | return None 26 | 27 | def deb_factory(name=None, repourl=None, ppabranch=None, branch='master', distribution='trusty', architecture='i386', testdeb=False): 28 | factory = BuildFactory() 29 | 30 | for step in [ 31 | Git( 32 | haltOnFailure=True, 33 | logEnviron=False, 34 | repourl=repourl, 35 | branch=branch, 36 | mode='full', 37 | method='copy', 38 | retry=(5, 3) 39 | ), 40 | 41 | # Set snapshot property for Launchpad versioning 42 | SetProperty( 43 | description="setting snapshot", 44 | descriptionDone="set snapshot", 45 | name="set-snapshot", 46 | property="snapshot", 47 | value=Interpolate("+%(prop:buildnumber)s%(kw:snapshot)s%(kw:distribution)s", 48 | snapshot=(dev_snapshot if branch == 'develop' or testdeb else ""), 49 | distribution=distribution) 50 | ) 51 | ]: factory.addStep(step) 52 | 53 | # Run 'go get' for go-ethereum 54 | if name == 'ethereum': 55 | for step in [ 56 | ShellCommand( 57 | haltOnFailure=True, 58 | logEnviron=False, 59 | name="move-src", 60 | command=_go_cmds(branch=branch), 61 | description="moving src", 62 | descriptionDone="move src", 63 | env={"GOPATH": Interpolate("%(prop:workdir)s/go")} 64 | ), 65 | ShellCommand( 66 | logEnviron=False, 67 | name="source-tarball", 68 | description="creating source tarball", 69 | descriptionDone="create source tarball", 70 | command=Interpolate("tar --exclude .git --exclude pkg --exclude bin -czf " 71 | "../%(kw:name)s_%(prop:version)s%(prop:snapshot)s.orig.tar.gz .", name=name), 72 | workdir=Interpolate("%(prop:workdir)s/go") 73 | ), 74 | # clean up the Git checkout for debuild 75 | ShellCommand( 76 | logEnviron=False, 77 | name="clean-build", 78 | command="rm -rf build && mkdir build", 79 | description="cleaning build", 80 | descriptionDone="clean build", 81 | workdir=Interpolate("%(prop:workdir)s") 82 | ) 83 | ]: factory.addStep(step) 84 | # Get qtwebengine-opensource-src tarball 85 | elif name == 'qtwebengine-opensource-src': 86 | for step in [ 87 | ShellCommand( 88 | logEnviron=False, 89 | name="source-tarball", 90 | description="getting source tarball", 91 | descriptionDone="get source tarball", 92 | command=Interpolate("wget -c https://download.qt.io/official_releases/qt/5.4/%(kw:version)s/submodules/" 93 | "qtwebengine-opensource-src-%(kw:version)s.tar.xz " 94 | "-O ../%(kw:name)s_%(prop:version)s%(prop:snapshot)s.orig.tar.xz", 95 | name=name, 96 | version=branch) 97 | ), 98 | # clean up the Git checkout for debuild 99 | ShellCommand( 100 | logEnviron=False, 101 | name="clean-build", 102 | command="rm -rf build && mkdir build", 103 | description="cleaning build", 104 | descriptionDone="clean build", 105 | workdir=Interpolate("%(prop:workdir)s") 106 | ) 107 | ]: factory.addStep(step) 108 | # Just create the source tarball for others 109 | else: 110 | factory.addStep(ShellCommand( 111 | logEnviron=False, 112 | name="source-tarball", 113 | description="creating source tarball", 114 | descriptionDone="create source tarball", 115 | command=Interpolate("tar --exclude .git -czf " 116 | "../%(kw:name)s_%(kw:version)s%(prop:snapshot)s.orig.tar.gz .", 117 | name=name, 118 | version=deb_version) 119 | )) 120 | 121 | for step in [ 122 | # Get debian/ directory 123 | ShellCommand( 124 | logEnviron=False, 125 | name="get-debian", 126 | description="getting debian folder", 127 | descriptionDone="get debian folder", 128 | command=Interpolate("wget https://github.com/ethereum/ethereum-ppa/archive/%(kw:ppabranch)s.tar.gz -O- |" 129 | " tar -zx --exclude package.sh --exclude README.md --strip-components=1", 130 | ppabranch=ppabranch) 131 | ), 132 | 133 | # Bump version 134 | ShellCommand( 135 | logEnviron=False, 136 | name="bump-debian", 137 | description="bumping %s deb version" % distribution, 138 | descriptionDone="bump %s deb version" % distribution, 139 | command=Interpolate("EMAIL='caktux (Buildserver key) ' " 140 | "dch -v %(prop:version)s%(prop:snapshot)s-0ubuntu1 " 141 | "'git build of %(prop:got_revision)s'", 142 | dist=distribution) 143 | ), 144 | 145 | # Build a source package 146 | ShellCommand( 147 | logEnviron=False, 148 | name="source-package", 149 | description="debuilding %s" % distribution, 150 | descriptionDone="debuild %s" % distribution, 151 | command="debuild -S -sa -us -uc" 152 | ), 153 | ]: factory.addStep(step) 154 | 155 | # Source only packages for dependencies, build local deb packages otherwise 156 | if name in ['ethereum', 'cpp-ethereum']: 157 | # Add pbuilderrc with ccache config 158 | # factory.addStep(FileDownload( 159 | # mastersrc="pbuilderrc", 160 | # slavedest="~/.pbuilderrc" 161 | # )) 162 | main_ppa = "http://ppa.launchpad.net/ethereum/ethereum/ubuntu" 163 | dev_ppa = "http://ppa.launchpad.net/ethereum/ethereum-dev/ubuntu" 164 | qt_ppa = "http://ppa.launchpad.net/ethereum/ethereum-qt/ubuntu" 165 | 166 | if name is not 'ethereum' or distribution is not 'wily': 167 | for step in [ 168 | # Set PPA dependencies for pbuilder 169 | ShellCommand( 170 | logEnviron=False, 171 | name="pbuilder-opts", 172 | description="setting pbuilderrc", 173 | descriptionDone="set pbuilderrc", 174 | command="echo 'OTHERMIRROR=\"" 175 | "deb [trusted=yes] {1} {0} main|deb-src [trusted=yes] {1} {0} main|" 176 | "deb [trusted=yes] {2} {0} main|deb-src [trusted=yes] {2} {0} main|" 177 | "deb [trusted=yes] {3} {0} main|deb-src [trusted=yes] {3} {0} main\"' > ~/.pbuilderrc" 178 | .format(distribution, main_ppa, dev_ppa, qt_ppa) 179 | ) 180 | ]: factory.addStep(step) 181 | 182 | for step in [ 183 | # Package that thing already 184 | UbuCowbuilder( 185 | logEnviron=False, 186 | architecture=architecture, 187 | distribution=distribution, 188 | basetgz="/var/cache/pbuilder/%s-%s-ethereum.cow" % (distribution, architecture), 189 | keyring="/usr/share/keyrings/ubuntu-archive-keyring.gpg" 190 | ) 191 | ]: factory.addStep(step) 192 | 193 | for step in [ 194 | # Run Lintian 195 | # DebLintian( 196 | # fileloc=Interpolate("%(prop:deb-changes)s") 197 | # ), 198 | # Prepare .changes file for Launchpad 199 | ShellCommand( 200 | name='prepare-changes', 201 | description='preparing changes', 202 | descriptionDone='prepare changes', 203 | command=Interpolate("sed -i -e s/UNRELEASED/%(kw:dist)s/ " 204 | "-e s/urgency=medium/urgency=low/ ../*.changes", 205 | dist=distribution) 206 | ), 207 | 208 | # Gather artefacts 209 | ShellCommand( 210 | haltOnFailure=True, 211 | logEnviron=False, 212 | name="move-packages", 213 | description='moving packages', 214 | descriptionDone='move packages', 215 | command="mkdir result; mv %s../*.changes ../*.dsc ../*.gz %sresult/" % 216 | ("*.deb *.changes " if name in ['ethereum', 'cpp-ethereum'] else "", 217 | "../*.xz " if name == 'qtwebengine-opensource-src' else ""), 218 | ), 219 | 220 | # Upload result folder 221 | DirectoryUpload( 222 | slavesrc="result", 223 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 224 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 225 | ), 226 | 227 | # Clean latest link 228 | MasterShellCommand( 229 | name='clean-latest', 230 | description='cleaning latest link', 231 | descriptionDone='clean latest link', 232 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/latest")] 233 | ), 234 | 235 | # Link latest 236 | MasterShellCommand( 237 | name='link-latest', 238 | description='linking latest', 239 | descriptionDone='link latest', 240 | command=['ln', '-sf', Interpolate("%(prop:buildnumber)s"), Interpolate("public_html/builds/%(prop:buildername)s/latest")] 241 | ), 242 | 243 | # Create source changes folders 244 | MasterShellCommand( 245 | name='mkdir-changes', 246 | description='mkdir', 247 | descriptionDone='mkdir', 248 | command=['mkdir', '-p', 249 | Interpolate("changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s", 250 | dist=distribution, arch=architecture, name=name)] 251 | ), 252 | 253 | # Link source changes 254 | MasterShellCommand( 255 | name='link-changes', 256 | description='linking changes', 257 | descriptionDone='link changes', 258 | command=['ln', '-sf', 259 | Interpolate("../../../../public_html/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 260 | Interpolate("changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s", 261 | dist=distribution, 262 | arch=architecture, 263 | name=name)] 264 | ) 265 | ]: factory.addStep(step) 266 | 267 | # Use ethereum-dev ppa for snapshots, only dput one source pkg 268 | ppa_suffix = "" 269 | if branch == 'develop' or (name == 'libjson-rpc-cpp' and jsonrpc_for_develop): 270 | ppa_suffix = "-dev" 271 | elif name == 'qtwebengine-opensource-src': 272 | ppa_suffix = "-qt" 273 | 274 | if architecture == 'amd64': 275 | for step in [ 276 | # debsign 277 | MasterShellCommand( 278 | haltOnFailure=False, 279 | flunkOnFailure=False, 280 | name='debsign', 281 | description='debsigning', 282 | descriptionDone='debsign', 283 | command=['debsign', Interpolate("changes/%(kw:dist)s/%(kw:arch)s/" 284 | "%(kw:name)s/%(prop:buildnumber)s/" 285 | "%(kw:name)s_%(kw:version)s%(prop:snapshot)s-" 286 | "0ubuntu1_source.changes", 287 | dist=distribution, 288 | arch=architecture, 289 | name=name, 290 | version=deb_version)] 291 | ), 292 | # dput 293 | MasterShellCommand( 294 | name='dput', 295 | description='dputting', 296 | descriptionDone='dput', 297 | command=['dput', 'ppa:%s%s' % ("caktux/ppa" if testdeb else "ethereum/ethereum", ppa_suffix), 298 | Interpolate("changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s/" 299 | "%(prop:buildnumber)s/%(kw:name)s_%(kw:version)s%(prop:snapshot)s-" 300 | "0ubuntu1_source.changes", 301 | dist=distribution, 302 | arch=architecture, 303 | name=name, 304 | version=deb_version)] 305 | ) 306 | ]: factory.addStep(step) 307 | 308 | return factory 309 | -------------------------------------------------------------------------------- /factories/debian_backport.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | 9 | def backport_factory(name=None, setVersion=False, repo='ethereum-qt', distribution='trusty', architecture='amd64', packages=[]): 10 | factory = BuildFactory() 11 | 12 | for package in packages: 13 | cmd = ["backportpackage", "--dont-sign", "-w", "result", "-d", distribution] 14 | if setVersion: 15 | cmd.extend(["-v", Interpolate("%(prop:version)s")]) 16 | cmd.append(package) 17 | 18 | for step in [ 19 | # Create backport 20 | ShellCommand( 21 | haltOnFailure=True, 22 | logEnviron=False, 23 | name="backport-%s" % package, 24 | description='backporting %s' % package, 25 | descriptionDone='backport %s' % package, 26 | command=cmd, 27 | env={ 28 | "DEBFULLNAME": "caktux (Buildserver key)", 29 | "DEBEMAIL": "caktux@gmail.com", 30 | "UBUMAIL": "caktux@gmail.com" 31 | } 32 | ) 33 | ]: factory.addStep(step) 34 | 35 | for step in [ 36 | # Prepare .changes file for Launchpad 37 | ShellCommand( 38 | name='prepare-changes', 39 | description='preparing changes', 40 | descriptionDone='prepare changes', 41 | command=Interpolate('sed -i -e s/%(kw:dist)s-backports/%(kw:dist)s/ -e s/urgency=medium/urgency=low/ *.changes', dist=distribution), 42 | workdir="build/result" 43 | ), 44 | # Upload result folder 45 | DirectoryUpload( 46 | slavesrc="result", 47 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 48 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 49 | ), 50 | # Clean latest link 51 | MasterShellCommand( 52 | name='clean-latest', 53 | description='cleaning latest link', 54 | descriptionDone='clean latest link', 55 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/latest")] 56 | ), 57 | # Link latest 58 | MasterShellCommand( 59 | name='link-latest', 60 | description='linking latest', 61 | descriptionDone='link latest', 62 | command=['ln', '-sf', Interpolate("%(prop:buildnumber)s"), Interpolate("public_html/builds/%(prop:buildername)s/latest")] 63 | ), 64 | # Create source changes folders 65 | MasterShellCommand( 66 | name='mkdir-changes', 67 | description='mkdir', 68 | descriptionDone='mkdir', 69 | command=['mkdir', '-p', Interpolate("changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s", dist=distribution, arch=architecture, name=name)] 70 | ), 71 | # Link source changes 72 | MasterShellCommand( 73 | name='link-changes', 74 | description='linking changes', 75 | descriptionDone='link changes', 76 | command=['ln', '-sf', Interpolate("../../../../public_html/builds/%(prop:buildername)s/%(prop:buildnumber)s"), 77 | Interpolate("changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s", 78 | dist=distribution, arch=architecture, name=name)] 79 | ), 80 | # debsign 81 | MasterShellCommand( 82 | haltOnFailure=False, 83 | flunkOnFailure=False, 84 | name='debsign', 85 | description='debsigning', 86 | descriptionDone='debsign', 87 | command=Interpolate("debsign changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s/%(prop:buildnumber)s/*.changes", 88 | dist=distribution, arch=architecture, name=name) 89 | ), 90 | # dput 91 | MasterShellCommand( 92 | name='dput', 93 | description='dputting', 94 | descriptionDone='dput', 95 | command=Interpolate("dput ppa:ethereum/%(kw:repo)s changes/%(kw:dist)s/%(kw:arch)s/%(kw:name)s/%(prop:buildnumber)s/*.changes", 96 | repo=repo, dist=distribution, arch=architecture, name=name) 97 | ) 98 | ]: factory.addStep(step) 99 | 100 | return factory 101 | -------------------------------------------------------------------------------- /factories/ethereumj.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | # Java 9 | def ethereumj_factory(branch='master'): 10 | factory = BuildFactory() 11 | for step in [ 12 | Git( 13 | haltOnFailure=True, 14 | logEnviron=False, 15 | repourl='https://github.com/ethereum/ethereumj.git', 16 | branch=branch, 17 | mode='full', 18 | method='copy', 19 | codebase='ethereumj', 20 | retry=(5, 3) 21 | ), 22 | ShellCommand( 23 | logEnviron=False, 24 | flunkOnFailure=False, 25 | warnOnFailure=True, 26 | name="build", 27 | command=["./gradlew", "build", "--debug"], 28 | description="building", 29 | descriptionDone="gradlew" 30 | ), 31 | ShellCommand( 32 | logEnviron=False, 33 | flunkOnFailure=False, 34 | warnOnFailure=True, 35 | name="install", 36 | command=["./gradlew", "install", "--debug"], 37 | description="installing", 38 | descriptionDone="install" 39 | ) 40 | ]: factory.addStep(step) 41 | 42 | return factory 43 | -------------------------------------------------------------------------------- /factories/factory.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import re # NOQA 5 | import time 6 | import urllib 7 | 8 | from buildbot.process import properties 9 | from buildbot.process.properties import Interpolate # NOQA 10 | from buildbot.process.factory import BuildFactory # NOQA 11 | from buildbot.steps.source.git import Git # NOQA 12 | from buildbot.steps.master import MasterShellCommand, SetProperty # NOQA 13 | from buildbot.steps.package.deb.lintian import DebLintian # NOQA 14 | from buildbot.steps.package.deb.pbuilder import UbuCowbuilder # NOQA 15 | from buildbot.steps.shell import Configure, Compile, SetPropertyFromCommand, ShellCommand, Test, WarningCountingShellCommand # NOQA 16 | from buildbot.steps.transfer import FileDownload, FileUpload, DirectoryUpload # NOQA 17 | from buildbot.steps.trigger import Trigger # NOQA 18 | from buildbot.steps.vstudio import MsBuild12 # NOQA 19 | from buildbot.status.results import SUCCESS, WARNINGS, SKIPPED, FAILURE # EXCEPTION, RETRY # NOQA 20 | # from buildbot.steps.cppcheck import Cppcheck # TODO native on nine 21 | 22 | distributions = ['trusty', 'vivid', 'wily', 'xenial'] 23 | 24 | @properties.renderer 25 | def get_time_string(props): 26 | return time.strftime("%Y%m%d%H%M%S", time.localtime()) 27 | 28 | @properties.renderer 29 | def dev_snapshot(props): 30 | return "SNAPSHOT%s" % time.strftime("%Y%m%d%H%M%S", time.localtime()) 31 | 32 | @properties.renderer 33 | def urlbuildername(props): 34 | if 'buildername' in props: 35 | return urllib.quote(props['buildername']) 36 | return None 37 | 38 | @properties.renderer 39 | def brew_revision_suffix(props): 40 | if 'old_revision' in props and 'old_version' in props: 41 | if props['old_version'] == props['version']: 42 | return ".%s" % (int(props['old_revision']) + 1) 43 | else: 44 | return "" 45 | return None 46 | 47 | def warnings(self): 48 | fail = False 49 | steps = self.build.getStatus().getSteps() 50 | for step in steps: 51 | (step_result, text) = step.getResults() 52 | if step_result != SUCCESS and step_result != SKIPPED and step_result is not None: 53 | fail = True 54 | return fail 55 | 56 | def no_warnings(self): 57 | fail = False 58 | steps = self.build.getStatus().getSteps() 59 | for step in steps: 60 | (step_result, text) = step.getResults() 61 | if step_result != SUCCESS and step_result != SKIPPED and step_result is not None: 62 | fail = True 63 | if fail: 64 | return False 65 | else: 66 | return True 67 | 68 | # 69 | # OSX factories 70 | # 71 | def brew_install_cmd(cmd=[], branch='master', headless=True): 72 | if not headless: 73 | cmd.append('--with-gui') 74 | if branch == 'develop': 75 | cmd.append('--devel') 76 | return cmd 77 | -------------------------------------------------------------------------------- /factories/go_ethereum.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | @properties.renderer 9 | def get_short_revision_go(props): 10 | if 'got_revision' in props: 11 | return props['got_revision']['go-ethereum'][:7] 12 | return None 13 | 14 | 15 | def _go_cmds(branch='master'): 16 | cmds = [ 17 | "mkdir -p $GOPATH/src/github.com/ethereum", 18 | "cp -a . $GOPATH/src/github.com/ethereum/go-ethereum", 19 | "rm -rf $GOPATH/pkg" 20 | ] 21 | 22 | return " && ".join(cmds) 23 | 24 | 25 | def go_ethereum_factory(branch='master', deb=False): 26 | factory = BuildFactory() 27 | for step in [ 28 | Git( 29 | haltOnFailure=True, 30 | logEnviron=False, 31 | repourl='https://github.com/ethereum/go-ethereum.git', 32 | branch=branch, 33 | mode='full', 34 | method='copy', 35 | codebase='go-ethereum', 36 | retry=(5, 3) 37 | ), 38 | SetPropertyFromCommand( 39 | haltOnFailure=True, 40 | logEnviron=False, 41 | name="set-version", 42 | command='sed -ne "s/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" VERSION', 43 | property="version" 44 | ), 45 | ShellCommand( 46 | haltOnFailure=True, 47 | logEnviron=False, 48 | name="make-clean", 49 | command=["make", "clean"], 50 | description="cleaning up", 51 | descriptionDone="clean up" 52 | ), 53 | ShellCommand( 54 | haltOnFailure=True, 55 | logEnviron=False, 56 | name="make-all", 57 | description="installing", 58 | descriptionDone="install", 59 | command=["make", "all"] 60 | ), 61 | ShellCommand( 62 | haltOnFailure=True, 63 | name="go-test", 64 | description="go testing", 65 | descriptionDone="go test", 66 | command=["make", "test"], 67 | maxTime=900 68 | ) 69 | ]: factory.addStep(step) 70 | 71 | if deb: 72 | for architecture in ['i386', 'amd64']: 73 | for distribution in distributions: 74 | for step in [ 75 | Trigger( 76 | schedulerNames=["go-ethereum-%s-%s-%s" % (branch, architecture, distribution)], 77 | waitForFinish=False, 78 | set_properties={ 79 | "version": Interpolate("%(prop:version)s") 80 | } 81 | ) 82 | ]: factory.addStep(step) 83 | 84 | return factory 85 | -------------------------------------------------------------------------------- /factories/go_ethereum_arm.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import go_ethereum 9 | reload(go_ethereum) 10 | from go_ethereum import get_short_revision_go 11 | 12 | 13 | def arm_go_factory(branch='develop', isPullRequest=False): 14 | factory = BuildFactory() 15 | 16 | env = { 17 | "CC": "arm-linux-gnueabi-gcc-5", 18 | "GOOS": "linux", 19 | "GOARCH": "arm", 20 | "GOARM": "5", 21 | "CGO_ENABLED": "1" 22 | } 23 | 24 | for step in [ 25 | Git( 26 | haltOnFailure=True, 27 | logEnviron=False, 28 | repourl='https://github.com/ethereum/go-ethereum.git', 29 | branch=branch, 30 | mode='full', 31 | method='copy', 32 | codebase='go-ethereum', 33 | retry=(5, 3) 34 | ), 35 | SetPropertyFromCommand( 36 | haltOnFailure=True, 37 | logEnviron=False, 38 | name="set-version", 39 | command='sed -ne "s/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" VERSION', 40 | property="version" 41 | ), 42 | ShellCommand( 43 | haltOnFailure=True, 44 | logEnviron=False, 45 | name="make-clean", 46 | command=["make", "clean"], 47 | description="cleaning up", 48 | descriptionDone="clean up" 49 | ), 50 | ShellCommand( 51 | haltOnFailure=True, 52 | logEnviron=False, 53 | name="make-all", 54 | description="installing", 55 | descriptionDone="install", 56 | command=["make", "all"], 57 | env=env 58 | ), 59 | # ShellCommand( 60 | # haltOnFailure=True, 61 | # name="go-test", 62 | # description="go testing", 63 | # descriptionDone="go test", 64 | # command=["make", "test"], 65 | # maxTime=900, 66 | # env=env 67 | # ) 68 | ]: factory.addStep(step) 69 | 70 | if not isPullRequest: 71 | for step in [ 72 | ShellCommand( 73 | haltOnFailure=True, 74 | logEnviron=False, 75 | name="tar-geth", 76 | description='packing', 77 | descriptionDone='pack', 78 | command=['tar', '-cjf', 'geth.tar.bz2', 'build/bin/geth'] 79 | ), 80 | SetPropertyFromCommand( 81 | haltOnFailure=True, 82 | logEnviron=False, 83 | name="set-sha256sum", 84 | command=Interpolate('sha256sum geth.tar.bz2 | grep -o -w "\w\{64\}"'), 85 | property='sha256sum' 86 | ), 87 | SetProperty( 88 | description="setting filename", 89 | descriptionDone="set filename", 90 | name="set-filename", 91 | property="filename", 92 | value=Interpolate("geth-ARM-%(kw:time_string)s-%(prop:version)s-%(kw:short_revision)s.tar.bz2", 93 | time_string=get_time_string, 94 | short_revision=get_short_revision_go) 95 | ), 96 | FileUpload( 97 | haltOnFailure=True, 98 | name='upload-geth', 99 | slavesrc="geth.tar.bz2", 100 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:filename)s"), 101 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:filename)s") 102 | ), 103 | MasterShellCommand( 104 | name="clean-latest-link", 105 | description='cleaning latest link', 106 | descriptionDone='clean latest link', 107 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/geth-ARM-latest.tar.bz2")] 108 | ), 109 | MasterShellCommand( 110 | haltOnFailure=True, 111 | name="link-latest", 112 | description='linking latest', 113 | descriptionDone='link latest', 114 | command=['ln', '-sf', Interpolate("%(prop:filename)s"), Interpolate("public_html/builds/%(prop:buildername)s/geth-ARM-latest.tar.bz2")] 115 | ) 116 | ]: factory.addStep(step) 117 | 118 | return factory 119 | -------------------------------------------------------------------------------- /factories/go_ethereum_brew.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import go_ethereum 9 | reload(go_ethereum) 10 | from go_ethereum import * 11 | 12 | @properties.renderer 13 | def revision_or_buildnumber(props): 14 | if 'revision' in props: 15 | return props['revision'] 16 | return props['buildnumber'] 17 | 18 | def release_name(release): 19 | return 'Yosemite' if release == 'yosemite' else 'El Capitan' 20 | 21 | def brew_go_factory(branch='develop', release='el_capitan'): 22 | factory = BuildFactory() 23 | 24 | for step in [ 25 | Git( 26 | haltOnFailure=True, 27 | logEnviron=False, 28 | repourl='https://github.com/ethereum/go-ethereum.git', 29 | branch=branch, 30 | mode='full', 31 | method='copy', 32 | codebase='go-ethereum', 33 | retry=(5, 3) 34 | ), 35 | Git( 36 | haltOnFailure=True, 37 | logEnviron=False, 38 | repourl='https://github.com/ethereum/homebrew-ethereum.git', 39 | branch='master', 40 | mode='incremental', 41 | codebase='homebrew-ethereum', 42 | retry=(5, 3), 43 | workdir='brew' 44 | ) 45 | ]: factory.addStep(step) 46 | 47 | # Bump version and revision only once 48 | if release == 'el_capitan': 49 | if branch == 'master': 50 | for step in [ 51 | ShellCommand( 52 | haltOnFailure=True, 53 | logEnviron=False, 54 | name="update-version", 55 | descriptionDone='update go-ethereum version', 56 | command=Interpolate('sed -i "" "s/^' 57 | ' version \'\(.*\)\'/' 58 | ' version \'%(prop:version)s\'/" ethereum.rb'), 59 | workdir='brew', 60 | ) 61 | ]: factory.addStep(step) 62 | 63 | elif branch == 'develop': 64 | for step in [ 65 | ShellCommand( 66 | haltOnFailure=True, 67 | logEnviron=False, 68 | name="update-version", 69 | descriptionDone='update go-ethereum version', 70 | command=Interpolate('sed -i "" "s/^' 71 | ' version \'\(.*\)\'/' 72 | ' version \'%(prop:version)s\'/" ethereum.rb'), 73 | workdir='brew', 74 | ) 75 | ]: factory.addStep(step) 76 | 77 | for step in [ 78 | ShellCommand( 79 | haltOnFailure=True, 80 | logEnviron=False, 81 | name="git-add", 82 | descriptionDone='git add', 83 | command='git add ethereum.rb', 84 | workdir='brew' 85 | ), 86 | ShellCommand( 87 | logEnviron=False, 88 | name="git-commit", 89 | descriptionDone='git commit', 90 | command=Interpolate('git commit -m "bump ethereum to %(prop:version)s on %(kw:branch)s"', branch=branch), 91 | workdir='brew', 92 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 93 | ), 94 | ShellCommand( 95 | haltOnFailure=True, 96 | logEnviron=False, 97 | name="git-push", 98 | descriptionDone='git push', 99 | command='git pull --no-edit && git push', 100 | workdir='brew' 101 | ) 102 | ]: factory.addStep(step) 103 | else: 104 | for step in [ 105 | ShellCommand( 106 | haltOnFailure=True, 107 | logEnviron=False, 108 | name="git-pull", 109 | descriptionDone='git pull', 110 | command='git pull --no-edit', 111 | workdir='brew' 112 | ) 113 | ]: factory.addStep(step) 114 | 115 | for step in [ 116 | ShellCommand( 117 | haltOnFailure=True, 118 | logEnviron=False, 119 | name="cleanup", 120 | description='cleanup', 121 | descriptionDone='clean', 122 | command=["brew", "remove", "ethereum"], 123 | workdir='brew', 124 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 125 | ), 126 | ShellCommand( 127 | haltOnFailure=True, 128 | logEnviron=False, 129 | name="clean-up-bottles", 130 | description='cleaning up bottles', 131 | descriptionDone='clean up bottles', 132 | command="rm *.tar.gz", 133 | workdir='brew', 134 | decodeRC={0: SUCCESS, 1: SUCCESS, 2: WARNINGS} 135 | ), 136 | ShellCommand( 137 | haltOnFailure=True, 138 | logEnviron=False, 139 | name="brew-update", 140 | description='brew updating', 141 | descriptionDone='brew update', 142 | command=["brew", "update"], 143 | workdir='brew' 144 | ), 145 | Compile( 146 | haltOnFailure=True, 147 | logEnviron=False, 148 | name="brew", 149 | description='running brew', 150 | descriptionDone='brew', 151 | command=brew_install_cmd(cmd=['brew', 'install', 'ethereum.rb', '-v', '--build-bottle'], branch=branch), 152 | workdir='brew' 153 | ), 154 | ShellCommand( 155 | haltOnFailure=True, 156 | logEnviron=False, 157 | name="bottle", 158 | command="brew bottle ethereum.rb -v%s > bottle.log" % (" --devel" if branch is "develop" else ""), 159 | logfiles={"bottle.log": "bottle.log"}, 160 | lazylogfiles=True, 161 | description="bottling", 162 | descriptionDone="bottle", 163 | workdir='brew' 164 | ), 165 | SetPropertyFromCommand( 166 | name="set-bottle", 167 | command='sed -ne "s/.*Bottling \(.*\).../\\1/p" bottle.log', 168 | description="setting bottle", 169 | descriptionDone="set bottle", 170 | property="bottle", 171 | workdir="brew" 172 | ), 173 | SetPropertyFromCommand( 174 | haltOnFailure=True, 175 | logEnviron=False, 176 | name="set-sha256sum", 177 | command='sed -ne "s/.*sha256 \\"\(.*\)\\".*/\\1/p" bottle.log', 178 | property='sha256sum', 179 | workdir='brew' 180 | ), 181 | FileUpload( 182 | haltOnFailure=True, 183 | name='upload-bottle', 184 | slavesrc=Interpolate("%(prop:bottle)s"), 185 | masterdest=Interpolate(("public_html/builds/bottles%(kw:dev)s/" 186 | "ethereum-%(prop:version)s.%(kw:release)s.bottle.%(kw:revision)s.tar.gz"), 187 | dev="-dev" if branch == 'develop' else "", 188 | release=release, 189 | revision=revision_or_buildnumber), 190 | url=Interpolate("/builds/bottles%(kw:dev)s/" 191 | "ethereum-%(prop:version)s.%(kw:release)s.bottle.%(kw:revision)s.tar.gz", 192 | dev="-dev" if branch == 'develop' else "", 193 | release=release, 194 | revision=revision_or_buildnumber), 195 | workdir='brew' 196 | ) 197 | ]: factory.addStep(step) 198 | 199 | if branch == 'master': 200 | for step in [ 201 | ShellCommand( 202 | haltOnFailure=True, 203 | logEnviron=False, 204 | name="git-pull", 205 | descriptionDone='git pull', 206 | command='git pull --no-edit', 207 | workdir='brew' 208 | ), 209 | ShellCommand( 210 | haltOnFailure=True, 211 | logEnviron=False, 212 | name="update-brew-revision", 213 | descriptionDone='update brew revision', 214 | command=Interpolate('sed -i "" "s/^' 215 | ' revision \(.*\)/' 216 | ' revision %(kw:revision)s/" ethereum.rb', 217 | revision=revision_or_buildnumber), 218 | workdir='brew' 219 | ), 220 | ShellCommand( 221 | haltOnFailure=True, 222 | logEnviron=False, 223 | name="update-sha256sum", 224 | descriptionDone='update sha256sum', 225 | command=Interpolate('sed -i "" "s/^' 226 | ' sha256 \'\(.*\)\' => :%(kw:release)s/' 227 | ' sha256 \'%(prop:sha256sum)s\' => :%(kw:release)s/" ethereum.rb', release=release), 228 | workdir='brew' 229 | ), 230 | ShellCommand( 231 | haltOnFailure=True, 232 | logEnviron=False, 233 | name="git-add", 234 | descriptionDone='git add', 235 | command='git add ethereum.rb', 236 | workdir='brew' 237 | ), 238 | ShellCommand( 239 | logEnviron=False, 240 | name="git-commit", 241 | descriptionDone='git commit', 242 | command=Interpolate('git commit -m "ethereum %(prop:version)s on %(kw:branch)s at ethereum/go-ethereum@%(kw:go_revision)s for %(kw:release)s"', 243 | branch=branch, 244 | go_revision=get_short_revision_go, 245 | release=release_name(release)), 246 | workdir='brew', 247 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 248 | ), 249 | ShellCommand( 250 | haltOnFailure=True, 251 | logEnviron=False, 252 | name="git-push", 253 | descriptionDone='git push', 254 | command='git pull --no-edit && git push', 255 | workdir='brew' 256 | ) 257 | ]: factory.addStep(step) 258 | 259 | elif branch == 'develop': 260 | for step in [ 261 | ShellCommand( 262 | haltOnFailure=True, 263 | logEnviron=False, 264 | name="git-pull", 265 | descriptionDone='git pull', 266 | command='git pull --no-edit', 267 | workdir='brew' 268 | ), 269 | ShellCommand( 270 | haltOnFailure=True, 271 | logEnviron=False, 272 | name="update-brew-revision", 273 | descriptionDone='update brew revision', 274 | command=Interpolate('sed -i "" "s/^' 275 | ' revision \(.*\)/' 276 | ' revision %(kw:revision)s/" ethereum.rb', 277 | revision=revision_or_buildnumber), 278 | workdir='brew' 279 | ), 280 | ShellCommand( 281 | haltOnFailure=True, 282 | logEnviron=False, 283 | name="update-sha256sum", 284 | descriptionDone='update sha256sum', 285 | command=Interpolate('sed -i "" "s/^' 286 | ' sha256 \'\(.*\)\' => :%(kw:release)s/' 287 | ' sha256 \'%(prop:sha256sum)s\' => :%(kw:release)s/" ethereum.rb', release=release), 288 | workdir='brew' 289 | ), 290 | ShellCommand( 291 | haltOnFailure=True, 292 | logEnviron=False, 293 | name="git-add", 294 | descriptionDone='git add', 295 | command='git add ethereum.rb', 296 | workdir='brew' 297 | ), 298 | ShellCommand( 299 | logEnviron=False, 300 | name="git-commit", 301 | descriptionDone='git commit', 302 | command=Interpolate('git commit -m "ethereum %(prop:version)s on %(kw:branch)s at ethereum/go-ethereum@%(kw:go_revision)s for %(kw:release)s"', 303 | branch=branch, 304 | go_revision=get_short_revision_go, 305 | release=release_name(release)), 306 | workdir='brew', 307 | decodeRC={0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 308 | ), 309 | ShellCommand( 310 | haltOnFailure=True, 311 | logEnviron=False, 312 | name="git-push", 313 | descriptionDone='git push', 314 | command='git pull --no-edit && git push', 315 | workdir='brew' 316 | ) 317 | ]: factory.addStep(step) 318 | 319 | # Trigger Yosemite build 320 | if release == 'el_capitan': 321 | for step in [ 322 | Trigger( 323 | name='brew-yosemite', 324 | schedulerNames=["go-ethereum-%s-yosemite" % branch], 325 | waitForFinish=False, 326 | set_properties={ 327 | "version": Interpolate("%(prop:version)s"), 328 | "revision": Interpolate("%(prop:buildnumber)s") 329 | } 330 | ) 331 | ]: factory.addStep(step) 332 | 333 | return factory 334 | -------------------------------------------------------------------------------- /factories/go_ethereum_osx.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | 9 | def osx_go_factory(branch='develop', isPullRequest=False): 10 | factory = BuildFactory() 11 | 12 | for step in [ 13 | Git( 14 | haltOnFailure=True, 15 | logEnviron=False, 16 | repourl='https://github.com/ethereum/go-ethereum.git', 17 | branch=branch, 18 | mode='full', 19 | method='copy', 20 | codebase='go-ethereum', 21 | retry=(5, 3) 22 | ), 23 | SetPropertyFromCommand( 24 | haltOnFailure=True, 25 | logEnviron=False, 26 | name="update-version", 27 | command='gsed -ne "s/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" VERSION', 28 | property="version" 29 | ), 30 | ShellCommand( 31 | haltOnFailure=True, 32 | logEnviron=False, 33 | name="make-clean", 34 | description="cleaning up", 35 | descriptionDone="clean up", 36 | command=["make", "clean"] 37 | ), 38 | ShellCommand( 39 | haltOnFailure=True, 40 | logEnviron=False, 41 | name="make-all", 42 | description="installing", 43 | descriptionDone="install", 44 | command=["make", "all"] 45 | ), 46 | ShellCommand( 47 | haltOnFailure=True, 48 | name="go-test", 49 | description="go testing", 50 | descriptionDone="go test", 51 | command=["make", "test"], 52 | maxTime=900 53 | ) 54 | ]: factory.addStep(step) 55 | 56 | if not isPullRequest: 57 | for step in [ 58 | Trigger( 59 | name='brew-el-capitan', 60 | schedulerNames=["go-ethereum-%s-el-capitan" % branch], 61 | waitForFinish=False, 62 | set_properties={ 63 | "version": Interpolate("%(prop:version)s") 64 | } 65 | ) 66 | ]: factory.addStep(step) 67 | 68 | return factory 69 | -------------------------------------------------------------------------------- /factories/go_ethereum_windows.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | import go_ethereum 9 | reload(go_ethereum) 10 | from go_ethereum import get_short_revision_go 11 | 12 | def _go_cmds_win(branch='master'): 13 | cmds = [ 14 | "mkdir %GOPATH%\\src\\github.com\\ethereum", 15 | "xcopy /S/E *.* %GOPATH%\\src\\github.com\\ethereum\\go-ethereum\\" 16 | ] 17 | 18 | return " && ".join(cmds) 19 | 20 | def windows_go_factory(branch='develop', isPullRequest=False): 21 | factory = BuildFactory() 22 | 23 | env = { 24 | "GOPATH": Interpolate("%(prop:workdir)s\\go;%(prop:workdir)s\\build\\Godeps\\_workspace"), 25 | 'PATH': [Interpolate("%(prop:workdir)s\\go\\bin"), "${PATH}"] 26 | } 27 | 28 | sed = '"C:\\Program Files (x86)\\GnuWin32\\bin\\sed.exe"' 29 | zip_ = '"C:\\Program Files (x86)\\GnuWin32\\bin\\zip.exe"' 30 | 31 | for step in [ 32 | Git( 33 | haltOnFailure=True, 34 | logEnviron=False, 35 | repourl='https://github.com/ethereum/go-ethereum.git', 36 | branch=branch, 37 | mode='full', 38 | method='copy', 39 | codebase='go-ethereum', 40 | retry=(5, 3) 41 | ), 42 | SetPropertyFromCommand( 43 | haltOnFailure=True, 44 | logEnviron=False, 45 | name="set-version", 46 | command='%s -ne "s/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" VERSION' % sed, 47 | property="version" 48 | ), 49 | ShellCommand( 50 | haltOnFailure=True, 51 | logEnviron=False, 52 | name="go-cleanup", 53 | command=Interpolate("rd /s /q %(prop:workdir)s\\go && mkdir %(prop:workdir)s\\go"), 54 | description="cleaning up", 55 | descriptionDone="clean up" 56 | ), 57 | ShellCommand( 58 | haltOnFailure=True, 59 | logEnviron=False, 60 | name="move-src", 61 | description="moving src", 62 | descriptionDone="move src", 63 | command=_go_cmds_win(branch=branch), 64 | env={"GOPATH": Interpolate("%(prop:workdir)s\go")} 65 | ), 66 | ShellCommand( 67 | haltOnFailure=True, 68 | logEnviron=False, 69 | name="build-geth", 70 | description="building geth", 71 | descriptionDone="build geth", 72 | command="go build -v github.com\ethereum\go-ethereum\cmd\geth", 73 | env=env 74 | ) 75 | ]: factory.addStep(step) 76 | 77 | for step in [ 78 | ShellCommand( 79 | flunkOnFailure=False, 80 | warnOnFailure=True, 81 | logEnviron=False, 82 | name="go-test", 83 | description="go testing", 84 | descriptionDone="go test", 85 | command="go test github.com\ethereum\go-ethereum\...", 86 | env=env, 87 | maxTime=900 88 | ) 89 | ]: factory.addStep(step) 90 | 91 | if not isPullRequest: 92 | for step in [ 93 | ShellCommand( 94 | haltOnFailure=True, 95 | logEnviron=False, 96 | name="zip", 97 | description='zipping', 98 | descriptionDone='zipped', 99 | command="%s geth.zip geth.exe" % zip_ 100 | ), 101 | SetProperty( 102 | description="setting filename", 103 | descriptionDone="set filename", 104 | name="set-filename", 105 | property="filename", 106 | value=Interpolate("Geth-Win64-%(kw:time_string)s-%(prop:version)s-%(kw:short_revision)s.zip", 107 | time_string=get_time_string, 108 | short_revision=get_short_revision_go) 109 | ), 110 | FileUpload( 111 | haltOnFailure=True, 112 | name='upload', 113 | slavesrc="geth.zip", 114 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/%(prop:filename)s"), 115 | url=Interpolate("/builds/%(prop:buildername)s/%(prop:filename)s") 116 | ), 117 | MasterShellCommand( 118 | name="clean-latest-link", 119 | description='cleaning latest link', 120 | descriptionDone='clean latest link', 121 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/Geth-Win64-latest.zip")] 122 | ), 123 | MasterShellCommand( 124 | haltOnFailure=True, 125 | name="link-latest", 126 | description='linking latest', 127 | descriptionDone='link latest', 128 | command=['ln', '-sf', Interpolate("%(prop:filename)s"), Interpolate("public_html/builds/%(prop:buildername)s/Geth-Win64-latest.zip")] 129 | ) 130 | ]: factory.addStep(step) 131 | 132 | return factory 133 | -------------------------------------------------------------------------------- /factories/integration.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import StringIO 5 | 6 | import factory 7 | reload(factory) 8 | from factory import * 9 | 10 | from buildbot import locks 11 | integration_lock = locks.SlaveLock("integration", maxCount=1) 12 | 13 | class XvfbNoseTest(ShellCommand): 14 | 15 | def __init__(self, test_files, min_coverage, reportdir=""): 16 | test_paths = '' 17 | for test_file in test_files: 18 | test_paths += ' ' + test_file + '.py' 19 | self.packages = test_files 20 | cover_packages = '--cover-package=' + ','.join(test_files) 21 | count_packages = len(test_files) 22 | name_packages = test_files[0] + ' test' if count_packages == 1 else 'tests' 23 | if reportdir: 24 | reportdir = "/" + reportdir 25 | self.reportdir = reportdir 26 | 27 | command = Interpolate('DISPLAY=:1 xvfb-run -s "-screen 0 1280x1200x8" nosetests -v' 28 | '--with-html --html-file=report%s/index.html --cover-tests ' 29 | '--with-coverage ' % reportdir + cover_packages + 30 | ' --cover-min-percentage=' + str(min_coverage) + 31 | ' --cover-erase --cover-html --cover-html-dir=report%s/coverage' % reportdir + test_paths) 32 | description = 'running ' + name_packages 33 | descriptionDone = name_packages 34 | ShellCommand.__init__( 35 | self, 36 | name=name_packages, 37 | command=command, 38 | description=description, 39 | descriptionDone=descriptionDone, 40 | flunkOnWarnings=False, 41 | flunkOnFailure=False, 42 | haltOnFailure=False, 43 | warnOnFailure=True, 44 | warnOnWarnings=True, 45 | workdir="integration/tests", 46 | locks=[integration_lock.access('exclusive')] 47 | ) 48 | 49 | # this counter will feed Progress along the 'test cases' metric 50 | 51 | # counter = TestCaseCounter() 52 | # self.addLogObserver('stdio', counter) 53 | # self.progressMetrics += ('tests',) 54 | 55 | def createSummary(self, log): 56 | buildername = self.getProperty('buildername') 57 | buildnumber = self.getProperty('buildnumber') 58 | 59 | url = '/reports/' + buildername + '/' + str(buildnumber) + '/report' + self.reportdir 60 | 61 | lines = list(StringIO.StringIO(log.getText()).readlines()) 62 | 63 | # 64 | # HTML test report 65 | # 66 | passed, total = self._getRatio(lines, len(self.packages)) 67 | # os.chmod(report, stat.S_IROTH) # ? 68 | self.addURL('passed %s/%s' % (passed, total), url) 69 | 70 | # 71 | # Coverage test report 72 | # 73 | percentage = 'N/A' 74 | for line in lines: 75 | if line.startswith(self.packages[0]): 76 | percentage = line.split()[3] 77 | if 'TOTAL' in line and 'ERROR' not in line: 78 | percentage = line.split()[-1] 79 | break 80 | self.addURL("coverage %s" % percentage, url + '/coverage') 81 | 82 | def _getRatio(self, lines, total): 83 | '''Returns total and passed tests''' 84 | passed = 0 85 | for line in lines: 86 | if "... ok" in line: 87 | passed += 1 88 | return (passed, total) 89 | 90 | 91 | def integration_factory(): 92 | factory = BuildFactory() 93 | 94 | test_files = ['catalog', 'integration'] 95 | user_test_files = ['integration-user'] 96 | min_coverage = 80 97 | 98 | for step in [ 99 | Git( 100 | haltOnFailure=True, 101 | logEnviron=False, 102 | repourl='https://github.com/ethereum/cpp-ethereum.git', 103 | branch='develop', 104 | mode='full', 105 | method='copy', 106 | codebase='cpp-ethereum', 107 | retry=(5, 3) 108 | ), 109 | Git( 110 | haltOnFailure=True, 111 | logEnviron=False, 112 | repourl='https://github.com/ethereum/ethereum.js.git', 113 | branch='develop', 114 | mode='incremental', 115 | codebase='ethereumjs', 116 | retry=(5, 3), 117 | workdir="ethereumjs" 118 | ), 119 | Git( 120 | haltOnFailure=True, 121 | logEnviron=False, 122 | repourl='https://github.com/etherex/etherex.git', 123 | branch='master', 124 | mode='incremental', 125 | codebase='integration', 126 | retry=(5, 3), 127 | workdir="integration" 128 | ), 129 | Configure( 130 | haltOnFailure=True, 131 | logEnviron=False, 132 | command=["cmake", ".", "-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++"], 133 | env={"PATH": "${QTDIR}/bin:${PATH}"} 134 | ), 135 | Compile( 136 | haltOnFailure=True, 137 | logEnviron=False, 138 | command="make -j $(cat /proc/cpuinfo | grep processor | wc -l)" 139 | ), 140 | ShellCommand( 141 | haltOnFailure=True, 142 | logEnviron=False, 143 | name="make-install", 144 | description="installing", 145 | descriptionDone="install", 146 | command=["make", "install"] 147 | ), 148 | ShellCommand( 149 | haltOnFailure=True, 150 | logEnviron=False, 151 | name="ldconfig", 152 | description="running ldconfig", 153 | descriptionDone="ldconfig", 154 | command=["ldconfig"] 155 | ), 156 | ShellCommand( 157 | haltOnFailure=True, 158 | logEnviron=False, 159 | name="test-requirements", 160 | description="installing test requirements", 161 | descriptionDone="install test requirements", 162 | command=["pip", "install", "-r", "dev_requirements.txt"], 163 | workdir="integration" 164 | ), 165 | ShellCommand( 166 | haltOnFailure=True, 167 | logEnviron=False, 168 | name="upgrade-requirements", 169 | description="upgrading test requirements", 170 | descriptionDone="upgrade test requirements", 171 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "dev_requirements.txt"], 172 | workdir="integration" 173 | ), 174 | Test( 175 | flunkOnFailure=False, 176 | logEnviron=False, 177 | description="py.testing", 178 | descriptionDone="py.test", 179 | name="py.test", 180 | command=["py.test", "-vvrs"], 181 | workdir="integration" 182 | ), 183 | ShellCommand( 184 | haltOnFailure=True, 185 | logEnviron=False, 186 | name="npm-install", 187 | description="npm installing", 188 | descriptionDone="npm install", 189 | command=["npm", "install"], 190 | workdir="ethereumjs" 191 | ), 192 | Test( 193 | flunkOnFailure=False, 194 | logEnviron=False, 195 | description="npm testing", 196 | descriptionDone="npm test", 197 | name="npm-test", 198 | command=["npm", "test"], 199 | workdir="ethereumjs" 200 | ), 201 | ShellCommand( 202 | haltOnFailure=True, 203 | logEnviron=False, 204 | name="clean-chain", 205 | description="cleaning up", 206 | descriptionDone="clean chain", 207 | command=["rm", "-rf", ".ethereum_eth"] 208 | ), 209 | ShellCommand( 210 | haltOnFailure=True, 211 | logEnviron=False, 212 | name="clean-up", 213 | description="cleaning up", 214 | descriptionDone="clean up", 215 | command="rm -rf screenshots && rm -rf report && rm -f *.pyc", 216 | workdir="integration/tests" 217 | ), 218 | FileDownload( 219 | haltOnFailure=True, 220 | descriptionDone="download init script", 221 | mastersrc="startup/eth-supervisord-integration.conf", 222 | slavedest="eth-supervisord-integration.conf" 223 | ), 224 | ShellCommand( 225 | haltOnFailure=True, 226 | logEnviron=False, 227 | name="start-eth", 228 | description="starting eth", 229 | descriptionDone="start eth", 230 | command="supervisord -c eth-supervisord-integration.conf && sleep 5", 231 | logfiles={ 232 | "eth.log": "eth.log", 233 | "eth.err": "eth.err", 234 | "supervisord.log": "eth-supervisord.log" 235 | }, 236 | lazylogfiles=True 237 | ), 238 | ShellCommand( 239 | haltOnFailure=True, 240 | logEnviron=False, 241 | name="pyepm-deploy", 242 | description="deploying", 243 | descriptionDone="deploy", 244 | command=["pyepm", "contracts/EtherEx.yaml"], 245 | workdir="integration", 246 | maxTime=1200 247 | ), 248 | ShellCommand( 249 | haltOnFailure=True, 250 | logEnviron=False, 251 | name="get-address", 252 | description="getting address", 253 | descriptionDone="get address", 254 | command="curl -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_coinbase\",\"params\":null,\"id\":2}' http://localhost:8080 > address.json" 255 | ), 256 | SetPropertyFromCommand( 257 | haltOnFailure=True, 258 | logEnviron=False, 259 | name="parse-address", 260 | description="parsing address", 261 | descriptionDone="parse address", 262 | command="sed -ne 's/.*result\":\"\(.*\)\"}/\\1/p' address.json", 263 | property="address" 264 | ), 265 | FileDownload( 266 | haltOnFailure=True, 267 | descriptionDone="download transfer definitions", 268 | mastersrc="integration-transfer.yaml", 269 | slavedest="integration-transfer.yaml" 270 | ), 271 | ShellCommand( 272 | logEnviron=False, 273 | name='prepare-transfer', 274 | description='preparing transfer', 275 | descriptionDone='prepare transfer', 276 | command=Interpolate('sed -i -e s/address/%(prop:address)s/ integration-transfer.yaml') 277 | ), 278 | ShellCommand( 279 | haltOnFailure=True, 280 | logEnviron=False, 281 | name="fill-address", 282 | description="filling address", 283 | descriptionDone="fill address", 284 | command=["pyepm", "integration-transfer.yaml"] 285 | ), 286 | ShellCommand( 287 | haltOnFailure=True, 288 | logEnviron=False, 289 | name="stop-eth", 290 | description="stopping", 291 | descriptionDone="stop", 292 | command="kill `ps aux | grep 'eth-supervisord-integration.conf' | grep -v grep | awk '{print $2}'` && kill `pidof eth` && sleep 5", 293 | decodeRC={-1: SUCCESS, 0: SUCCESS, 1: WARNINGS, 2: WARNINGS}, 294 | alwaysRun=True 295 | ), 296 | FileDownload( 297 | haltOnFailure=True, 298 | descriptionDone="download init script", 299 | mastersrc="startup/eth-supervisord-integration-test.conf", 300 | slavedest="eth-supervisord-integration-test.conf" 301 | ), 302 | ShellCommand( 303 | haltOnFailure=True, 304 | logEnviron=False, 305 | name="start-eth-test", 306 | description="starting eth", 307 | descriptionDone="start eth", 308 | command="supervisord -c eth-supervisord-integration-test.conf && sleep 5", 309 | logfiles={ 310 | "eth.log": "eth.log", 311 | "eth.err": "eth.err", 312 | "supervisord.log": "eth-supervisord.log" 313 | }, 314 | lazylogfiles=True 315 | ), 316 | ShellCommand( 317 | haltOnFailure=True, 318 | logEnviron=False, 319 | name="create-folders", 320 | description="creating folders", 321 | descriptionDone="create folders", 322 | command=["mkdir", "-p", "report", "screenshots"], 323 | workdir="integration/tests" 324 | ), 325 | FileDownload( 326 | haltOnFailure=True, 327 | descriptionDone="download catalog test", 328 | mastersrc="tests/catalog.py", 329 | slavedest="tests/catalog.py", 330 | workdir="integration" 331 | ), 332 | XvfbNoseTest(test_files, min_coverage), 333 | ShellCommand( 334 | haltOnFailure=True, 335 | logEnviron=False, 336 | name="stop-eth", 337 | description="stopping", 338 | descriptionDone="stop", 339 | command="kill `ps aux | grep 'eth-supervisord-integration-test.conf' | grep -v grep | awk '{print $2}'` && kill `pidof eth` && sleep 5", 340 | decodeRC={-1: SUCCESS, 0: SUCCESS, 1: WARNINGS, 2: WARNINGS}, 341 | alwaysRun=True 342 | ), 343 | FileDownload( 344 | haltOnFailure=True, 345 | descriptionDone="download init script", 346 | mastersrc="startup/eth-supervisord-integration-user.conf", 347 | slavedest="eth-supervisord-integration-user.conf" 348 | ), 349 | ShellCommand( 350 | haltOnFailure=True, 351 | logEnviron=False, 352 | name="start-eth-user", 353 | description="starting eth", 354 | descriptionDone="start eth", 355 | command="supervisord -c eth-supervisord-integration-user.conf && sleep 5", 356 | logfiles={ 357 | "eth.log": "eth.log", 358 | "eth.err": "eth.err", 359 | "supervisord.log": "eth-supervisord.log" 360 | }, 361 | lazylogfiles=True 362 | ), 363 | XvfbNoseTest(user_test_files, min_coverage, reportdir="enduser"), 364 | ShellCommand( 365 | haltOnFailure=True, 366 | logEnviron=False, 367 | name="stop-final", 368 | description="stopping", 369 | descriptionDone="stop", 370 | command="kill `ps aux | grep 'eth-supervisord-integration-user.conf' | grep -v grep | awk '{print $2}'` && kill `pidof eth` && sleep 5", 371 | decodeRC={-1: SUCCESS, 0: SUCCESS, 1: WARNINGS, 2: WARNINGS}, 372 | alwaysRun=True 373 | ), 374 | ShellCommand( 375 | haltOnFailure=False, 376 | flunkOnFailure=False, 377 | warnOnFailure=True, 378 | logEnviron=False, 379 | name="move-screenshots", 380 | description="moving screenshots", 381 | descriptionDone="move screenshots", 382 | command="mv *.png screenshots/", 383 | workdir="integration/tests" 384 | ), 385 | # Upload screenshots 386 | DirectoryUpload( 387 | name='upload-screenshots', 388 | compress='gz', 389 | slavesrc="screenshots", 390 | masterdest=Interpolate("public_html/reports/%(prop:buildername)s/%(prop:buildnumber)s/screenshots"), 391 | url=Interpolate("/reports/%(prop:buildername)s/%(prop:buildnumber)s/screenshots/"), 392 | workdir="integration/tests" 393 | ), 394 | # Upload HTML and coverage report 395 | DirectoryUpload( 396 | name='upload-reports', 397 | compress='gz', 398 | slavesrc="report", 399 | masterdest=Interpolate("public_html/reports/%(prop:buildername)s/%(prop:buildnumber)s/report"), 400 | url=Interpolate("/reports/%(prop:buildername)s/%(prop:buildnumber)s/report/"), 401 | workdir="integration/tests" 402 | ) 403 | ]: factory.addStep(step) 404 | 405 | return factory 406 | -------------------------------------------------------------------------------- /factories/mist.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | osVersions = [ 9 | 'macosx', 10 | # 'linux-arm', 11 | 'linux32', 12 | 'linux64', 13 | 'win32', 14 | 'win64' 15 | ] 16 | 17 | @properties.renderer 18 | def get_short_revision_mist(props): 19 | if 'got_revision' in props: 20 | return props['got_revision']['mist'][:7] 21 | return None 22 | 23 | @properties.renderer 24 | def folder_version(props): 25 | if 'version' in props: 26 | return props['version'].replace('.', '-') 27 | return None 28 | 29 | def mist_factory(branch='master', isPullRequest=False): 30 | factory = BuildFactory() 31 | for step in [ 32 | Git( 33 | haltOnFailure=True, 34 | logEnviron=False, 35 | repourl='https://github.com/ethereum/mist.git', 36 | branch=branch, 37 | mode='full', 38 | method='copy', 39 | codebase='mist', 40 | retry=(5, 3) 41 | ), 42 | SetPropertyFromCommand( 43 | haltOnFailure=True, 44 | logEnviron=False, 45 | name="set-version", 46 | command='sed -ne "s/.*\\"version\\": \\"\([0-9]*\.[0-9]*\.[0-9]*\)\\".*/\\1/p" package.json', 47 | property="version" 48 | ), 49 | ShellCommand( 50 | haltOnFailure=True, 51 | logEnviron=False, 52 | name="npm-install", 53 | command=["npm", "install"], 54 | description="npm installing", 55 | descriptionDone="npm install" 56 | ), 57 | ShellCommand( 58 | haltOnFailure=True, 59 | logEnviron=False, 60 | name="gulp-mist", 61 | command=["gulp", "mist"], 62 | description="gulping mist", 63 | descriptionDone="gulp mist" 64 | ) 65 | ]: factory.addStep(step) 66 | 67 | if not isPullRequest: 68 | for arch in osVersions: 69 | for step in [ 70 | ShellCommand( 71 | haltOnFailure=True, 72 | logEnviron=False, 73 | name="pack-mist-%s" % arch, 74 | description='packing %s' % arch, 75 | descriptionDone='pack %s' % arch, 76 | command=['zip' if arch.startswith('win') else 'tar', 77 | '-r' if arch.startswith('win') else '-cjf', 78 | Interpolate("Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s", 79 | arch=arch, 80 | short_revision=get_short_revision_mist, 81 | ext='zip' if arch.startswith('win') else 'tar.bz2'), 82 | Interpolate('Mist-%(kw:arch)s-%(kw:folder_version)s', 83 | arch=arch, 84 | folder_version=folder_version)], 85 | workdir='build/dist_mist' 86 | ), 87 | SetPropertyFromCommand( 88 | haltOnFailure=True, 89 | logEnviron=False, 90 | name="sha256sum-%s" % arch, 91 | command=Interpolate('sha256sum Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s | grep -o -w "\w\{64\}"', 92 | arch=arch, 93 | short_revision=get_short_revision_mist, 94 | ext='zip' if arch.startswith('win') else 'tar.bz2'), 95 | property='sha256sum-%s' % arch, 96 | workdir='build/dist_mist' 97 | ), 98 | FileUpload( 99 | haltOnFailure=True, 100 | name='upload-mist-%s' % arch, 101 | slavesrc=Interpolate("dist_mist/Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s", 102 | arch=arch, 103 | short_revision=get_short_revision_mist, 104 | ext='zip' if arch.startswith('win') else 'tar.bz2'), 105 | masterdest=Interpolate("public_html/builds/%(prop:buildername)s/Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s", 106 | arch=arch, 107 | short_revision=get_short_revision_mist, 108 | ext='zip' if arch.startswith('win') else 'tar.bz2'), 109 | url=Interpolate("/builds/%(prop:buildername)s/Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s", 110 | arch=arch, 111 | short_revision=get_short_revision_mist, 112 | ext='zip' if arch.startswith('win') else 'tar.bz2') 113 | ), 114 | MasterShellCommand( 115 | name="clean-latest-link-%s" % arch, 116 | description='cleaning latest link %s' % arch, 117 | descriptionDone='clean latest link %s' % arch, 118 | command=['rm', '-f', Interpolate("public_html/builds/%(prop:buildername)s/Mist-%(kw:arch)s-latest.%(kw:ext)s", 119 | arch=arch, 120 | ext='zip' if arch.startswith('win') else 'tar.bz2')] 121 | ), 122 | MasterShellCommand( 123 | haltOnFailure=True, 124 | name="link-latest-%s" % arch, 125 | description='linking latest %s' % arch, 126 | descriptionDone='link latest %s' % arch, 127 | command=['ln', '-sf', 128 | Interpolate("Mist-%(prop:version)s-%(kw:arch)s-%(kw:short_revision)s.%(kw:ext)s", 129 | arch=arch, 130 | short_revision=get_short_revision_mist, 131 | ext='zip' if arch.startswith('win') else 'tar.bz2'), 132 | Interpolate("public_html/builds/%(prop:buildername)s/Mist-%(kw:arch)s-latest.%(kw:ext)s", 133 | arch=arch, 134 | ext='zip' if arch.startswith('win') else 'tar.bz2')] 135 | ) 136 | ]: factory.addStep(step) 137 | 138 | return factory 139 | -------------------------------------------------------------------------------- /factories/poc_servers.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | def cpp_ethereum_server_factory(branch='master'): 9 | factory = BuildFactory() 10 | 11 | for step in [ 12 | Git( 13 | haltOnFailure=True, 14 | logEnviron=False, 15 | repourl='https://github.com/ethereum/cpp-ethereum.git', 16 | branch=branch, 17 | mode='full', 18 | method='copy', 19 | codebase='cpp-ethereum', 20 | retry=(5, 3) 21 | ), 22 | Configure( 23 | haltOnFailure=True, 24 | logEnviron=False, 25 | command=["cmake", ".", "-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++", "-DHEADLESS=1"] 26 | ), 27 | Compile( 28 | haltOnFailure=True, 29 | logEnviron=False, 30 | command="make -j $(cat /proc/cpuinfo | grep processor | wc -l)" 31 | ), 32 | ShellCommand( 33 | haltOnFailure=True, 34 | logEnviron=False, 35 | name="make-install", 36 | description="installing", 37 | descriptionDone="install", 38 | command=["sudo", "make", "install"] 39 | ), 40 | ShellCommand( 41 | haltOnFailure=True, 42 | logEnviron=False, 43 | name="ldconfig", 44 | description="running ldconfig", 45 | descriptionDone="ldconfig", 46 | command=["sudo", "ldconfig"] 47 | ), 48 | FileDownload( 49 | haltOnFailure=True, 50 | descriptionDone="download init script", 51 | mastersrc="startup/eth-supervisord-%s.conf" % branch, 52 | slavedest="eth-supervisord-%s.conf" % branch 53 | ), 54 | ShellCommand( 55 | haltOnFailure=True, 56 | logEnviron=False, 57 | name="stop", 58 | description="stopping", 59 | descriptionDone="stop", 60 | command="kill `ps aux | grep 'eth-supervisord-%s.conf' | grep -v grep | awk '{print $2}'` && kill `pidof eth` && sleep 5" % branch, 61 | decodeRC={-1: SUCCESS, 0: SUCCESS, 1: WARNINGS, 2: WARNINGS} 62 | ), 63 | ShellCommand( 64 | haltOnFailure=True, 65 | logEnviron=False, 66 | name="start", 67 | description="starting", 68 | descriptionDone="start", 69 | command="supervisord -c eth-supervisord-%s.conf && sleep 60" % branch, 70 | logfiles={ 71 | "eth.log": "eth.log", 72 | "eth.err": "eth.err", 73 | "supervisord.log": "eth-supervisord.log" 74 | }, 75 | lazylogfiles=True 76 | ) 77 | ]: factory.addStep(step) 78 | 79 | return factory 80 | -------------------------------------------------------------------------------- /factories/pyethapp.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | def pyethapp_factory(branch='master'): 9 | factory = BuildFactory() 10 | for step in [ 11 | Git( 12 | haltOnFailure=True, 13 | logEnviron=False, 14 | repourl='https://github.com/ethereum/pyethapp.git', 15 | branch=branch, 16 | mode='full', 17 | method='copy', 18 | codebase='pyethapp', 19 | retry=(5, 3) 20 | ), 21 | SetPropertyFromCommand( 22 | haltOnFailure=True, 23 | logEnviron=False, 24 | name="set-version", 25 | command='sed -ne "s/.*version=.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" setup.py', 26 | property="version" 27 | ), 28 | ShellCommand( 29 | haltOnFailure=True, 30 | logEnviron=False, 31 | name="pip-requirements", 32 | description="installing requirements", 33 | descriptionDone="install requirements", 34 | command=["pip", "install", "-r", "requirements.txt"] 35 | ), 36 | ShellCommand( 37 | haltOnFailure=True, 38 | logEnviron=False, 39 | name="upgrade-requirements", 40 | description="upgrading test requirements", 41 | descriptionDone="upgrade test requirements", 42 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "requirements.txt"] 43 | ), 44 | ShellCommand( 45 | haltOnFailure=True, 46 | logEnviron=False, 47 | name="pip-install", 48 | description="installing", 49 | descriptionDone="install", 50 | command=["pip", "install", "-e", "."] 51 | ), 52 | ShellCommand( 53 | logEnviron=False, 54 | description="running", 55 | descriptionDone="run", 56 | name="pyethapp", 57 | command=["pyethapp", "--help"] 58 | ) 59 | ]: factory.addStep(step) 60 | 61 | return factory 62 | -------------------------------------------------------------------------------- /factories/pyethereum.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | # Python 9 | def pyethereum_factory(branch='master'): 10 | factory = BuildFactory() 11 | for step in [ 12 | Git( 13 | haltOnFailure=True, 14 | logEnviron=False, 15 | repourl='https://github.com/ethereum/pyethereum.git', 16 | branch=branch, 17 | mode='full', 18 | method='copy', 19 | codebase='pyethereum', 20 | retry=(5, 3) 21 | ), 22 | SetPropertyFromCommand( 23 | haltOnFailure=True, 24 | logEnviron=False, 25 | name="set-version", 26 | command='sed -ne "s/.*version=.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*/\\1/p" setup.py', 27 | property="version" 28 | ), 29 | ShellCommand( 30 | haltOnFailure=True, 31 | logEnviron=False, 32 | name="pip-requirements", 33 | description="installing requirements", 34 | descriptionDone="install requirements", 35 | command=["pip", "install", "-r", "requirements.txt"] 36 | ), 37 | ShellCommand( 38 | haltOnFailure=True, 39 | logEnviron=False, 40 | name="upgrade-requirements", 41 | description="upgrading requirements", 42 | descriptionDone="upgrade requirements", 43 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "requirements.txt"] 44 | ), 45 | ShellCommand( 46 | haltOnFailure=True, 47 | logEnviron=False, 48 | name="pip-dev_requirements", 49 | description="installing dev requirements", 50 | descriptionDone="install dev requirements", 51 | command=["pip", "install", "-r", "dev_requirements.txt"] 52 | ), 53 | ShellCommand( 54 | haltOnFailure=True, 55 | logEnviron=False, 56 | name="upgrade-requirements", 57 | description="upgrading dev requirements", 58 | descriptionDone="upgrade dev requirements", 59 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "dev_requirements.txt"] 60 | ), 61 | ShellCommand( 62 | haltOnFailure=True, 63 | logEnviron=False, 64 | name="pip-install", 65 | description="installing", 66 | descriptionDone="install", 67 | command=["pip", "install", "-e", "."] 68 | ), 69 | ShellCommand( 70 | haltOnFailure=True, 71 | logEnviron=False, 72 | name="test-submodule", 73 | descriptionDone="update test submodule", 74 | command="git submodule init && git submodule update --recursive" 75 | ), 76 | ShellCommand( 77 | haltOnFailure=True, 78 | logEnviron=False, 79 | description="testing", 80 | descriptionDone="py.test", 81 | name="py.test", 82 | command=["py.test"] 83 | ) 84 | ]: factory.addStep(step) 85 | 86 | return factory 87 | -------------------------------------------------------------------------------- /factories/self_update.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | # 9 | # Self-update factory 10 | # 11 | def self_update_factory(): 12 | factory = BuildFactory() 13 | for step in [ 14 | Git( 15 | haltOnFailure=True, 16 | logEnviron=False, 17 | name='update', 18 | repourl='https://github.com/ethereum/ethereum-buildbot.git', 19 | mode='incremental', 20 | codebase='ethereum-buildbot', 21 | retry=(5, 3) 22 | ), 23 | ShellCommand( 24 | haltOnFailure=True, 25 | logEnviron=False, 26 | name='copy-samples', 27 | description='copying samples', 28 | descriptionDone='copy samples', 29 | command='cp slaves.json.sample slaves.json && cp users.json.sample users.json && ' 30 | 'cp ircbot.json.sample ircbot.json && cp tokens.json.sample tokens.json && ' 31 | 'cp changehook.passwd.sample changehook.passwd' 32 | ), 33 | ShellCommand( 34 | logEnviron=False, 35 | name='check', 36 | description='running checkconfig', 37 | descriptionDone='checkconfig', 38 | command=['buildbot', 'checkconfig', '.'], 39 | flunkOnWarnings=True, 40 | flunkOnFailure=True, 41 | haltOnFailure=True, 42 | warnOnFailure=False, 43 | interruptSignal=15 44 | ), 45 | MasterShellCommand( 46 | haltOnFailure=True, 47 | name='live-update', 48 | description='updating', 49 | descriptionDone='update', 50 | command=['git', 'pull'] 51 | ), 52 | MasterShellCommand( 53 | haltOnFailure=True, 54 | name='reload', 55 | description='reloading', 56 | descriptionDone='reload', 57 | command=['buildbot', 'reconfig', '.'] 58 | ) 59 | ]: factory.addStep(step) 60 | 61 | return factory 62 | -------------------------------------------------------------------------------- /factories/serpent.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import factory 5 | reload(factory) 6 | from factory import * 7 | 8 | def serpent_factory(branch='develop'): 9 | factory = BuildFactory() 10 | for step in [ 11 | Git( 12 | haltOnFailure=True, 13 | logEnviron=False, 14 | repourl='https://github.com/ethereum/serpent.git', 15 | branch=branch, 16 | mode='full', 17 | method='copy', 18 | codebase='serpent', 19 | retry=(5, 3) 20 | ), 21 | Git( 22 | haltOnFailure=True, 23 | logEnviron=False, 24 | repourl='https://github.com/ethereum/pyethereum.git', 25 | branch=branch, 26 | mode='full', 27 | method='copy', 28 | codebase='pyethereum', 29 | retry=(5, 3), 30 | workdir='pyethereum' 31 | ), 32 | ShellCommand( 33 | haltOnFailure=True, 34 | logEnviron=False, 35 | name="pip-install", 36 | description="installing", 37 | descriptionDone="install", 38 | command=["pip", "install", "-e", "."] 39 | ), 40 | SetPropertyFromCommand( 41 | haltOnFailure=True, 42 | logEnviron=False, 43 | name="serpent-version", 44 | command=["serpent", "-v"], 45 | property="version" 46 | ), 47 | ShellCommand( 48 | haltOnFailure=True, 49 | logEnviron=False, 50 | name="install-pyethereum", 51 | description="installing pyethereum", 52 | descriptionDone="install pyethereum", 53 | command=["pip", "install", "-e", "."], 54 | workdir="pyethereum" 55 | ), 56 | ShellCommand( 57 | haltOnFailure=True, 58 | logEnviron=False, 59 | name="pyethereum-requirements", 60 | description="installing pyethereum requirements", 61 | descriptionDone="install pyethereum requirements", 62 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "requirements.txt"], 63 | workdir="pyethereum" 64 | ), 65 | ShellCommand( 66 | haltOnFailure=True, 67 | logEnviron=False, 68 | name="pyethereum-dev-requirements", 69 | description="installing pyethereum dev_requirements", 70 | descriptionDone="install pyethereum dev_requirements", 71 | command=["pip", "install", "--upgrade", "--no-deps", "-r", "dev_requirements.txt"], 72 | workdir="pyethereum" 73 | ), 74 | ShellCommand( 75 | haltOnFailure=True, 76 | logEnviron=False, 77 | name="test-submodule", 78 | descriptionDone="update test submodule", 79 | command="git submodule init && git submodule update --recursive", 80 | workdir="pyethereum" 81 | ), 82 | ShellCommand( 83 | flunkOnFailure=False, 84 | logEnviron=False, 85 | description="testing", 86 | descriptionDone="py.test", 87 | name="py.test", 88 | command=["py.test"], 89 | workdir="pyethereum" 90 | ) 91 | ]: factory.addStep(step) 92 | return factory 93 | -------------------------------------------------------------------------------- /integration-transfer.yaml: -------------------------------------------------------------------------------- 1 | - 2 | transact: 3 | integration: 4 | to: "address" 5 | value: 100000000000000000000 6 | wait: True -------------------------------------------------------------------------------- /ircbot.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "server": "irc.freenode.net", 3 | "nickname": "cpt-obvious", 4 | "password": "secret", 5 | "channels": ["#cpt-obvious"] 6 | } 7 | -------------------------------------------------------------------------------- /master.cfg: -------------------------------------------------------------------------------- 1 | # -*- python -*- 2 | # ex: set syntax=python: 3 | 4 | # first, reload each module by name 5 | import slaves 6 | import schedulers 7 | import builders 8 | import status 9 | reload(slaves) 10 | reload(schedulers) 11 | reload(builders) 12 | reload(status) 13 | 14 | # then import the relevant symbols from those modules 15 | from slaves import slaves 16 | from schedulers import schedulers 17 | from builders import builders 18 | from status import status 19 | 20 | # This is the dictionary that the buildmaster pays attention to. 21 | c = BuildmasterConfig = {} 22 | c['slaves'] = slaves 23 | c['schedulers'] = schedulers 24 | c['builders'] = builders 25 | c['status'] = status 26 | 27 | # ###### PROJECT IDENTITY 28 | 29 | # the 'title' string will appear at the top of this buildbot 30 | # installation's html.WebStatus home page (linked to the 31 | # 'titleURL') and is embedded in the title of the waterfall HTML page. 32 | 33 | c['title'] = "Ethereum" 34 | c['titleURL'] = "https://ethereum.org" 35 | 36 | # the 'buildbotURL' string should point to the location where the buildbot's 37 | # internal web server (usually the html.WebStatus page) is visible. This 38 | # typically uses the port number set in the Waterfall 'status' entry, but 39 | # with an externally-visible host name which the buildbot cannot figure out 40 | # without some help. 41 | 42 | c['buildbotURL'] = "https://builds.ethereum.org/" 43 | 44 | # ###### DB URL 45 | 46 | c['db'] = { 47 | # This specifies what database buildbot uses to store its state. 48 | # You can leave this at its default for all but the 49 | # largest installations. 50 | 'db_url': "sqlite:///state.sqlite", 51 | } 52 | 53 | # 'protocols' contains information about protocols which master will use for 54 | # communicating with slaves. 55 | # You must define at least 'port' option that slaves could connect to your 56 | # master with this protocol. 57 | # 'port' must match the value configured into the buildslaves (with their 58 | # --master option) 59 | c['protocols'] = {'pb': {'port': 9989}} 60 | 61 | # ###### CHANGESOURCES 62 | 63 | # the 'change_source' setting tells the buildmaster how it should find out 64 | # about source code changes. 65 | 66 | all_repositories = { 67 | r'https://github.com/ethereum/ethereum-buildbot.git': 'ethereum-buildbot', 68 | r'https://github.com/ethereum/ethereum-dockers.git': 'ethereum-dockers', 69 | r'https://github.com/ethereum/cpp-ethereum.git': 'cpp-ethereum', 70 | r'https://github.com/ethereum/go-ethereum.git': 'go-ethereum', 71 | r'https://github.com/ethereum/mist.git': 'mist', 72 | r'https://github.com/ethereum/ethereumj.git': 'ethereumj', 73 | r'https://github.com/ethereum/pyethereum.git': 'pyethereum', 74 | r'https://github.com/ethereum/pyethapp.git': 'pyethapp', 75 | r'https://github.com/ethereum/serpent.git': 'serpent', 76 | r'https://github.com/ethereum/tests.git': 'tests', 77 | r'https://github.com/ethereum/homebrew-ethereum.git': 'homebrew-ethereum', 78 | r'https://github.com/etherex/etherex.git': 'integration' 79 | } 80 | 81 | 82 | # Codebase generator 83 | def codebaseGenerator(chdict): 84 | return all_repositories[chdict['repository']] 85 | 86 | c['codebaseGenerator'] = codebaseGenerator 87 | 88 | 89 | # Builder priorities 90 | 91 | def prioritizeBuilders(buildmaster, builders): 92 | builderPriorities = { 93 | "Linux C++ master branch": 0, 94 | "Linux C++ develop branch": 1, 95 | "Linux Go master branch": 0, 96 | "Linux Go develop branch": 1, 97 | "OSX C++ master branch": 0, 98 | "OSX C++ master brew": 2, 99 | "OSX C++ develop branch": 1, 100 | "OSX C++ develop brew": 2, 101 | "OSX Go master branch": 0, 102 | "OSX Go master brew": 2, 103 | "OSX Go develop branch": 1, 104 | "OSX Go develop brew": 2, 105 | "Windows C++ master branch": 0, 106 | "Windows C++ develop branch": 1, 107 | "Windows Go master branch": 0, 108 | "Windows Go develop branch": 1 109 | } 110 | builders.sort(key=lambda b: builderPriorities.get(b.name, 3)) 111 | return builders 112 | 113 | c['prioritizeBuilders'] = prioritizeBuilders 114 | -------------------------------------------------------------------------------- /monkeypatch.py: -------------------------------------------------------------------------------- 1 | from twisted.python import log 2 | from twisted.internet import reactor 3 | 4 | 5 | def botmaster_maybeStartBuildsForSlave(self, slave_name): 6 | """ 7 | We delay this for 10 seconds, so that if multiple slaves start at the same 8 | time, builds will be distributed between them. 9 | """ 10 | def do_start(): 11 | log.msg(format="Really starting builds on %(slave_name)s", 12 | slave_name=slave_name) 13 | builders = self.getBuildersForSlave(slave_name) 14 | self.brd.maybeStartBuildsOn([b.name for b in builders]) 15 | log.msg(format="Waiting to start builds on %(slave_name)s", 16 | slave_name=slave_name) 17 | reactor.callLater(10, do_start) 18 | 19 | 20 | from buildbot.process.slavebuilder import AbstractSlaveBuilder 21 | 22 | 23 | def slavebuilder_buildStarted(self): 24 | AbstractSlaveBuilder.buildStarted(self) 25 | if self.slave and hasattr(self.slave, 'buildStarted'): 26 | self.slave.buildStarted(self) 27 | 28 | 29 | from buildbot.process.buildrequestdistributor import BasicBuildChooser 30 | 31 | 32 | class NoFallBackBuildChooser(BasicBuildChooser): 33 | """ 34 | BuildChooser that doesn't fall back to rejected slaves. 35 | In particular, builds with locks won't be assigned before a lock is ready. 36 | """ 37 | 38 | def __init__(self, bldr, master): 39 | BasicBuildChooser.__init__(self, bldr, master) 40 | self.rejectedSlaves = None 41 | 42 | 43 | def apply_patches(): 44 | log.msg("Apply flocker_bb.monkeypatch.") 45 | from buildbot.process.botmaster import BotMaster 46 | BotMaster.maybeStartBuildsForSlave = botmaster_maybeStartBuildsForSlave 47 | from buildbot.process.slavebuilder import SlaveBuilder 48 | SlaveBuilder.buildStarted = slavebuilder_buildStarted 49 | from buildbot.steps.master import MasterShellCommand 50 | MasterShellCommand.renderables += ['path'] 51 | from buildbot.process.buildrequestdistributor import ( 52 | BuildRequestDistributor) 53 | BuildRequestDistributor.BuildChooser = NoFallBackBuildChooser 54 | -------------------------------------------------------------------------------- /pbuilderrc: -------------------------------------------------------------------------------- 1 | # ccache 2 | sudo chmod a+w /var/cache/pbuilder/ccache 3 | EXTRAPACKAGES=ccache 4 | CCACHEDIR=/var/cache/pbuilder/ccache 5 | 6 | # Ethereum PPA as OTHERMIRROR gets echoed below, 7 | # leave at least one blank line 8 | -------------------------------------------------------------------------------- /public_html/bg_gradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/ethereum-buildbot/8a4c75e27da68d00cccb9cceadb3742d3814a1de/public_html/bg_gradient.jpg -------------------------------------------------------------------------------- /public_html/default.css: -------------------------------------------------------------------------------- 1 | body.interface { 2 | margin-left: 30px; 3 | margin-right: 30px; 4 | margin-top: 20px; 5 | margin-bottom: 50px; 6 | padding: 0; 7 | background: url(bg_gradient.jpg) repeat-x; 8 | font-family: Verdana, sans-serif; 9 | font-size: 10px; 10 | background-color: #fff; 11 | color: #333; 12 | } 13 | 14 | .auth { 15 | position:absolute; 16 | top:5px; 17 | right:40px; 18 | } 19 | 20 | .alert { 21 | color: #c30000; 22 | background-color: #f2dcdc; 23 | padding: 5px 5px 5px 25px; 24 | margin-bottom: 20px; 25 | border-top:1px solid #ccc; 26 | border-bottom:1px solid #ccc; 27 | border-color: #c30000; 28 | font-size: 20px; 29 | } 30 | a:link,a:visited,a:active { 31 | color: #444; 32 | } 33 | 34 | table { 35 | border-spacing: 1px 1px; 36 | } 37 | 38 | table td { 39 | padding: 3px 4px 3px 4px; 40 | text-align: center; 41 | } 42 | 43 | .Project { 44 | min-width: 6em; 45 | } 46 | 47 | .LastBuild,.Activity { 48 | padding: 0 0 0 4px; 49 | } 50 | 51 | .LastBuild,.Activity,.Builder,.BuildStep { 52 | min-width: 5em; 53 | } 54 | 55 | /* Chromium Specific styles */ 56 | div.BuildResultInfo { 57 | color: #444; 58 | } 59 | 60 | div.Announcement { 61 | margin-bottom: 1em; 62 | } 63 | 64 | div.Announcement>a:hover { 65 | color: black; 66 | } 67 | 68 | div.Announcement>div.Notice { 69 | background-color: #afdaff; 70 | padding: 0.5em; 71 | font-size: 16px; 72 | text-align: center; 73 | } 74 | 75 | div.Announcement>div.Open { 76 | border: 3px solid #8fdf5f; 77 | padding: 0.5em; 78 | font-size: 16px; 79 | text-align: center; 80 | } 81 | 82 | div.Announcement>div.Closed { 83 | border: 5px solid #e98080; 84 | padding: 0.5em; 85 | font-size: 24px; 86 | font-weight: bold; 87 | text-align: center; 88 | } 89 | 90 | td.Time { 91 | color: #000; 92 | border-bottom: 1px solid #aaa; 93 | background-color: #eee; 94 | } 95 | 96 | td.Activity,td.Change,td.Builder { 97 | color: #333333; 98 | background-color: #CCCCCC; 99 | } 100 | 101 | td.Change { 102 | border-radius: 5px; 103 | -webkit-border-radius: 5px; 104 | -moz-border-radius: 5px; 105 | } 106 | 107 | td.Event { 108 | color: #777; 109 | background-color: #ddd; 110 | border-radius: 5px; 111 | -webkit-border-radius: 5px; 112 | -moz-border-radius: 5px; 113 | } 114 | 115 | td.Activity { 116 | border-top-left-radius: 10px; 117 | -webkit-border-top-left-radius: 10px; 118 | -moz-border-radius-topleft: 10px; 119 | min-height: 20px; 120 | padding: 2px 0 2px 0; 121 | } 122 | 123 | td.idle,td.waiting,td.offline,td.building { 124 | border-top-left-radius: 0px; 125 | -webkit-border-top-left-radius: 0px; 126 | -moz-border-radius-topleft: 0px; 127 | } 128 | 129 | .LastBuild { 130 | border-top-left-radius: 5px; 131 | -webkit-border-top-left-radius: 5px; 132 | -moz-border-radius-topleft: 5px; 133 | border-top-right-radius: 5px; 134 | -webkit-border-top-right-radius: 5px; 135 | -moz-border-radius-topright: 5px; 136 | } 137 | 138 | /* Console view styles */ 139 | td.DevStatus > table { 140 | table-layout: fixed; 141 | } 142 | 143 | td.DevRev { 144 | padding: 4px 8px 4px 8px; 145 | color: #333333; 146 | border-top-left-radius: 5px; 147 | -webkit-border-top-left-radius: 5px; 148 | -moz-border-radius-topleft: 5px; 149 | background-color: #eee; 150 | width: 1%; 151 | } 152 | 153 | td.DevRevCollapse { 154 | border-bottom-left-radius: 5px; 155 | -webkit-border-bottom-left-radius: 5px; 156 | -moz-border-radius-bottomleft: 5px; 157 | } 158 | 159 | td.DevName { 160 | padding: 4px 8px 4px 8px; 161 | color: #333333; 162 | background-color: #eee; 163 | width: 1%; 164 | text-align: left; 165 | } 166 | 167 | td.DevStatus { 168 | padding: 4px 4px 4px 4px; 169 | color: #333333; 170 | background-color: #eee; 171 | } 172 | 173 | td.DevSlave { 174 | padding: 4px 4px 4px 4px; 175 | color: #333333; 176 | background-color: #eee; 177 | } 178 | 179 | td.first { 180 | border-top-left-radius: 5px; 181 | -webkit-border-top-left-radius: 5px; 182 | -moz-border-radius-topleft: 5px; 183 | } 184 | 185 | td.last { 186 | border-top-right-radius: 5px; 187 | -webkit-border-top-right-radius: 5px; 188 | -moz-border-radius-topright: 5px; 189 | } 190 | 191 | td.DevStatusCategory { 192 | border-radius: 5px; 193 | -webkit-border-radius: 5px; 194 | -moz-border-radius: 5px; 195 | border-width: 1px; 196 | border-style: solid; 197 | } 198 | 199 | td.DevStatusCollapse { 200 | border-bottom-right-radius: 5px; 201 | -webkit-border-bottom-right-radius: 5px; 202 | -moz-border-radius-bottomright: 5px; 203 | } 204 | 205 | td.DevDetails { 206 | font-weight: normal; 207 | padding: 8px 8px 8px 8px; 208 | color: #333333; 209 | background-color: #eee; 210 | text-align: left; 211 | } 212 | 213 | td.DevDetails li a { 214 | padding-right: 5px; 215 | } 216 | 217 | td.DevComment { 218 | font-weight: normal; 219 | padding: 8px 8px 8px 8px; 220 | color: #333333; 221 | background-color: #eee; 222 | text-align: left; 223 | } 224 | 225 | td.DevBottom { 226 | border-bottom-right-radius: 5px; 227 | -webkit-border-bottom-right-radius: 5px; 228 | -moz-border-radius-bottomright: 5px; 229 | border-bottom-left-radius: 5px; 230 | -webkit-border-bottom-left-radius: 5px; 231 | -moz-border-radius-bottomleft: 5px; 232 | } 233 | 234 | td.Alt { 235 | background-color: #ddd; 236 | } 237 | 238 | .legend { 239 | border-radius: 5px !important; 240 | -webkit-border-radius: 5px !important; 241 | -moz-border-radius: 5px !important; 242 | width: 100px; 243 | max-width: 100px; 244 | text-align: center; 245 | padding: 2px 2px 2px 2px; 246 | height: 14px; 247 | white-space: nowrap; 248 | } 249 | 250 | .DevStatusBox { 251 | text-align: center; 252 | height: 20px; 253 | padding: 0 2px; 254 | line-height: 0; 255 | white-space: nowrap; 256 | } 257 | 258 | .DevStatusBox a { 259 | opacity: 0.85; 260 | border-width: 1px; 261 | border-style: solid; 262 | border-radius: 4px; 263 | -webkit-border-radius: 4px; 264 | -moz-border-radius: 4px; 265 | display: block; 266 | width: 90%; 267 | height: 20px; 268 | line-height: 20px; 269 | margin-left: auto; 270 | margin-right: auto; 271 | } 272 | 273 | .DevStatusBox a.notinbuilder { 274 | border-style: none; 275 | } 276 | 277 | .DevSlaveBox { 278 | text-align: center; 279 | height: 10px; 280 | padding: 0 2px; 281 | line-height: auto; 282 | white-space: nowrap; 283 | } 284 | 285 | .DevSlaveBox > div { 286 | line-height: 1.5em; 287 | overflow: hidden; 288 | text-overflow: ellipsis; 289 | width: 7em; 290 | } 291 | 292 | .DevSlaveBox > a { 293 | opacity: 0.85; 294 | border-width: 1px; 295 | border-style: solid; 296 | border-radius: 4px; 297 | -webkit-border-radius: 4px; 298 | -moz-border-radius: 4px; 299 | display: block; 300 | width: 90%; 301 | height: 10px; 302 | line-height: 20px; 303 | margin-left: auto; 304 | margin-right: auto; 305 | } 306 | 307 | a.noround { 308 | border-radius: 0px; 309 | -webkit-border-radius: 0px; 310 | -moz-border-radius: 0px; 311 | position: relative; 312 | margin-top: -8px; 313 | margin-bottom: -8px; 314 | height: 36px; 315 | border-top-width: 0; 316 | border-bottom-width: 0; 317 | } 318 | 319 | a.begin { 320 | border-top-width: 1px; 321 | position: relative; 322 | margin-top: 0px; 323 | margin-bottom: -7px; 324 | height: 27px; 325 | border-top-left-radius: 4px; 326 | -webkit-border-top-left-radius: 4px; 327 | -moz-border-radius-topleft: 4px; 328 | border-top-right-radius: 4px; 329 | -webkit-border-top-right-radius: 4px; 330 | -moz-border-radius-topright: 4px; 331 | } 332 | 333 | a.end { 334 | border-bottom-width: 1px; 335 | position: relative; 336 | margin-top: -7px; 337 | margin-bottom: 0px; 338 | height: 27px; 339 | border-bottom-left-radius: 4px; 340 | -webkit-border-bottom-left-radius: 4px; 341 | -moz-border-radius-bottomleft: 4px; 342 | border-bottom-right-radius: 4px; 343 | -webkit-border-bottom-right-radius: 4px; 344 | -moz-border-radius-bottomright: 4px; 345 | } 346 | 347 | .center_align { 348 | text-align: center; 349 | } 350 | 351 | .right_align { 352 | text-align: right; 353 | } 354 | 355 | .left_align { 356 | text-align: left; 357 | } 358 | 359 | div.BuildWaterfall { 360 | border-radius: 7px; 361 | -webkit-border-radius: 7px; 362 | -moz-border-radius: 7px; 363 | position: absolute; 364 | left: 0px; 365 | top: 0px; 366 | background-color: #FFFFFF; 367 | padding: 4px 4px 4px 4px; 368 | float: left; 369 | display: none; 370 | border-width: 1px; 371 | border-style: solid; 372 | } 373 | 374 | /* LastBuild, BuildStep states */ 375 | .success { 376 | color: #000; 377 | background-color: #8d4; 378 | border-color: #4F8530; 379 | } 380 | 381 | .failure { 382 | color: #000; 383 | background-color: #e88; 384 | border-color: #A77272; 385 | } 386 | 387 | .failure-again { 388 | color: #000; 389 | background-color: #eA9; 390 | border-color: #A77272; 391 | } 392 | 393 | .warnings { 394 | color: #FFFFFF; 395 | background-color: #fa3; 396 | border-color: #C29D46; 397 | } 398 | 399 | .skipped { 400 | color: #000; 401 | background: #AADDEE; 402 | border-color: #AADDEE; 403 | } 404 | 405 | .exception,.retry { 406 | color: #FFFFFF; 407 | background-color: #c6c; 408 | border-color: #ACA0B3; 409 | } 410 | 411 | .start { 412 | color: #000; 413 | background-color: #ccc; 414 | border-color: #ccc; 415 | } 416 | 417 | .running,.waiting,td.building { 418 | color: #000; 419 | background-color: #fd3; 420 | border-color: #C5C56D; 421 | } 422 | 423 | .paused { 424 | color: #FFFFFF; 425 | background-color: #8080FF; 426 | border-color: #dddddd; 427 | } 428 | 429 | .offline,td.offline { 430 | color: #FFFFFF; 431 | background-color: #777777; 432 | border-color: #dddddd; 433 | } 434 | 435 | 436 | .start { 437 | border-bottom-left-radius: 10px; 438 | -webkit-border-bottom-left-radius: 10px; 439 | -moz-border-radius-bottomleft: 10px; 440 | border-bottom-right-radius: 10px; 441 | -webkit-border-bottom-right-radius: 10px; 442 | -moz-border-radius-bottomright: 10px; 443 | } 444 | 445 | .notstarted { 446 | border-width: 1px; 447 | border-style: solid; 448 | border-color: #aaa; 449 | background-color: #fff; 450 | } 451 | 452 | .closed { 453 | background-color: #ff0000; 454 | } 455 | 456 | .closed .large { 457 | font-size: 1.5em; 458 | font-weight: bolder; 459 | } 460 | 461 | td.Project a:hover,td.start a:hover { 462 | color: #000; 463 | } 464 | 465 | .mini-box { 466 | text-align: center; 467 | height: 20px; 468 | padding: 0 2px; 469 | line-height: 0; 470 | white-space: nowrap; 471 | } 472 | 473 | .mini-box a { 474 | border-radius: 0; 475 | -webkit-border-radius: 0; 476 | -moz-border-radius: 0; 477 | display: block; 478 | width: 100%; 479 | height: 20px; 480 | line-height: 20px; 481 | margin-top: -30px; 482 | } 483 | 484 | .mini-closed { 485 | -box-sizing: border-box; 486 | -webkit-box-sizing: border-box; 487 | border: 4px solid red; 488 | } 489 | 490 | /* grid styles */ 491 | table.Grid { 492 | border-collapse: collapse; 493 | } 494 | 495 | table.Grid tr td { 496 | padding: 0.2em; 497 | margin: 0px; 498 | text-align: center; 499 | } 500 | 501 | table.Grid tr td.title { 502 | font-size: 90%; 503 | border-right: 1px gray solid; 504 | border-bottom: 1px gray solid; 505 | } 506 | 507 | table.Grid tr td.sourcestamp { 508 | font-size: 90%; 509 | } 510 | 511 | table.Grid tr td.builder { 512 | text-align: right; 513 | font-size: 90%; 514 | } 515 | 516 | table.Grid tr td.build { 517 | border: 1px gray solid; 518 | } 519 | 520 | /* column container */ 521 | div.column { 522 | margin: 0 2em 2em 0; 523 | float: left; 524 | } 525 | 526 | /* info tables */ 527 | table.info { 528 | border-spacing: 1px; 529 | } 530 | 531 | table.info td { 532 | padding: 0.1em 1em 0.1em 1em; 533 | text-align: center; 534 | } 535 | 536 | table.info th { 537 | padding: 0.2em 1.5em 0.2em 1.5em; 538 | text-align: center; 539 | } 540 | 541 | table.info td.left { 542 | text-align: left 543 | } 544 | 545 | table.info td .reason { 546 | display:block; 547 | font-weight: bold; 548 | } 549 | 550 | .alt { 551 | background-color: #f6f6f6; 552 | } 553 | 554 | li { 555 | padding: 0.1em 1em 0.1em 1em; 556 | } 557 | 558 | .result { 559 | padding: 0.3em 1em 0.3em 1em; 560 | } 561 | 562 | /* log view */ 563 | .log * { 564 | vlink: #800080; 565 | font-family: "Courier New", courier, monotype, monospace; 566 | } 567 | 568 | span.stdout { 569 | color: black; 570 | } 571 | 572 | span.stderr { 573 | color: red; 574 | } 575 | 576 | span.header { 577 | color: blue; 578 | } 579 | span.ansi30 { 580 | color: black; 581 | } 582 | span.ansi31 { 583 | color: red; 584 | } 585 | span.ansi32 { 586 | color: green; 587 | } 588 | span.ansi33 { 589 | color: orange; 590 | } 591 | span.ansi34 { 592 | color: yellow; 593 | } 594 | span.ansi35 { 595 | color: purple; 596 | } 597 | span.ansi36 { 598 | color: blue; 599 | } 600 | span.ansi37 { 601 | color: white; 602 | } 603 | 604 | /* revision & email */ 605 | .revision .full { 606 | display: none; 607 | } 608 | 609 | .user .email { 610 | display: none; 611 | } 612 | 613 | pre { 614 | white-space: pre-wrap; 615 | } 616 | 617 | /* change comments (use regular colors here) */ 618 | pre.comments>a:link,pre.comments>a:visited { 619 | color: blue; 620 | } 621 | 622 | pre.comments>a:active { 623 | color: purple; 624 | } 625 | 626 | form.command_forcebuild { 627 | border-top: 1px solid black; 628 | padding: .5em; 629 | margin: .5em; 630 | } 631 | 632 | form.command_forcebuild > .row { 633 | border-top: 1px dotted gray; 634 | padding: .5em 0; 635 | } 636 | 637 | form.command_forcebuild .force-textarea > .label { 638 | display: block; 639 | } 640 | 641 | form.command_forcebuild .force-nested > .label { 642 | font-weight: bold; 643 | display: list-item; 644 | } 645 | 646 | form.command_forcebuild .force-any .force-text { 647 | display: inline; 648 | } 649 | -------------------------------------------------------------------------------- /public_html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ethereum/ethereum-buildbot/8a4c75e27da68d00cccb9cceadb3742d3814a1de/public_html/favicon.ico -------------------------------------------------------------------------------- /public_html/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /waterfall 3 | Disallow: /builders 4 | Disallow: /changes 5 | Disallow: /buildslaves 6 | Disallow: /schedulers 7 | Disallow: /one_line_per_build 8 | Disallow: /grid 9 | Disallow: /tgrid 10 | Disallow: /json 11 | -------------------------------------------------------------------------------- /public_html/status_error.svg: -------------------------------------------------------------------------------- 1 | buildbuilderrorerror -------------------------------------------------------------------------------- /public_html/status_exception.svg: -------------------------------------------------------------------------------- 1 | buildbuildexceptionexception 2 | -------------------------------------------------------------------------------- /public_html/status_failure.svg: -------------------------------------------------------------------------------- 1 | buildbuildfailingfailing -------------------------------------------------------------------------------- /public_html/status_retry.svg: -------------------------------------------------------------------------------- 1 | buildbuildretryretry 2 | -------------------------------------------------------------------------------- /public_html/status_skipped.svg: -------------------------------------------------------------------------------- 1 | buildbuildskippedskipped 2 | -------------------------------------------------------------------------------- /public_html/status_success.svg: -------------------------------------------------------------------------------- 1 | buildbuildsuccesssuccess 2 | -------------------------------------------------------------------------------- /public_html/status_unknown.svg: -------------------------------------------------------------------------------- 1 | buildbuildunknownunknown -------------------------------------------------------------------------------- /public_html/status_warnings.svg: -------------------------------------------------------------------------------- 1 | buildbuildwarningswarnings 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | buildbot==0.8.9 2 | service-identity 3 | simplejson 4 | txgithub 5 | txrequests 6 | boto -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E302,E402,E701,F403,C901 3 | max-line-length = 160 4 | exclude = tests/integration.py,tests/integration-user.py,tests/catalog.py,master 5 | 6 | [pytest] 7 | norecursedirs = .git 8 | -------------------------------------------------------------------------------- /slaves.json.sample: -------------------------------------------------------------------------------- 1 | [ 2 | {"name": "selfslave", "password": "secret"}, 3 | {"name": "buildslave-one", "password": "secret"}, 4 | {"name": "buildslave-two", "password": "secret"}, 5 | {"name": "buildslave-three", "password": "secret"}, 6 | {"name": "buildslave-four", "password": "secret"}, 7 | {"name": "buildslave-five", "password": "secret"}, 8 | {"name": "buildslave-six", "password": "secret"}, 9 | {"name": "poc-server-master", "password": "secret"}, 10 | {"name": "poc-server-develop", "password": "secret"}, 11 | {"name": "slave-cpp-one", "password": "secret"}, 12 | {"name": "slave-cpp-one-develop", "password": "secret"}, 13 | {"name": "slave-cpp-two", "password": "secret"}, 14 | {"name": "slave-cpp-two-develop", "password": "secret"}, 15 | {"name": "slave-cpp-three", "password": "secret"}, 16 | {"name": "slave-cpp-three-develop", "password": "secret"}, 17 | {"name": "slave-cpp-four", "password": "secret"}, 18 | {"name": "slave-cpp-four-develop", "password": "secret"}, 19 | {"name": "slave-cpp-five", "password": "secret"}, 20 | {"name": "slave-cpp-five-develop", "password": "secret"}, 21 | {"name": "slave-cpp-six", "password": "secret"}, 22 | {"name": "slave-cpp-six-develop", "password": "secret"}, 23 | {"name": "slave-cpp-one-deb", "password": "secret"}, 24 | {"name": "slave-cpp-one-pr", "password": "secret"}, 25 | {"name": "slave-cpp-two-deb", "password": "secret"}, 26 | {"name": "slave-cpp-two-pr", "password": "secret"}, 27 | {"name": "slave-cpp-three-deb", "password": "secret"}, 28 | {"name": "slave-cpp-three-pr", "password": "secret"}, 29 | {"name": "slave-cpp-four-deb", "password": "secret"}, 30 | {"name": "slave-cpp-four-pr", "password": "secret"}, 31 | {"name": "slave-cpp-five-deb", "password": "secret"}, 32 | {"name": "slave-cpp-five-pr", "password": "secret"}, 33 | {"name": "slave-cpp-six-deb", "password": "secret"}, 34 | {"name": "slave-cpp-six-pr", "password": "secret"}, 35 | {"name": "slave-cpp-one-integration", "password": "secret"}, 36 | {"name": "slave-cpp-two-integration", "password": "secret"}, 37 | {"name": "slave-cpp-three-integration", "password": "secret"}, 38 | {"name": "slave-cpp-four-integration", "password": "secret"}, 39 | {"name": "slave-cpp-five-integration", "password": "secret"}, 40 | {"name": "slave-cpp-six-integration", "password": "secret"}, 41 | {"name": "slave-go-one", "password": "secret"}, 42 | {"name": "slave-go-one-develop", "password": "secret"}, 43 | {"name": "slave-go-two", "password": "secret"}, 44 | {"name": "slave-go-two-develop", "password": "secret"}, 45 | {"name": "slave-go-three", "password": "secret"}, 46 | {"name": "slave-go-three-develop", "password": "secret"}, 47 | {"name": "slave-go-four", "password": "secret"}, 48 | {"name": "slave-go-four-develop", "password": "secret"}, 49 | {"name": "slave-go-five", "password": "secret"}, 50 | {"name": "slave-go-five-develop", "password": "secret"}, 51 | {"name": "slave-go-six", "password": "secret"}, 52 | {"name": "slave-go-six-develop", "password": "secret"}, 53 | {"name": "slave-go-one-deb", "password": "secret"}, 54 | {"name": "slave-go-one-pr", "password": "secret"}, 55 | {"name": "slave-go-two-deb", "password": "secret"}, 56 | {"name": "slave-go-two-pr", "password": "secret"}, 57 | {"name": "slave-go-three-deb", "password": "secret"}, 58 | {"name": "slave-go-three-pr", "password": "secret"}, 59 | {"name": "slave-go-four-deb", "password": "secret"}, 60 | {"name": "slave-go-four-pr", "password": "secret"}, 61 | {"name": "slave-go-five-deb", "password": "secret"}, 62 | {"name": "slave-go-five-pr", "password": "secret"}, 63 | {"name": "slave-go-six-deb", "password": "secret"}, 64 | {"name": "slave-go-six-pr", "password": "secret"}, 65 | {"name": "slave-go-one-arm", "password": "secret"}, 66 | {"name": "slave-go-two-arm", "password": "secret"}, 67 | {"name": "slave-go-three-arm", "password": "secret"}, 68 | {"name": "slave-go-four-arm", "password": "secret"}, 69 | {"name": "slave-go-five-arm", "password": "secret"}, 70 | {"name": "slave-go-six-arm", "password": "secret"}, 71 | {"name": "slave-python-one", "password": "secret"}, 72 | {"name": "slave-python-one-pr", "password": "secret"}, 73 | {"name": "slave-python-two", "password": "secret"}, 74 | {"name": "slave-python-two-pr", "password": "secret"}, 75 | {"name": "slave-python-five", "password": "secret"}, 76 | {"name": "slave-python-five-pr", "password": "secret"}, 77 | {"name": "slave-python-six", "password": "secret"}, 78 | {"name": "slave-python-six-pr", "password": "secret"}, 79 | {"name": "slave-java-one", "password": "secret"}, 80 | {"name": "slave-java-one-pr", "password": "secret"}, 81 | {"name": "slave-java-two", "password": "secret"}, 82 | {"name": "slave-java-two-pr", "password": "secret"}, 83 | {"name": "latentslave", "password": "secret"}, 84 | {"name": "latentslave1", "password": "secret"}, 85 | {"name": "latentslave2", "password": "secret"}, 86 | {"name": "latentslave3", "password": "secret"}, 87 | {"name": "latentslave4", "password": "secret"}, 88 | {"name": "latentslave5", "password": "secret"}, 89 | {"name": "latentslave6", "password": "secret"}, 90 | {"name": "latentslave7", "password": "secret"}, 91 | {"name": "latentslave8", "password": "secret"}, 92 | {"name": "latentslave9", "password": "secret"}, 93 | {"name": "latentslave10", "password": "secret"}, 94 | {"name": "latentslave11", "password": "secret"}, 95 | {"name": "latentslave12", "password": "secret"}, 96 | {"name": "latentslave13", "password": "secret"}, 97 | {"name": "latentslave14", "password": "secret"}, 98 | {"name": "latentslave15", "password": "secret"}, 99 | {"name": "latentslave16", "password": "secret"}, 100 | {"name": "latentslave17", "password": "secret"}, 101 | {"name": "latentslave18", "password": "secret"}, 102 | {"name": "latentslave19", "password": "secret"}, 103 | {"name": "latentslave20", "password": "secret"}, 104 | {"name": "winslave", "password": "secret"}, 105 | {"name": "winslave-go", "password": "secret"}, 106 | {"name": "osx", "password": "secret"}, 107 | {"name": "osx-two", "password": "secret"} 108 | ] 109 | -------------------------------------------------------------------------------- /slaves.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | # ###### BUILDSLAVES 5 | 6 | # The 'slaves' list defines the set of recognized buildslaves. Each element is 7 | # a BuildSlave object, specifying a unique slave name and password. The same 8 | # slave name and password must be configured on the slave. 9 | from buildbot.buildslave import BuildSlave 10 | from buildbot.buildslave.ec2 import EC2LatentBuildSlave 11 | 12 | # using simplejson instead of json since Twisted wants ascii instead of unicode 13 | import simplejson as json 14 | 15 | slaves = [] 16 | 17 | # Load slaves from external file, see slaves.json.sample 18 | for slave in json.load(open("slaves.json")): 19 | if 'latentslave' in slave['name']: 20 | slaves.append(EC2LatentBuildSlave( 21 | slave['name'], 22 | slave['password'], 23 | 'c4.large', 24 | max_builds=1, 25 | ami='ami-ec6c7186', 26 | region='us-east-1', 27 | placement='e', 28 | user_data='{"SLAVENAME": "%s"}' % slave['name'], 29 | spot_instance=True, 30 | max_spot_price=0.05, 31 | price_multiplier=1.15)) 32 | else: 33 | slaves.append(BuildSlave(slave['name'], slave['password'])) 34 | -------------------------------------------------------------------------------- /startup/buildslave-osx.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | StandardOutPath 6 | twistd.log 7 | StandardErrorPath 8 | twistd-err.log 9 | EnvironmentVariables 10 | 11 | PATH 12 | /usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/opt/local/bin:/sbin:/usr/sbin:/bin:/usr/bin 13 | PYTHONPATH 14 | /usr/local/lib/python2.7/site-packages 15 | 16 | GroupName 17 | staff 18 | KeepAlive 19 | 20 | SuccessfulExit 21 | 22 | 23 | Label 24 | net.buildbot.slave 25 | ProgramArguments 26 | 27 | /usr/local/bin/twistd 28 | --nodaemon 29 | -y 30 | ./buildbot.tac 31 | 32 | RunAtLoad 33 | 34 | UserName 35 | administrator 36 | WorkingDirectory 37 | /Users/administrator/slave 38 | SessionCreate 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /startup/eth-supervisord-develop.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --json-rpc --client-name "EthDEV Server Frontier" --mode full --mining off --upnp off --listen-ip 5.1.83.226 --master 0 -b --sentinel https://badblocks.ethdev.com -x 20 --frontier 8 | -------------------------------------------------------------------------------- /startup/eth-supervisord-integration-test.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --db-path .ethereum_eth --mining off --json-rpc --session-secret c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4 --master 0 8 | -------------------------------------------------------------------------------- /startup/eth-supervisord-integration-user.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --db-path .ethereum_eth --mining off --json-rpc --master 0 8 | -------------------------------------------------------------------------------- /startup/eth-supervisord-integration.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --db-path .ethereum_eth --mining on --force-mining --json-rpc --session-secret c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4 --master 0 8 | -------------------------------------------------------------------------------- /startup/eth-supervisord-master.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --json-rpc --client-name "Develop Server Master" --mode peer --mining off --upnp off --listen-ip 5.1.83.225 --master 0 8 | -------------------------------------------------------------------------------- /startup/eth-supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=eth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=eth.log 6 | stderr_logfile=eth.err 7 | command=eth --client-name buildslave --mining off --bootstrap --master 0 8 | -------------------------------------------------------------------------------- /startup/geth-supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | logfile=geth-supervisord.log 3 | 4 | [program:eth] 5 | stdout_logfile=geth.log 6 | stderr_logfile=geth.err 7 | command=geth 8 | -------------------------------------------------------------------------------- /status.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | # ###### STATUS TARGETS 5 | 6 | # 'status' is a list of Status Targets. The results of each build will be 7 | # pushed to these targets. buildbot/status/*.py has a variety to choose from, 8 | # including web pages, email senders, and IRC bots. 9 | 10 | from buildbot.status import html 11 | from buildbot.status import words 12 | from buildbot.status.web import authz, auth 13 | from buildbot.status.github import GitHubStatus 14 | from buildbot.process.properties import Interpolate 15 | from buildstatusimage import BuildStatusImageResource 16 | 17 | # using simplejson instead of json since Twisted wants ascii instead of unicode 18 | import simplejson as json 19 | 20 | status = [] 21 | 22 | # Load users from external file, see users.json.sample 23 | users = [] 24 | for user in json.load(open("users.json")): 25 | users.append((user['username'], user['password'])) 26 | 27 | authz_cfg = authz.Authz( 28 | # change any of these to True to enable; see the manual for more 29 | # options 30 | auth=auth.BasicAuth(users), 31 | gracefulShutdown=False, 32 | forceBuild='auth', # use this to test your slave once it is set up 33 | forceAllBuilds='auth', 34 | pingBuilder='auth', 35 | stopBuild='auth', 36 | stopAllBuilds='auth', 37 | cancelPendingBuild='auth', 38 | ) 39 | 40 | 41 | class WebStatus(html.WebStatus): 42 | def setupUsualPages(self, numbuilds, num_events, num_events_max): 43 | html.WebStatus.setupUsualPages(self, numbuilds, num_events, num_events_max) 44 | self.putChild("buildstatusimage", BuildStatusImageResource()) 45 | 46 | status.append(WebStatus( 47 | # http_port="ssl:port=8443:privateKey=/etc/ssl/server.key:certKey=/etc/ssl/server.crt:extraCertChain=/etc/ssl/server.ca-bundle", 48 | http_port=8080, 49 | authz=authz_cfg, 50 | change_hook_auth=["file:changehook.passwd"], 51 | change_hook_dialects={'github': {}}, 52 | order_console_by_time=True)) 53 | 54 | 55 | # IRC bot 56 | ircbot = json.load(open("ircbot.json")) 57 | status.append(words.IRC(host=ircbot['server'], 58 | nick=ircbot['nickname'], 59 | password=ircbot['password'], 60 | channels=ircbot['channels'], 61 | notify_events={ 62 | 'successToException': 1, 63 | 'successToFailure': 1, 64 | 'failureToSuccess': 1, 65 | 'exceptionToSuccess': 1} 66 | )) 67 | 68 | 69 | # GitHub Status 70 | tokens = json.load(open("tokens.json")) 71 | for repo in tokens: 72 | gs = GitHubStatus( 73 | token=tokens[repo]["token"], 74 | repoOwner=tokens[repo]["owner"], 75 | repoName=repo, 76 | sha=Interpolate("%(src:" + repo + ":revision)s"), 77 | startDescription='DEV build started.', 78 | endDescription='DEV build done.') 79 | status.append(gs) 80 | -------------------------------------------------------------------------------- /templates/README.txt: -------------------------------------------------------------------------------- 1 | This is the directory to place customized templates for webstatus. 2 | 3 | You can find the sources for the templates used in: 4 | buildbot/status/web/templates 5 | 6 | You can copy any of those files to this directory, make changes, and buildbot will automatically 7 | use your modified templates. 8 | 9 | Also of note is that you will not need to restart/reconfig buildbot master to have these changes take effect. 10 | 11 | The syntax of the templates is Jinja2: 12 | http://jinja.pocoo.org/ -------------------------------------------------------------------------------- /templates/console.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block head %} 4 | {{ super() }} 5 | 76 | {% endblock %} 77 | 78 | {% block content %} 79 | 80 |

Console View

81 | 82 |
83 | 84 | 85 | 102 | 119 | 139 | 140 |
86 | {% if tags|length > 1 %} 87 |
Tags: {% for t in tags %}{{ t.name|e }} {% endfor %} 88 | {% endif %} 89 | {% if codebase %} 90 |
Codebase: {{ codebase|e }} 91 | {% endif %} 92 | {% if repository %} 93 |
Repository: {{ repository|e }} 94 | {% endif %} 95 | {% if project %} 96 |
Project: {{ project|e }} 97 | {% endif %} 98 | {% if branch != ANYBRANCH %} 99 |
Branch: {{ branch|e }} 100 | {% endif %} 101 |
103 |
104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 |
Legend:  PassedFailedWarningsFailed AgainRunningExceptionOfflineNo data
117 |
118 |
120 | 131 |
132 | 136 | 137 |
138 |
141 |
142 | 143 |
144 | 145 | {% set alt_class = cycler('', 'Alt') %} 146 | 147 |
148 | 149 | 150 | {% if tags|length > 1 %} 151 | 152 | 154 | 156 | {% for t in tags %} 157 | 160 | {% endfor %} 161 | 162 | 163 | 165 | 166 | {% endif %} 167 | 168 | {% if slaves %} 169 | 170 | 172 | 174 | {% for t in tags %} 175 | 192 | {% endfor %} 193 | 194 | {% endif %} 195 | 196 | {% for r in revisions %} 197 | {% set alt = alt_class.next() %} 198 | {% set firstrev = "first" if loop.first else '' %} 199 | 200 | 201 | 204 | 207 | 208 | {% for t in tags %} 209 | {% set last = "last" if loop.last else "" %} 210 | 223 | {% endfor %} 224 | 225 | 226 | 227 | 230 | 231 | 232 | {% if r.details %} 233 | 234 | 245 | 246 | {% endif %} 247 | 248 | 249 | 251 | 252 | 253 | {% else %} 254 | 255 | {% endfor %} 256 | 257 |
153 | 155 | 158 | {{ t.name|e }} 159 |
164 |
171 | 173 | 176 | 177 | 178 | {% for s in slaves[t.name] %} 179 | 188 | {% endfor %} 189 | 190 |
180 | 185 | 186 | 187 |
191 |
202 | {{ r.id|shortrev(r.repository) }} 203 | 205 | {{ r.who|user }} 206 | 211 | 212 | 213 | {% for b in r.builds[t.name] %} 214 | 219 | {% endfor %} 220 | 221 |
215 | 218 |
222 |
228 | {{ r.comments|changecomment(r.project or None)|replace('\n', '
')|replace(' ','  ') }} 229 |
235 |
    236 | {% for d in r.details %} 237 |
  • {{ d.buildername }}: {{ d.status }} -   238 | {%- for l in d.logs -%} 239 | {{ l.name }} 240 | {%- endfor -%} 241 |
  • 242 | {% endfor %} 243 |
244 |
250 |
No revisions available
258 |
259 | 260 | 261 |
262 |
263 | 264 | 265 | 266 | 267 | 275 | 276 | {% endblock %} 277 | 278 | 279 | {% block footer %} 280 | 281 | {{ super() }} 282 | {#

Debug info: {{ debuginfo }}

#} 283 | {% endblock %} 284 | -------------------------------------------------------------------------------- /tests/catalog.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from selenium import webdriver 3 | from selenium.webdriver.common.by import By 4 | from selenium.webdriver.common.keys import Keys 5 | from selenium.webdriver.support.ui import Select 6 | from selenium.common.exceptions import NoSuchElementException 7 | from selenium.common.exceptions import NoAlertPresentException 8 | import unittest, time, re 9 | 10 | class Integration(unittest.TestCase): 11 | def setUp(self): 12 | self.driver = webdriver.Firefox() 13 | self.driver.implicitly_wait(30) 14 | self.base_url = "http://ethereum-dapp-catalog.meteor.com/" 15 | self.verificationErrors = [] 16 | self.accept_next_alert = True 17 | self.driver.set_window_position(0, 0) 18 | self.driver.set_window_size(1280, 1200) 19 | 20 | def test_catalog(self): 21 | driver = self.driver 22 | 23 | try: 24 | driver.get(self.base_url) 25 | time.sleep(5) 26 | 27 | driver.save_screenshot('catalog-init.png') 28 | 29 | except Exception as e: 30 | driver.save_screenshot('catalog-fail.png') 31 | self.fail(e) 32 | 33 | self.assertEqual([], self.verificationErrors) 34 | 35 | driver.save_screenshot('catalog-passed.png') 36 | 37 | driver.quit() 38 | -------------------------------------------------------------------------------- /tokens.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "REPO": { 3 | "owner": "REPO_OWNER", 4 | "token": "REPO_TOKEN" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /users.json.sample: -------------------------------------------------------------------------------- 1 | [ 2 | {"username": "admin", "password": "secret"} 3 | ] 4 | --------------------------------------------------------------------------------