Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download files from S3 to improve reliability. #16891

Merged
merged 1 commit into from
Jul 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 14 additions & 11 deletions test/integration/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -315,19 +315,22 @@ no_log: setup
[ "$$(ansible-playbook no_log_local.yml -i $(INVENTORY) -e outputdir=$(TEST_DIR) -vvvvv | awk --source 'BEGIN { logme = 0; nolog = 0; } /LOG_ME/ { logme += 1;} /DO_NOT_LOG/ { nolog += 1;} END { printf "%d/%d", logme, nolog; }')" = "26/0" ]

test_binary_modules:
mytmpdir=$(MYTMPDIR); \
ls -al $$mytmpdir; \
curl https://storage.googleapis.com/golang/go1.6.2.$(UNAME)-amd64.tar.gz | tar -xz -C $$mytmpdir; \
[ $$? != 0 ] && wget -qO- https://storage.googleapis.com/golang/go1.6.2.$(UNAME)-amd64.tar.gz | tar -xz -C $$mytmpdir; \
ls -al $$mytmpdir; \
cd library; \
GOROOT=$$mytmpdir/go GOOS=linux GOARCH=amd64 $$mytmpdir/go/bin/go build -o helloworld_linux helloworld.go; \
GOROOT=$$mytmpdir/go GOOS=windows GOARCH=amd64 $$mytmpdir/go/bin/go build -o helloworld_win32nt.exe helloworld.go; \
GOROOT=$$mytmpdir/go GOOS=darwin GOARCH=amd64 $$mytmpdir/go/bin/go build -o helloworld_darwin helloworld.go; \
cd ..; \
rm -rf $$mytmpdir; \
ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook download_binary_modules.yml -i $(INVENTORY) -v $(TEST_FLAGS)
ANSIBLE_HOST_KEY_CHECKING=false ansible-playbook test_binary_modules.yml -i $(INVENTORY) -v $(TEST_FLAGS)

binary_modules:
# Compiled versions of these binary modules are available at the url below.
# This avoids a dependency on go and keeps the binaries out of our git repository.
# https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/
cd library; \
GOOS=linux GOARCH=amd64 go build -o helloworld_linux helloworld.go; \
GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt.exe helloworld.go; \
GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin helloworld.go; \
GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd helloworld.go

clean_binary_modules:
rm library/helloworld_*

test_async:
# Verify that extra data before module JSON output during async call is ignored.
ANSIBLE_DEBUG=0 LC_ALL=bogus ansible-playbook test_async.yml -i localhost, -e ansible_connection=ssh -v $(TEST_FLAGS)
Expand Down
10 changes: 10 additions & 0 deletions test/integration/download_binary_modules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- hosts: all
tasks:
- debug: var=ansible_system

- name: download binary module
tags: test_binary_modules
get_url:
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/helloworld_{{ ansible_system|lower }}"
dest: "{{ playbook_dir }}/library/helloworld_{{ ansible_system|lower }}"
mode: 0755
2 changes: 1 addition & 1 deletion test/integration/roles/test_win_msi/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

msi_url: http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.22/7z922-x64.msi
msi_url: https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_win_msi/7z922-x64.msi
msi_download_path: "C:\\Program Files\\7z922-x64.msi"
msi_install_path: "C:\\Program Files\\7-Zip"
msi_product_code: "{23170F69-40C1-2702-0922-000001000000}"