summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Reshetnyak <sreshetniak@mirantis.com>2017-01-30 20:01:23 +0300
committerSergey Reshetnyak <sreshetniak@mirantis.com>2017-03-16 14:44:56 +0000
commit97fe226bfecd2e34184bf1885acd87f8ab4208dc (patch)
treeb97c3288ec97206fec725a803b64b4f27068fe54
parent99e4bd5878a2eeced122cef927423a6a5a058c67 (diff)
Put private key using files
Notes
Notes (review): Code-Review+2: Artur Zarzycki <azarzycki@mirantis.com> Code-Review+2: Andrey Pavlov <apavlov@mirantis.com> Workflow+1: Andrey Pavlov <apavlov@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 17 Mar 2017 14:43:53 +0000 Reviewed-on: https://review.openstack.org/446542 Project: openstack/fuel-ccp-rally Branch: refs/heads/master
-rw-r--r--service/actions/tempest.yaml3
-rw-r--r--service/files/run-tempest.sh.j25
-rw-r--r--service/files/static.pem.j21
3 files changed, 5 insertions, 4 deletions
diff --git a/service/actions/tempest.yaml b/service/actions/tempest.yaml
index 2e8abd3..a61f0a6 100644
--- a/service/actions/tempest.yaml
+++ b/service/actions/tempest.yaml
@@ -10,3 +10,6 @@ actions:
10 - path: /var/lib/rally/run-tempest.sh 10 - path: /var/lib/rally/run-tempest.sh
11 content: run-tempest.sh.j2 11 content: run-tempest.sh.j2
12 perm: "0700" 12 perm: "0700"
13 - path: /var/lib/rally/static.pem
14 content: static.pem.j2
15 perm: "0600"
diff --git a/service/files/run-tempest.sh.j2 b/service/files/run-tempest.sh.j2
index 5ce8089..c2cf683 100644
--- a/service/files/run-tempest.sh.j2
+++ b/service/files/run-tempest.sh.j2
@@ -12,10 +12,7 @@ function publish_artifacts {
12 rally verify results --html --output-file "${path}/result.html" 12 rally verify results --html --output-file "${path}/result.html"
13 # TODO: add junit report 13 # TODO: add junit report
14 14
15 local private_key_path="private.key" 15 scp -i /var/lib/rally/static.pem "${path}" {{ rally.tempest.static.username }}@{{ rally.tempest.static.host }}:{{ rally.tempest.static.port }}:
16 printf "{{ rally.tempest.static.private_key }}" > "${private_key_path}"
17 chmod 600 "${private_key_path}"
18 scp -i "${private_key_path}" "${path}" {{ rally.tempest.static.username }}@{{ rally.tempest.static.host }}:{{ rally.tempest.static.port }}:
19 echo "Artifacts are located to {{ rally.tempest.static.site }}/${path}" 16 echo "Artifacts are located to {{ rally.tempest.static.site }}/${path}"
20} 17}
21 18
diff --git a/service/files/static.pem.j2 b/service/files/static.pem.j2
new file mode 100644
index 0000000..6c876c6
--- /dev/null
+++ b/service/files/static.pem.j2
@@ -0,0 +1 @@
{{ rally.tempest.static.private_key | replace("\\n", "\n") }}