<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:27:24 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[FOLIO-3344] Clean up Jenkins workspaces after scratch environment build jobs</title>
                <link>https://folio-org.atlassian.net/browse/FOLIO-3344</link>
                <project id="10290" key="FOLIO">FOLIO</project>
                    <description>&lt;p&gt;Several jobs in the Jenkins &quot;Scratch (Rancher) environment&quot; folder are not cleaning up their workspaces after the job is run which results in disk filling up on the Jenkins server.  These jobs include the manage-scratch-environment job and it&apos;s associated variations (1.1, 1.2, Firebird manage scratch env, etc).     A clean up of the workspace should be performed whether the job was successful, failed, or terminated.   A step similar to the following should be added to these Jenkins pipeline jobs:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt; finally {
   stage(&apos;Clean&apos;) {
      cleanWs disableDeferredWipeout: true, deleteDirs: true, cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenSuccess: true 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="82242">FOLIO-3344</key>
            <summary>Clean up Jenkins workspaces after scratch environment build jobs</summary>
                <type id="10003" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium">Task</type>
                                            <priority id="10005" iconUrl="https://dev.folio.org/assets/jira-priority/tbd.svg">TBD</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10003">Done</resolution>
                                                        <assignee accountid="712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf">Hleb Surnovich</assignee>
                                                                <reporter accountid="5f9abc1eb45b2e007453f423">John Malconian</reporter>
                                    <labels>
                    </labels>
                <created>Mon, 15 Nov 2021 15:53:07 +0000</created>
                <updated>Thu, 18 Nov 2021 13:02:41 +0000</updated>
                            <resolved>Thu, 18 Nov 2021 13:02:41 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                <comments>
                                                            <comment id="196914" author="712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf" created="Wed, 17 Nov 2021 05:56:07 +0000"  >&lt;p&gt;Hello, &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5f9abc1eb45b2e007453f423&quot; class=&quot;user-hover&quot; rel=&quot;5f9abc1eb45b2e007453f423&quot; data-account-id=&quot;5f9abc1eb45b2e007453f423&quot; accountid=&quot;5f9abc1eb45b2e007453f423&quot; rel=&quot;noreferrer&quot;&gt;John Malconian&lt;/a&gt; ! I took this ticket and tried to apply cleaning with CleanWS, as you mentioned above.&lt;br/&gt;
 But I&apos;ve encountered a problem: some of terraform temp files are created with root privileges, hence root is the owner &#8211; and jenkins can not delete them:&lt;br/&gt;
 &#160;&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;/rest/api/3/attachment/content/64413&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;br/&gt;
 &lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;/rest/api/3/attachment/content/64414&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;br/&gt;
 &#160;&lt;br/&gt;
 For now I can see the following solution:&#160;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;give Jenkins user sudo privileges&lt;/li&gt;
	&lt;li&gt;add sh&apos; &apos; command wiith chown/chgrp&lt;/li&gt;
	&lt;li&gt;delete those files with ws clean plugin the way it was&lt;/li&gt;
	&lt;li&gt;But I&apos;m not sure, if it&apos;s allowed to give jenkins sudo rights&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;cc: &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3A120c128f-75c5-46ef-96df-d1ae8e8a33b0&quot; class=&quot;user-hover&quot; rel=&quot;712020:120c128f-75c5-46ef-96df-d1ae8e8a33b0&quot; data-account-id=&quot;712020:120c128f-75c5-46ef-96df-d1ae8e8a33b0&quot; accountid=&quot;712020:120c128f-75c5-46ef-96df-d1ae8e8a33b0&quot; rel=&quot;noreferrer&quot;&gt;Aliaksei Luhavy&lt;/a&gt;, &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A36e21151-23a8-42ed-9b05-9a4ee808168d&quot; class=&quot;user-hover&quot; rel=&quot;557058:36e21151-23a8-42ed-9b05-9a4ee808168d&quot; data-account-id=&quot;557058:36e21151-23a8-42ed-9b05-9a4ee808168d&quot; accountid=&quot;557058:36e21151-23a8-42ed-9b05-9a4ee808168d&quot; rel=&quot;noreferrer&quot;&gt;Aleh Litasau&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="196919" author="5f9abc1eb45b2e007453f423" created="Wed, 17 Nov 2021 17:38:31 +0000"  >&lt;p&gt;Thanks for taking a look at this &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=712020%3Af3088ade-db74-499a-8e6f-5c8d4eb6f5bf&quot; class=&quot;user-hover&quot; rel=&quot;712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf&quot; data-account-id=&quot;712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf&quot; accountid=&quot;712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf&quot; rel=&quot;noreferrer&quot;&gt;Hleb Surnovich&lt;/a&gt;.    I ended up just adding a cron job on the server that will clean up these files.   It run&apos;s once per day.   I think that should be ok for now.   Feel free to close this issue.    In general,  I think it would preferable to run these jobs inside a Docker container like we do for most other jobs.   That way,  when the job is complete, the Jenkins workspace environment is automatically deleted.   On the other hand,  if you are using Terraform in these jobs I&apos;m guessing that you have Terraform state files that need to persist and that may prohibit the use of a container.  If so,  persisting them to an S3 bucket might be an option instead of on the local filesystem.   Just something to think about.  &lt;/p&gt;</comment>
                                                            <comment id="196923" author="61e1a06fe67ea2006b5b23af" created="Thu, 18 Nov 2021 13:02:41 +0000"  >&lt;p&gt;Closed as&#160;solution is provided by &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5f9abc1eb45b2e007453f423&quot; class=&quot;user-hover&quot; rel=&quot;5f9abc1eb45b2e007453f423&quot; data-account-id=&quot;5f9abc1eb45b2e007453f423&quot; accountid=&quot;5f9abc1eb45b2e007453f423&quot; rel=&quot;noreferrer&quot;&gt;John Malconian&lt;/a&gt;.&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="64413" name="image (1).png" size="14849" author="712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf" created="Wed, 17 Nov 2021 05:53:41 +0000"/>
                            <attachment id="64414" name="image.png" size="12585" author="712020:f3088ade-db74-499a-8e6f-5c8d4eb6f5bf" created="Wed, 17 Nov 2021 05:53:41 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10155"><![CDATA[FOLIO DevOps]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10063" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>PO Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i03orb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="284">DevOps Sprint 127</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 17 Nov 2021 05:56:07 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>