Skip to content

Commit

Permalink
[ci] Move nightly cleanup task to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Sep 8, 2024
1 parent a9b8850 commit a9aa050
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/aql/wpilib-generic-gradle-cache_unused.aql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files": [
{
"aql": {
"items.find": {
"repo": "wpilib-generic-gradlecache",
"$or":[
{
"stat.downloaded": { "$before":"1mo" }
},
{
"stat.downloaded": { "$eq":null }
}
],
"created": { "$before":"1mo" }
}
}
}
]
}
29 changes: 29 additions & 0 deletions .github/workflows/aql/wpilib-mvn-development_unused.aql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"files": [
{
"aql": {
"items.find": {
"repo": "wpilib-mvn-development",
"path": { "$nmatch":"*edu/wpi/first/thirdparty*" },
"$or":[
{
"artifact.module.build.name": { "$eq":"allwpilib" }
},
{
"artifact.module.build.name": { "$eq":"combiner" }
}
],
"$or":[
{
"stat.downloaded": { "$before":"3mo" }
},
{
"stat.downloaded": { "$eq":null }
}
],
"created": { "$before":"3mo" }
}
}
}
]
}
33 changes: 33 additions & 0 deletions .github/workflows/artifactory-nightly-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Artifactory Nightly Cleanup

on:
workflow_dispatch:
schedule:
- cron: '15 2 * * *'

jobs:
wpilib-mvn-development_unused_cleanup:
runs-on: ubuntu-latest
if: github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: jfrog/setup-jfrog-cli@v4
env:
JF_ENV_1: !! REPLACE ME !!
- name: Cleanup
run: jf rt del --spec=.github/workflows/aql/wpilib-mvn-development_unused.aql

wpilib-generic-gradle-cache_unused_cleanup:
runs-on: ubuntu-latest
if: github.repository_owner == 'wpilibsuite' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: jfrog/setup-jfrog-cli@v4
env:
JF_ENV_1: !! REPLACE ME !!
- name: Cleanup
run: jf rt del --spec=.github/workflows/aql/wpilib-generic-gradle-cache_unused.aql

0 comments on commit a9aa050

Please sign in to comment.