瀏覽代碼

test/ci: set expirationDate flag for CI namespace garbage collector

Vadim Rutkovsky 6 年之前
父節點
當前提交
c0a4a77467
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 1 0
      test/ci/launch.yml
  2. 4 0
      test/ci/vars.yml.sample

+ 1 - 0
test/ci/launch.yml

@@ -47,6 +47,7 @@
             "Name": "{{ item.name }}",
             "ansible-groups": "{{ item.ansible_groups | join(',') }}",
             "ansible-node-group": "{{ item.node_group }}",
+            "expirationDate": "{{ item.aws_expiration_date | default(aws_expiration_date) }}"
           }
 
     - name: Add machine to inventory

+ 4 - 0
test/ci/vars.yml.sample

@@ -14,6 +14,8 @@ aws_cluster_id: "ci"
 # us-east-1d
 aws_subnet: "subnet-cf57c596"
 
+aws_expiration_date: "{{ lookup('pipe','date -d \"4 hours\" --iso=minutes --utc') }}"
+
 aws_ami_tags:
   "tag:operating_system": "rhel"
   "tag:image_stage": "base"
@@ -40,3 +42,5 @@ aws_instances:
   # - device_name: /dev/sdb
   #   volume_size: 50
   #   delete_on_termination: yes
+  #Set expiration date for instances on CI namespace
+  #aws_expiration_date: "{{ lookup('pipe','date -d \"4 hours\" --iso=minutes --utc') }}"