Skip to content

Commit

Permalink
Fix Failing Post Build Action (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea authored May 29, 2024
1 parent 700bc4f commit 7322e1c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jfrog.bamboo</groupId>
<artifactId>bamboo-jfrog-plugin</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>

<organization>
<name>JFrog Ltd</name>
Expand All @@ -30,7 +30,7 @@
<packaging>atlassian-plugin</packaging>

<properties>
<bamboo.version>9.3.3</bamboo.version>
<bamboo.version>9.6.2</bamboo.version>
<bamboo.data.version>${bamboo.version}</bamboo.data.version>
<amps.version>8.11.4</amps.version>
<atlassian.spring.scanner.version>3.0.3</atlassian.spring.scanner.version>
Expand All @@ -41,7 +41,7 @@
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<!-- https://mvnrepository.com/artifact/org.jfrog.buildinfo/build-info-extractor -->
<buildinfo.version>2.41.6</buildinfo.version>
<buildinfo.version>2.41.16</buildinfo.version>
</properties>

<profiles>
Expand Down Expand Up @@ -106,7 +106,7 @@
<dependency>
<groupId>org.jfrog.artifactory.client</groupId>
<artifactId>artifactory-java-client-api</artifactId>
<version>2.14.0</version>
<version>2.17.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.jfrog.bamboo;

import com.atlassian.bamboo.build.CustomPostBuildCompletedAction;
import com.atlassian.bamboo.build.CustomBuildProcessor;
import com.atlassian.bamboo.v2.build.BuildContext;
import com.atlassian.bamboo.variable.CustomVariableContext;
import org.codehaus.plexus.util.FileUtils;
Expand All @@ -9,7 +9,12 @@

import java.io.IOException;

public class PostBuildAction implements CustomPostBuildCompletedAction {
/**
* Post-build action that deletes the temporary JFrog build directory,
* executed on the agent side (remote or local) to make sure we have
* access to the temp folder we created.
*/
public class AgentBuildProcessor implements CustomBuildProcessor {
private BuildContext buildContext;
private CustomVariableContext customVariableContext;

Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/atlassian-plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
<resource type="download" name="icon" location="/images/jfrogLogo.png"/>
</taskType>

<postBuildCompletedAction
key="PostBuildAction"
class="org.jfrog.bamboo.PostBuildAction">
<!-- buildProcessor Occurs on the Agent (both local and remote) after the builder has run. -->
<buildProcessor
key="AgentPostBuildAction"
class="org.jfrog.bamboo.AgentBuildProcessor">
<description>Cleans up the temporary JFrog directory when the build is completed</description>
</postBuildCompletedAction>
</buildProcessor>

<!-- Admin Configurations -->
<component name="JFrog Server Configuration Management Component" key="jfrogServerConfigManager"
Expand Down

0 comments on commit 7322e1c

Please sign in to comment.