Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java version in one place #1366

Merged
merged 5 commits into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/algorithm-builder/dockerfile/get-deps-java.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -eo pipefail
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
export javaWrapperVersion='2.0-SNAPSHOT'
export javaWrapperVersion=`cat $SCRIPTPATH/../environments/java/wrapper/version.txt`
mkdir -p $SCRIPTPATH/../environments/java/debs
cd $SCRIPTPATH/../environments/java/debs
docker run --rm --workdir /tmp/pkg -v $SCRIPTPATH/../environments/java/debs:/tmp/pkg\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV PACKAGES_REGISTRY ${PACKAGES_REGISTRY}
COPY ./dockerfile/settings.xml /root/.m2/settings.xml
COPY algorithm_unique_folder/ /hkube/algorithm-runner/algorithm_unique_folder/
RUN cp /hkube/algorithm-runner/algorithm_unique_folder/src/main/resources/settings.xml /root/.m2/settings.xml || true
RUN mvn -q dependency:get -Dartifact=io.hkube:wrapper:${javaWrapperVersion}:jar:wide -Ddest=/hkube/algorithm-runner/wrapper.jar
RUN mvn -q dependency:get -Dartifact=io.hkube:wrapper:${WRAPPER_VERSION}:jar:wide -Ddest=/hkube/algorithm-runner/wrapper.jar
COPY ./runJava.sh /hkube/algorithm-runner/
WORKDIR /hkube/algorithm-runner/algorithm_unique_folder/
RUN mvn -q package
Expand Down
19 changes: 19 additions & 0 deletions core/algorithm-builder/environments/java/dockerfile/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,15 @@ under the License.
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots-stright</id>
<name>snapshots-stright</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

Expand All @@ -230,6 +239,16 @@ under the License.
<releases>
<updatePolicy>never</updatePolicy>
</releases>

</pluginRepository>
<pluginRepository>
<id>snapshots</id>
<name>snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<layout>default</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0-SNAPSHOT
2.0.00-SNAPSHOT
4 changes: 2 additions & 2 deletions core/algorithm-builder/lib/builds/docker-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const wrapperVersions = {
java: {
file: 'version.txt',
parse: (file) => {
return file;
const firstLine = file.split('\n')[0];
return firstLine;
},
override: async (file, version) => {
await fse.writeFile(file, version);
Expand Down Expand Up @@ -402,7 +403,6 @@ const buildAlgorithmImage = async ({ buildMode, env, docker, algorithmName, imag

// docker pull
_createDockerCredsConfig(envs, docker, packages);
_envsHelper(envs, 'javaWrapperVersion', '2.0-SNAPSHOT');
if (buildMode === KANIKO) {
await _createKanikoConfigs(envs, tmpFolder, docker);
}
Expand Down