Skip to content
Snippets Groups Projects
Commit b44b5950 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

Merge branch 'main' into release

parents a28ec34f 51b78041
No related branches found
No related tags found
1 merge request!35build: New dummy version for testing the pipeline
Pipeline #3602 passed
......@@ -40,7 +40,7 @@ build-for-staging:
script:
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests"
tags:
- vips-java
- java
artifacts:
paths:
- target/*.war
......@@ -90,7 +90,7 @@ build-for-production:
- echo "Build war file with version '$RELEASE_VERSION'"
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS package -DskipTests"
tags:
- vips-java
- java
artifacts:
paths:
- target/*.war
......@@ -102,7 +102,7 @@ test:
script:
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS test"
tags:
- vips-java
- java
rules:
- if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH
- if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH
......@@ -140,7 +140,7 @@ deploy-to-staging:
after_script:
- echo "Deployment complete"
tags:
- vips-java
- java
rules:
- if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH
environment:
......@@ -156,7 +156,7 @@ upload-snapshot:
fi
- "./mvnw $MAVEN_POM_WITH_MODELS $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests"
tags:
- vips-java
- java
rules:
- if: $CI_COMMIT_REF_NAME == $MAIN_BRANCH
......@@ -193,7 +193,7 @@ deploy-to-production:
after_script:
- echo "Deployment complete"
tags:
- vips-java
- java
rules:
- if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH
environment:
......@@ -242,6 +242,6 @@ upload-and-tag-release:
- git commit -m "[ci skip] Set snapshot version ${SNAPSHOT_VERSION}"
- git push origin $MAIN_BRANCH
tags:
- vips-java
- java
rules:
- if: $CI_COMMIT_REF_NAME == $RELEASE_BRANCH
......@@ -59,16 +59,16 @@ if response.status_code == 200:
models = {}
model_prefixes = ["no/nibio/vips/model","fi/luke/vips/model"]
model_prefixes = ["no/nibio/vips/model", "fi/luke/vips/model"]
# Filter models and store only the most recent version (highest alphanumeric number)
for package in all_packages:
for model_prefix in model_prefixes:
if package["name"].find(model_prefix) >=0 and ((snapshot and package["version"].find("SNAPSHOT")>=0) or (not snapshot and package["version"].find("SNAPSHOT")<0)):
if package["name"].find(model_prefix) >= 0 and ((snapshot and package["version"].find("SNAPSHOT") >= 0) or (not snapshot and package["version"].find("SNAPSHOT") < 0)):
model_name = package["name"][len(model_prefix) + 1:]
if models.get(model_name, None) == None:
if models.get(model_name, None) is None:
models[model_name] = {}
models[model_name]["groupId"] = model_prefix.replace("/",".")
models[model_name]["groupId"] = model_prefix.replace("/", ".")
models[model_name]["version"] = package["version"]
else:
models[model_name]["version"] = package["version"] if package["version"] > models[model_name]["version"] else models[model_name]["version"]
......@@ -77,11 +77,11 @@ for package in all_packages:
dependencies = ET.Element("dependencies")
for model_name, value in models.items():
dependency = ET.SubElement(dependencies, "dependency")
ET.SubElement(dependency,"groupId").text = value["groupId"]
ET.SubElement(dependency, "groupId").text = value["groupId"]
ET.SubElement(dependency, "artifactId").text = model_name
ET.SubElement(dependency, "version").text = value["version"]
# Dumps the indented XML to stdout
tree = ET.ElementTree(dependencies)
ET.indent(tree, space="\t",level=0)
ET.indent(tree, space="\t", level=0)
ET.dump(tree)
#!/usr/bin/python3
'''
Merges pom.xml and models.xml (default) into pom_with_models.xml and
runs mvn clean install -f pom_with_models.xml
Merges pom.xml and models.xml (default) into pom_with_models.xml
Copyright (C) 2023 NIBIO
......@@ -49,6 +48,6 @@ for dep in model_dep_elements:
pom_deps_element.appendChild(dep)
# Write the modified pom dom to file
pom_with_models_file = open(merged_pom_filename,"w")
pom_with_models_file = open(merged_pom_filename, "w")
pom_dom.writexml(pom_with_models_file)
pom_with_models_file.close()
......@@ -49,7 +49,7 @@ for dep in model_dep_elements:
pom_deps_element.appendChild(dep)
# Write the modified pom dom to file
pom_with_models_file = open(merged_pom_filename,"w")
pom_with_models_file = open(merged_pom_filename, "w")
pom_dom.writexml(pom_with_models_file)
pom_with_models_file.close()
......
......@@ -2,111 +2,111 @@
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>RoughageNutritionModel</artifactId>
<version>1.1.7</version>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>AlternariaModel</artifactId>
<version>1.1.6</version>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>BarleyNetBlotchModel</artifactId>
<version>1.1.5</version>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>AppleScabModel</artifactId>
<version>1.1.5</version>
<groupId>fi.luke.vips.model</groupId>
<artifactId>FinnCerealModels</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>DeliaRadicumModel</artifactId>
<version>1.1.5</version>
<artifactId>SeptoriaHumidityModel</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>DeliaRadicumFloralisObservationModel</artifactId>
<version>1.1.5</version>
<artifactId>Model_LEAFBLOTCH</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>BremiaLactucaeModel</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>fi.luke.vips.model</groupId>
<artifactId>FinnCerealModels</artifactId>
<version>1.1.5</version>
<artifactId>AppleScabModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>DOWNCASTModel</artifactId>
<version>1.1.5</version>
<artifactId>BremiaLactucaeModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>LygusRugulipennisModel</artifactId>
<version>1.1.5</version>
<artifactId>DeliaRadicumModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>GrassDryingModel</artifactId>
<version>1.1.5</version>
<artifactId>DeliaRadicumFloralisObservationModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>Model_LEAFBLOTCH</artifactId>
<version>1.1.5</version>
<artifactId>DOWNCASTModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>NaerstadModel</artifactId>
<version>1.1.5</version>
<artifactId>GrassDryingModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>MamestraBrassicaeModel</artifactId>
<version>1.1.5</version>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>Model_MAIZEPHENO</artifactId>
<version>1.1.5</version>
<artifactId>LygusRugulipennisModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>OatFloweringModel</artifactId>
<version>1.1.5</version>
<artifactId>NaerstadModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>NegativePrognosisModel</artifactId>
<version>1.1.5</version>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>PsilaRosaeObservationModel</artifactId>
<version>1.1.5</version>
<artifactId>OatFloweringModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>PsilaRosaeTempModel</artifactId>
<version>1.1.5</version>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>SeptoriaHumidityModel</artifactId>
<version>1.1.5</version>
<artifactId>Model_MAIZEPHENO</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>PsilaRosaeObservationModel</artifactId>
<version>1.1.7</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>SeptoriaReferenceHumidityModel</artifactId>
<version>1.1.5</version>
<version>1.1.6</version>
</dependency>
<dependency>
<groupId>no.nibio.vips.model</groupId>
<artifactId>SeptoriaApiicolaModel</artifactId>
<version>1.1.4</version>
<version>1.1.6</version>
</dependency>
</dependencies>
......@@ -4,12 +4,12 @@
<parent>
<groupId>no.nibio.vips</groupId>
<artifactId>vips-parent-pom</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
</parent>
<groupId>no.nibio</groupId>
<artifactId>VIPSCore</artifactId>
<packaging>war</packaging>
<version>2.0.6</version>
<version>2.0.7-SNAPSHOT</version>
<name>VIPSCore</name>
<url>http://maven.apache.org</url>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment