Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 17 | --- |
| 18 | # repo/tasks/main.yml |
| 19 | |
| 20 | - name: Download and install repo tool |
| 21 | become: yes |
| 22 | get_url: |
| 23 | url: "{{ repo_dl_url }}" |
| 24 | checksum: "{{ repo_checksum }}" |
| 25 | dest: "/usr/local/bin/repo" |
| 26 | owner: root |
| 27 | group: root |
| 28 | mode: 0755 |
| 29 | |
| 30 | - name: Create CORD directory |
| 31 | file: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 32 | dest: "{{ config_cord_dir }}" |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 33 | state: directory |
| 34 | |
| 35 | - name: Init CORD repos (master branch) using repo |
| 36 | command: "/usr/local/bin/repo init -u {{ repo_manifest_url }} -b master -g build,onos,orchestration" |
| 37 | args: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 38 | chdir: "{{ config_cord_dir }}" |
| 39 | creates: "{{ config_cord_dir }}/.repo" |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 40 | |
| 41 | - name: Synchronize CORD repos using repo |
| 42 | command: "repo sync" |
| 43 | args: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 44 | chdir: "{{ config_cord_dir }}" |
| 45 | creates: "{{ config_cord_dir }}/build" |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 46 | |
| 47 | - name: Download specific gerrit changesets using repo |
| 48 | command: "/usr/local/bin/repo download {{ item.path }} {{ item.revision }}" |
| 49 | args: |
Zack Williams | c989f26 | 2017-05-11 13:02:59 -0700 | [diff] [blame] | 50 | chdir: "{{ config_cord_dir }}" |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 51 | with_items: "{{ gerrit_changesets }}" |
| 52 | tags: |
| 53 | - skip_ansible_lint # usually won't be run, except during dev |
| 54 | |