Refactor the CRI-O test playbook to be more modular
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
This commit is contained in:
parent
89f18fa7b5
commit
e160796d4e
12 changed files with 550 additions and 618 deletions
40
contrib/test/integration/golang.yml
Normal file
40
contrib/test/integration/golang.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
- name: set up GOPATH if it is not already set
|
||||
lineinfile:
|
||||
dest: /etc/environment
|
||||
line: 'GOPATH={{ ansible_env.HOME }}/go'
|
||||
regexp: 'GOPATH='
|
||||
state: present
|
||||
when: ansible_env.GOPATH is not defined
|
||||
|
||||
- name: ensure user profile exists
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/.profile"
|
||||
state: touch
|
||||
|
||||
- name: set up PATH for Go binaries
|
||||
lineinfile:
|
||||
dest: "{{ ansible_user_dir }}/.profile"
|
||||
line: 'PATH={{ ansible_env.PATH }}:{{ ansible_env.GOPATH }}/bin'
|
||||
regexp: '^PATH='
|
||||
state: present
|
||||
|
||||
- name: set up directories
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{ ansible_env.GOPATH }}/src/github.com/containernetworking"
|
||||
- "{{ ansible_env.GOPATH }}/src/github.com/kubernetes-incubator"
|
||||
- "{{ ansible_env.GOPATH }}/src/github.com/k8s.io"
|
||||
- "{{ ansible_env.GOPATH }}/src/github.com/sstephenson"
|
||||
- "{{ ansible_env.GOPATH }}/src/github.com/opencontainers"
|
||||
|
||||
- name: install Go tools and dependencies
|
||||
shell: /usr/bin/go get -u "github.com/{{ item }}"
|
||||
with_items:
|
||||
- tools/godep
|
||||
- onsi/ginkgo/ginkgo
|
||||
- onsi/gomega
|
||||
- cloudflare/cfssl/cmd/...
|
||||
- jteeuwen/go-bindata/go-bindata
|
Loading…
Add table
Add a link
Reference in a new issue