diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 43cacc06d4..6abab5abea 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -98,7 +98,7 @@ pipeline { githubCheckNotify('PENDING') // we want to notify the upstream about the e2e the soonest stash allowEmpty: true, name: 'source', useDefaultExcludes: false setEnvVar("GO_VERSION", readFile("${env.WORKSPACE}/${env.BASE_DIR}/.go-version").trim()) - setEnvVar("LABELS_STRING", "buildURL=${env.BUILD_URL} gitSha=${env.GIT_BASE_COMMIT}") + setEnvVar("LABELS_STRING", "buildURL=${env.BUILD_URL} gitSha=${env.GIT_BASE_COMMIT} build=${env.BUILD_ID} repo=${env.REPO} branch=${env.BRANCH_NAME.toLowerCase()} type=ci") checkSkipTests() } } @@ -337,7 +337,7 @@ def sshexec(workspace, connection, cmd){ } def scpr(workspace, connection, remote_src, local_dst){ - retryWithSleep(retries: 3, seconds: 5, backoff: true){ + retryWithSleep(retries: 3, seconds: 5, backoff: true){ sh "scp -r -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${workspace}/e2essh ${connection.user}@${connection.ip}:${remote_src} ${local_dst}" } } diff --git a/.ci/ansible/playbook.yml b/.ci/ansible/playbook.yml index 9f12095743..0d37815ede 100644 --- a/.ci/ansible/playbook.yml +++ b/.ci/ansible/playbook.yml @@ -1,6 +1,6 @@ - name: Create test environment hosts: localhost - gather_facts: no + gather_facts: yes vars: ansible_user: "{{nodeUser}}" tasks: diff --git a/.ci/ansible/tasks/runners.yml b/.ci/ansible/tasks/runners.yml index 1d1bde0dcd..9077623cc3 100644 --- a/.ci/ansible/tasks/runners.yml +++ b/.ci/ansible/tasks/runners.yml @@ -5,6 +5,14 @@ key_material: "{{ lookup('file', sshPublicKey) }}" region: us-east-2 state: present + tags: + branch: "{{branch | default('Not running on CI')}}" + build: "{{build | default('Not running on CI')}}" + build_url: "{{buildURL | default('Not running on CI') }}" + created_date: "{{ansible_date_time.epoch}}" + environment: "{{type | default('Not running on CI')}}" + git_sha: "{{ gitSha }}" + repo: "{{repo | default('Not running on CI')}}" tags: - provision-stack - start-node @@ -18,11 +26,16 @@ image: '{{nodeImage}}' instance_type: '{{nodeInstanceType}}' instance_tags: - BuildURL: "{{buildURL | default('Not running on CI') }}" - GitSHA: "{{ gitSha }}" - Kind: "{{nodeLabel}}" - Name: "e2e-{{nodeLabel}}-{{runId}}" - ReaperMark: "e2e-testing-vm" + branch: "{{branch | default('Not running on CI')}}" + build: "{{build | default('Not running on CI')}}" + build_url: "{{buildURL | default('Not running on CI') }}" + created_date: "{{ansible_date_time.epoch}}" + environment: "{{type | default('Not running on CI')}}" + git_sha: "{{ gitSha }}" + kind: "{{nodeLabel}}" + name: "e2e-{{nodeLabel}}-{{runId}}" + reaper_mark: "e2e-testing-vm" + repo: "{{repo | default('Not running on CI')}}" count_tag: Name: "e2e-{{nodeLabel}}-{{runId}}" volumes: diff --git a/.ci/aws-instances-reaper.groovy b/.ci/aws-instances-reaper.groovy index 5732a28147..212f97aba5 100644 --- a/.ci/aws-instances-reaper.groovy +++ b/.ci/aws-instances-reaper.groovy @@ -11,7 +11,7 @@ pipeline { JOB_GIT_CREDENTIALS = "f6c7695a-671e-4f4f-a331-acdce44ff9ba" AWS_PROVISIONER_SECRET = 'secret/observability-team/ci/elastic-observability-aws-account-auth' AWS_DEFAULT_REGION = 'us-east-2' - AWS_EC2_INSTANCES_TAG_NAME= 'ReaperMark' + AWS_EC2_INSTANCES_TAG_NAME= 'reaper_mark' AWS_EC2_INSTANCES_TAG_VALUE= 'e2e-testing-vm' } options {