Utilize git_repo_cloned + vars for all repos

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2017-11-06 15:36:46 -05:00
parent 717f01ff6d
commit 3761cf8e86
7 changed files with 35 additions and 31 deletions

View file

@ -1,10 +1,5 @@
--- ---
- name: clone bats source repo
git:
repo: "https://github.com/sstephenson/bats.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/sstephenson/bats"
- name: install bats - name: install bats
command: "./install.sh /usr/local" command: "./install.sh /usr/local"
args: args:

View file

@ -1,11 +1,5 @@
--- ---
- name: clone cri-tools source repo
git:
repo: "https://github.com/kubernetes-incubator/cri-tools.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-tools"
version: "9ff5e8f78a4182ab8d5ba9bcccdda5f338600eab"
- name: install crictl - name: install crictl
command: "/usr/bin/go install github.com/kubernetes-incubator/cri-tools/cmd/crictl" command: "/usr/bin/go install github.com/kubernetes-incubator/cri-tools/cmd/crictl"

View file

@ -1,11 +1,5 @@
--- ---
- name: clone kubernetes source repo
git:
repo: "https://github.com/runcom/kubernetes.git"
dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
version: "cri-o-patched-1.8"
- name: install etcd - name: install etcd
command: "hack/install-etcd.sh" command: "hack/install-etcd.sh"
args: args:

View file

@ -1,11 +1,5 @@
--- ---
- name: clone plugins source repo
git:
repo: "https://github.com/containernetworking/plugins.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/containernetworking/plugins"
version: "dcf7368eeab15e2affc6256f0bb1e84dd46a34de"
- name: build plugins - name: build plugins
command: "./build.sh" command: "./build.sh"
args: args:

View file

@ -1,11 +1,5 @@
--- ---
- name: clone runc source repo
git:
repo: "https://github.com/opencontainers/runc.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/opencontainers/runc"
version: "84a082bfef6f932de921437815355186db37aeb1"
- name: build runc - name: build runc
make: make:
params: BUILDTAGS="seccomp selinux" params: BUILDTAGS="seccomp selinux"

View file

@ -4,13 +4,19 @@
- "{{ playbook_dir }}/vars.yml" - "{{ playbook_dir }}/vars.yml"
tags: tags:
- setup - setup
tasks: pre_tasks:
- name: set up the system - name: set up the system
include: system.yml include: system.yml
- name: install Golang tools - name: install Golang tools
include: golang.yml include: golang.yml
roles:
- role: git_repo_cloned
git_ops: '{{ git_operations }}'
always_force: False
post_tasks:
- name: clone build and install bats - name: clone build and install bats
include: "build/bats.yml" include: "build/bats.yml"
@ -33,7 +39,12 @@
tags: tags:
- integration - integration
- e2e - e2e
tasks: roles:
- role: git_repo_cloned
git_ops: '{{ git_operations }}'
always_force: True
post_tasks:
- name: clone build and install cri-o - name: clone build and install cri-o
include: "build/cri-o.yml" include: "build/cri-o.yml"

View file

@ -1,5 +1,27 @@
--- ---
# List of repositories to clone. Each item accepts any option or value supported
# by Ansible's ``git`` module.
git_operations:
- repo: "https://github.com/sstephenson/bats.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/sstephenson/bats"
- repo: "https://github.com/kubernetes-incubator/cri-tools.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator/cri-tools"
version: "9ff5e8f78a4182ab8d5ba9bcccdda5f338600eab"
- repo: "https://github.com/runcom/kubernetes.git"
dest: "{{ ansible_env.GOPATH }}/src/k8s.io/kubernetes"
version: "cri-o-patched-1.8"
- repo: "https://github.com/containernetworking/plugins.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/containernetworking/plugins"
version: "dcf7368eeab15e2affc6256f0bb1e84dd46a34de"
- repo: "https://github.com/opencontainers/runc.git"
dest: "{{ ansible_env.GOPATH }}/src/github.com/opencontainers/runc"
version: "84a082bfef6f932de921437815355186db37aeb1"
# For results.yml Paths use rsync 'source' conventions # For results.yml Paths use rsync 'source' conventions
artifacts: "/tmp/artifacts" # Base-directory for collection artifacts: "/tmp/artifacts" # Base-directory for collection
crio_integration_filepath: "{{ artifacts }}/testout.txt" crio_integration_filepath: "{{ artifacts }}/testout.txt"