Skip to content

Commit d0ef77d

Browse files
authored
Merge pull request #341 from hubblo-org/dev
Preparing v1.0
2 parents 5525c68 + c43d72b commit d0ef77d

File tree

93 files changed

+6920
-6052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+6920
-6052
lines changed

.github/workflows/bloat-test.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
- 'CITATION'
1111
- 'book.toml'
1212
- 'CONTRIBUTING.md'
13+
- '.github/workflows/exe-release-prometheuspush.yml'
14+
- '*.md'
15+
- 'oranda.json'
1316
pull_request:
1417
branches: [ main, dev ]
1518
paths-ignore:
@@ -18,12 +21,16 @@ on:
1821
- 'CHANGELOG.md'
1922
- 'CITATION'
2023
- 'book.toml'
24+
- '.github/workflows/exe-release-prometheuspush.yml'
25+
- '*.md'
26+
- 'oranda.json'
2127

2228
env:
2329
CARGO_TERM_COLOR: always
24-
AWX_PUBLIC_ACCESS: "{Xs%g5/a/Si=;_[4LL"
25-
AWX_PUBLIC_USER: "scaphandre-public"
26-
AWX_HOST: "https://cd.hubblo.org"
30+
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
2734

2835
jobs:
2936
check_pr_is_on_the_right_branch:
@@ -41,34 +48,33 @@ jobs:
4148
runs-on: ubuntu-latest
4249
needs: check_pr_is_on_the_right_branch
4350
steps:
44-
- name: Cancel Previous Runs
45-
uses: ambimax/action-cancel-previous-runs@v1
4651
- name: Checkout repository
47-
uses: actions/checkout@v2
52+
uses: actions/checkout@v3
4853
- name: Install Rust
49-
uses: actions-rs/toolchain@v1
54+
uses: bpetit/action-toolchain@v2.0.0
5055
with:
5156
toolchain: stable
5257
profile: minimal
5358
override: true
5459
components: rustfmt
5560
- name: Check formatting
56-
uses: actions-rs/cargo@v1
61+
uses: bpetit/action-cargo@v2.0.1
5762
with:
5863
command: fmt
5964
args: --all -- --check
6065
- name: Clippy Check
61-
uses: actions-rs/cargo@v1
66+
uses: bpetit/action-cargo@v2.0.1
6267
with:
6368
command: clippy
6469
args: -- -A clippy::upper_case_acronyms -D warnings
70+
6571
fmt_and_clippy_windows:
6672
name: Cargo Fmt and Clippy - Windows
6773
runs-on: windows-latest
68-
needs: fmt_and_clippy_linux
74+
needs: check_pr_is_on_the_right_branch
6975
steps:
7076
- name: Checkout
71-
uses: actions/checkout@v2
77+
uses: actions/checkout@v3
7278
- name: Install Rustup
7379
uses: crazy-max/ghaction-chocolatey@v2
7480
with:
@@ -77,86 +83,101 @@ jobs:
7783
run: |
7884
rustup toolchain install stable-x86_64-pc-windows-msvc
7985
- name: Check formatting
80-
uses: actions-rs/cargo@v1
86+
uses: bpetit/action-cargo@v2.0.1
8187
with:
8288
command: fmt
8389
args: --all -- --check
8490
- name: Clippy Check
85-
uses: actions-rs/cargo@v1
91+
uses: bpetit/action-cargo@v2.0.1
8692
with:
8793
command : clippy
88-
args: --no-default-features --features "prometheus json riemann"
94+
args: --no-default-features --features "prometheus json riemann warpten"
8995

9096
test_linux_x86_64:
9197
name: Test on GNU/Linux x86_64 (Bare metal worker)
9298
runs-on: ubuntu-latest
93-
needs: fmt_and_clippy_linux
9499
steps:
95100
- name: Install dependencies (awxkit)
96-
uses: actions/setup-python@v2
101+
uses: actions/setup-python@v3
97102
with:
98-
python-version: '3.x'
103+
python-version: '3.11'
99104
- name: Install python requirements (awxkit)
100105
run: |
101106
python -m pip install --upgrade pip
102-
pip install awxkit
107+
pip install awxkit setuptools
103108
- name: Log on AWX
104109
id: login
105110
run: |
106-
export AWX_TOKEN=$(awx --conf.host "${{env.AWX_HOST}}" --conf.username "${{env.AWX_PUBLIC_USER}}" --conf.password "${{env.AWX_PUBLIC_ACCESS}}" login | jq .token | tr -d '"')
107-
echo "::set-output name=awx_token::${AWX_TOKEN}"
111+
export AWX_TOKEN=$(awx --conf.host "${{ secrets.AWX_HOST }}" --conf.username "${{ secrets.AWX_PUBLIC_USER }}" --conf.password "${{ secrets.AWX_PASSWORD }}" login | jq .token | tr -d '"')
112+
echo "awx_token=${AWX_TOKEN}" >> $GITHUB_OUTPUT
108113
- name: Prepare Rust environment on bare metal worker
109114
id: rust
110115
run: |
111-
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"$GITHUB_REPOSITORY\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 12 --monitor
116+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"$GITHUB_REPOSITORY\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 12 --monitor
112117
- name: Clone Scaphandre repository
113118
id: clone
114119
run: |
115-
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 13 --monitor
120+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 13 --monitor
116121
- name: Run Unit Tests
117122
id: unittests
118123
run: |
119-
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 14 --monitor
124+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 14 --monitor
120125
build_linux_x86_64:
121126
name: Build on GNU/Linux x86_64 (Bare metal worker)
122127
runs-on: ubuntu-latest
123-
needs: test_linux_x86_64
128+
needs:
129+
- fmt_and_clippy_linux
130+
- test_linux_x86_64
124131
steps:
125132
- name: Install dependencies (awxkit)
126-
uses: actions/setup-python@v2
133+
uses: actions/setup-python@v3
127134
with:
128-
python-version: '3.x'
135+
python-version: '3.11'
129136
- name: Install python requirements (awxkit)
130137
run: |
131138
python -m pip install --upgrade pip
132139
pip install awxkit
133140
- name: Log on AWX
134141
id: login
135142
run: |
136-
export AWX_TOKEN=$(awx --conf.host "${{env.AWX_HOST}}" --conf.username "${{env.AWX_PUBLIC_USER}}" --conf.password "${{env.AWX_PUBLIC_ACCESS}}" login | jq .token | tr -d '"')
137-
echo "::set-output name=awx_token::${AWX_TOKEN}"
143+
export AWX_TOKEN=$(awx --conf.host "${{ secrets.AWX_HOST }}" --conf.username "${{ secrets.AWX_PUBLIC_USER }}" --conf.password "${{ secrets.AWX_PASSWORD }}" login | jq .token | tr -d '"')
144+
echo "awx_token=${AWX_TOKEN}" >> $GITHUB_OUTPUT
145+
- name: Build debug version
146+
id: builddebug
147+
run: |
148+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 17 --monitor
149+
- name: Test JSON exporter
150+
id: jsonexporter
151+
run: |
152+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 18 --monitor
138153
- name: Build Docker image
139154
id: dockerbuild
140155
run: |
141-
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 15 --monitor
156+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 15 --monitor
142157
- name: Test Scaphandre + Prometheus in docker-compose
143158
id: promtest
144159
run: |
145-
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 16 --monitor
160+
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ secrets.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 16 --monitor
146161
test_windows_x86_64:
147162
name: Test on Windows x86_64 (Virtual machine worker)
148-
runs-on: "windows-2019"
149-
needs: fmt_and_clippy_windows
163+
runs-on: "windows-latest"
150164
steps:
151165
- name: Checkout
152-
uses: actions/checkout@v2
166+
uses: actions/checkout@v3
167+
- name: Install openssl for Windows with vcpkg
168+
run: |
169+
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
170+
vcpkg install openssl:x64-windows-static-md
153171
- name: Install Rustup
154172
uses: crazy-max/ghaction-chocolatey@v2
155173
with:
156174
args: install rustup.install --ignore-checksums
157175
- name: Install Rust toolchain
158176
run: |
159177
rustup toolchain install stable-x86_64-pc-windows-msvc
178+
- name: Tests
179+
run: |
180+
cargo test --no-default-features --features "prometheus prometheuspush json riemann" exporters
160181
- name: Build (debug mode)
161182
run: |
162-
cargo build --no-default-features --features "prometheus json riemann"
183+
cargo build --no-default-features --features "prometheus prometheuspush json riemann"

.github/workflows/codesee-arch-diagram.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)