Skip to content

Commit

Permalink
updating scripts & docs
Browse files Browse the repository at this point in the history
  • Loading branch information
okankoAMZ committed Sep 21, 2023
1 parent 93a97db commit efdf8ca
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packaging/uniformBuild/docs/components/CWA-RPM.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: RPMBuild
description: RPM build package download
schemaVersion: 1.0

phases:
- name: build
steps:
- name: UpdateAptRepo
action: ExecuteBash
inputs:
commands:
- add-apt-repository -y 'deb http://security.ubuntu.com/ubuntu xenial-security main'
- name: InstallRPMBuild
action: ExecuteBash
inputs:
commands:
- apt-get install -y rpm

- name: validate
steps:
- name: Check_rpm_build_version
action: ExecuteBash
inputs:
commands:
- rpmbuild --version
29 changes: 29 additions & 0 deletions packaging/uniformBuild/scripts/actions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import requests

OWNER ="aws"
REPO = "amazon-cloudwatch-agent"
GITHUB_API = f"https://api.github.com/repos/{OWNER}/{REPO}/actions"
id = "6202732096"
GITHUB_API_RUN = GITHUB_API + f"/runs/{id}"
GITHUB_API_JOB = GITHUB_API_RUN + "/jobs?per_page=100"
data = requests.get(GITHUB_API_RUN).json()
print(data)
print(data['status'],data['conclusion'])
if data.get('conclusion') =='failure':
jobs = []
for page in range(3):
jobdata = requests.get(GITHUB_API_JOB+f"&page={page}").json()
jobs += jobdata.get('jobs')
print(len(jobs))
failed = []
job_ids = []
for job in jobs:
id = job.get('id')
if id in job_ids:
continue
# print(job.get("name"),job.get("conclusion"))
if job.get("conclusion") == 'failure':
failed.append(job.get("name"))
# print(job.get("name"),"failed")
job_ids.append(id)
print(len(failed),"\n".join(failed))
22 changes: 22 additions & 0 deletions packaging/uniformBuild/scripts/allowlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"testname": "Stress",
"why":"Result of the stress test does not impact the release",
"general-ignore": true
},
{
"testname": "Performance",
"why":"Result of the performance test does not impact the release",
"general-ignore": true
},
{
"testname":"EC2Linux / Test (./test/metric_value_benchmark, ol8, linux, ec2_linux, amd64, t3a.medium, cloudwatch-agent-i...",
"why":"Faulty test",
"general-ignore": false
},
{
"testname":"ol7",
"why":"Missing ami, test is not working properly",
"general-ignore": true
}
]

0 comments on commit efdf8ca

Please sign in to comment.