-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpackage-cloud-download-schedule.yml
More file actions
53 lines (45 loc) · 1.67 KB
/
package-cloud-download-schedule.yml
File metadata and controls
53 lines (45 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Package Cloud Download Schedule
env:
DB_USER_NAME: ${{ secrets.STATS_DB_USER_NAME }}
DB_PASSWORD: ${{ secrets.STATS_DB_PASSWORD }}
DB_HOST_AND_PORT: ${{ secrets.STATS_DB_HOST_AND_PORT }}
DB_NAME: ${{ secrets.STATS_DB_NAME }}
PACKAGE_CLOUD_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_API_TOKEN }}
PACKAGE_CLOUD_ADMIN_API_TOKEN: ${{ secrets.PACKAGE_CLOUD_ADMIN_API_TOKEN }}
on:
schedule:
- cron: "30 0 * * *"
push:
branches:
- "**"
workflow_dispatch:
jobs:
statistics_fetch:
name: Fetch Statistics
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
parallel_index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
repo: [community, enterprise]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install package dependencies
run: sudo apt-get update && sudo apt-get install libcurl4-openssl-dev libssl-dev
- name: Install python requirements
run: python -m pip install -r packaging_automation/requirements.txt
- name: Execute 'Package Cloud Statistics Collector'
run: |
python -m packaging_automation.package_cloud_statistics_collector \
--organization citusdata \
--repo_name ${{ matrix.repo }} \
--db_user_name ${DB_USER_NAME} \
--db_password ${DB_PASSWORD} \
--db_host_and_port ${DB_HOST_AND_PORT} \
--db_name ${DB_NAME} \
--package_cloud_api_token ${PACKAGE_CLOUD_API_TOKEN} \
--package_cloud_admin_api_token ${PACKAGE_CLOUD_ADMIN_API_TOKEN} \
--parallel_count 10 \
--parallel_exec_index ${{ matrix.parallel_index }} \
--page_record_count 100