Skip to content

Commit

Permalink
Merge pull request quarkiverse#41 from iocanel/fix-workflow
Browse files Browse the repository at this point in the history
Troubleshoot build-test
  • Loading branch information
iocanel authored Sep 26, 2024
2 parents e1a64d1 + c6bd5bd commit f0a7eea
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and test the plugin
name: CLI integration test

on:
workflow_dispatch:
Expand Down Expand Up @@ -68,6 +68,9 @@ jobs:
alias quarkus="java -jar ${GITHUB_WORKSPACE}/quarkus-cli.jar"
echo "## Create a Quarkus project"
TMP_DIR=$(mktemp -d)
pushd $TMP_DIR
quarkus create app
cd code-with-quarkus
Expand All @@ -76,7 +79,7 @@ jobs:
git config user.email "[email protected]"
git config user.name "Quarkus coder"
git remote add origin git@github.com:quarkiverse/code-with-quarkus.git
git remote add origin https://github.com/quarkiverse/code-with-quarkus.git
git add .
git commit -asm "Initial upload"
Expand All @@ -87,6 +90,10 @@ jobs:
echo "## Compile the quarkus app"
mvn -B install -Dno-format
# Troubleshooting information
ls -al
git log
echo "## Generate the Argo CD application"
quarkus argocd application generate
Expand All @@ -106,4 +113,5 @@ jobs:
echo "## ArgoCD file has not been generated properly !"
cat ".argocd/code-with-quarkus-deploy.yaml"
exit 1
fi
fi
popd
6 changes: 6 additions & 0 deletions cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.concurrent.Callable;
import java.util.function.Consumer;

import io.dekorate.utils.Strings;
import io.quarkiverse.argocd.cli.handlers.GetArgoCDApplicationHandler;
import io.quarkiverse.argocd.cli.utils.Git;
import io.quarkiverse.argocd.spi.ArgoCDApplicationListBuildItem;
Expand All @@ -22,11 +23,15 @@
import io.quarkus.bootstrap.app.QuarkusBootstrap;
import io.quarkus.devtools.project.BuildTool;
import io.quarkus.devtools.project.QuarkusProjectHelper;
import io.quarkus.maven.dependency.ArtifactDependency;
import picocli.CommandLine.ExitCode;
import picocli.CommandLine.Option;

public abstract class GenerationBaseCommand extends ApplicationBaseCommand implements Callable<Integer> {

private static final ArtifactDependency QUARKUS_ARGOCD = new ArtifactDependency("io.quarkiverse.argocd", "quarkus-argocd",
null, "jar", GenerationBaseCommand.getVersion());

@Option(names = { "-n", "--namespace" }, description = "The target namespace")
Optional<String> namespace = Optional.empty();

Expand Down Expand Up @@ -68,9 +73,12 @@ public Integer call() {
.setApplicationRoot(getWorkingDirectory())
.setProjectRoot(getWorkingDirectory())
.setTargetDirectory(targetDirecotry)
.setLocalProjectDiscovery(true)
.setIsolateDeployment(false)
.setRebuild(true)
.setLocalProjectDiscovery(true)
.setBaseClassLoader(ClassLoader.getSystemClassLoader())
.setForcedDependencies(List.of(QUARKUS_ARGOCD))
.setDependencyInfoProvider(null)
.build();

List<String> resultBuildItemFQCNs = new ArrayList<>();
Expand Down Expand Up @@ -112,4 +120,8 @@ protected void writeStringSafe(Path p, String content) {
protected Path getWorkingDirectory() {
return Paths.get(System.getProperty("user.dir"));
}

private static String getVersion() {
return Strings.read(GenerationBaseCommand.class.getClassLoader().getResourceAsStream("version"));
}
}
1 change: 1 addition & 0 deletions cli/src/main/resources/version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
${project.version}
3 changes: 3 additions & 0 deletions deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-AlegacyConfigRoot=true</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.version>3.12.2</quarkus.version>
<quarkus.version>3.14.4</quarkus.version>
<sundrio.version>0.103.1</sundrio.version>
<lombok.version>1.18.26</lombok.version>
<kubernetes-client.version>6.13.1</kubernetes-client.version>
Expand Down

0 comments on commit f0a7eea

Please sign in to comment.