How to create a persistent file with key/value pairs (properties) that other jobs can use?

16 views
Skip to first unread message

ZillaYT

unread,
Feb 15, 2019, 2:31:05 PM2/15/19
to Jenkins Users
I'm working on a process where we create AWS artifacts (Fargate services) needed on a per-feature basis. I want to be able to create these artifacts, and then after a certain expiry period, delete them. So I want a job that will create/modify a properties file that looks like this. As features are added, I want to be able to add a line in the file.

Branch                                   Created
------------------------------------------------------
feature-dev-1234-blah-blah . 2018-02-14
feature-dev-2345-blah-blah . 2018-02-15

Let's say the expiry period is 3 days.

So I want a job that runs daily that will look at properties file created above, and if expiry period is met, will delete the artifacts for that feature. So on 2018-20-17, the feature-dev-1234-blah-blah artifacts will be deleted, and on 2018-02-18, the feature-dev-2345-blah-blah artifacts will be deleted. As artifacts are deleted, I'll need to modify the data and remove the corresponding feature/date key/value pair from the data.

What mechanism can I use to store this persistent data? I don't want to use a DB since this will be overkill.

Thanks!
Chris

ZillaYT

unread,
Feb 15, 2019, 4:11:32 PM2/15/19
to Jenkins Users
I found the Config File Provider Plugin that looks promising. However it doesn't tell you how to edit/modify the file? How do I edit it via pipeline?
Reply all
Reply to author
Forward
0 new messages