Browse Source

Put private key using files

Change-Id: I8fab4e3bbd3c5c4243c122be09edb34bc7a67f7a
changes/42/446542/2
Sergey Reshetnyak 2 years ago
parent
commit
97fe226bfe
3 changed files with 5 additions and 4 deletions
  1. 3
    0
      service/actions/tempest.yaml
  2. 1
    4
      service/files/run-tempest.sh.j2
  3. 1
    0
      service/files/static.pem.j2

+ 3
- 0
service/actions/tempest.yaml View File

@@ -10,3 +10,6 @@ actions:
10 10
       - path: /var/lib/rally/run-tempest.sh
11 11
         content: run-tempest.sh.j2
12 12
         perm: "0700"
13
+      - path: /var/lib/rally/static.pem
14
+        content: static.pem.j2
15
+        perm: "0600"

+ 1
- 4
service/files/run-tempest.sh.j2 View File

@@ -12,10 +12,7 @@ function publish_artifacts {
12 12
     rally verify results --html --output-file "${path}/result.html"
13 13
     # TODO: add junit report
14 14
 
15
-    local private_key_path="private.key"
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 }}:
15
+    scp -i /var/lib/rally/static.pem "${path}" {{ rally.tempest.static.username }}@{{ rally.tempest.static.host }}:{{ rally.tempest.static.port }}:
19 16
     echo "Artifacts are located to {{ rally.tempest.static.site }}/${path}"
20 17
 }
21 18
 

+ 1
- 0
service/files/static.pem.j2 View File

@@ -0,0 +1 @@
1
+{{ rally.tempest.static.private_key | replace("\\n", "\n") }}

Loading…
Cancel
Save