blob: 083d40e421224e49b53815d1861c2c9e5a1b1829 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
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 Williamsa2763112017-01-03 11:38:38 -070017---
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 Williamsc989f262017-05-11 13:02:59 -070032 dest: "{{ config_cord_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -070033 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 Williamsc989f262017-05-11 13:02:59 -070038 chdir: "{{ config_cord_dir }}"
39 creates: "{{ config_cord_dir }}/.repo"
Zack Williamsa2763112017-01-03 11:38:38 -070040
41- name: Synchronize CORD repos using repo
42 command: "repo sync"
43 args:
Zack Williamsc989f262017-05-11 13:02:59 -070044 chdir: "{{ config_cord_dir }}"
45 creates: "{{ config_cord_dir }}/build"
Zack Williamsa2763112017-01-03 11:38:38 -070046
47- name: Download specific gerrit changesets using repo
48 command: "/usr/local/bin/repo download {{ item.path }} {{ item.revision }}"
49 args:
Zack Williamsc989f262017-05-11 13:02:59 -070050 chdir: "{{ config_cord_dir }}"
Zack Williamsa2763112017-01-03 11:38:38 -070051 with_items: "{{ gerrit_changesets }}"
52 tags:
53 - skip_ansible_lint # usually won't be run, except during dev
54