-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more schecule options for tasks (#215)
* Allow a task to be scheduled for manual, once, hourly, daily, weekly, monthly or cron execution. * Bump nexus version to 3.19.1-01 in pom.xml file * Allow to enable or disable tasks * Link to scheduled new tasks configuration doc in wiki
- Loading branch information
1 parent
7652607
commit 14cd6d4
Showing
4 changed files
with
148 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,8 +153,9 @@ nexus_repos_apt_proxy: | |
negative_cache_ttl: 60 | ||
|
||
nexus_scheduled_tasks: | ||
# Example task to purge maven snapshots | ||
- name: Purge-maven-snapshots | ||
# Example task to purge maven snapshots with cron schedule | ||
- name: Purge maven snapshots | ||
schedule_type: cron | ||
cron: '0 50 23 * * ?' | ||
typeId: repository.maven.remove-snapshots | ||
task_alert_email: [email protected] # optional | ||
|
@@ -165,6 +166,61 @@ nexus_scheduled_tasks: | |
gracePeriodInDays: "2" | ||
booleanTaskProperties: | ||
removeIfReleased: true | ||
# Example task to run manually, now, once, daily, and hourly | ||
- name: Purge unused maven snapshots manual | ||
schedule_type: manual | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "1" | ||
- name: Purge-unused-maven-snapshots-now | ||
schedule_type: now | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "2" | ||
- name: Purge-unused-maven-snapshots-once | ||
schedule_type: once | ||
start_date_time: "2050-02-02T00:01:02" | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "3" | ||
- name: Purge-unused-maven-snapshots-monthly | ||
schedule_type: monthly | ||
start_date_time: "2050-03-03T00:01:02" | ||
monthly_days: | ||
- 1 | ||
- 15 | ||
- 999 # Last day of month | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "4" | ||
- name: Purge-unused-maven-snapshots-weekly | ||
schedule_type: weekly | ||
start_date_time: "2050-04-04T00:01:02" | ||
weekly_days: | ||
- MON | ||
- WED | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "5" | ||
- name: Purge-unused-maven-snapshots-daily | ||
schedule_type: daily | ||
start_date_time: "2050-05-05T00:01:02" | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "6" | ||
- name: Purge-unused-maven-snapshots-hourly | ||
schedule_type: hourly | ||
start_date_time: "2050-06-06T00:01:02" | ||
typeId: repository.maven.purge-unused-snapshots | ||
taskProperties: | ||
repositoryName: "*" | ||
lastUsed: "7" | ||
|
||
nexus_local_users: | ||
- username: jenkins | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters