Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Model_MAMESTRABR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
Models
Java
Model_MAMESTRABR
Commits
4eefc758
Commit
4eefc758
authored
1 year ago
by
Lene Wasskog
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into release
parents
aa0a7160
861ce3f9
No related branches found
No related tags found
No related merge requests found
Pipeline
#2006
passed
1 year ago
Stage: build
Stage: test
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+4
-77
4 additions, 77 deletions
.gitlab-ci.yml
README.md
+12
-0
12 additions, 0 deletions
README.md
ci_settings.xml
+0
-16
0 additions, 16 deletions
ci_settings.xml
pom.xml
+4
-10
4 additions, 10 deletions
pom.xml
with
20 additions
and
103 deletions
.gitlab-ci.yml
+
4
−
77
View file @
4eefc758
image
:
openjdk:11-jdk
stages
:
-
build
-
test
-
deploy
variables
:
MAVEN_CLI_OPTS
:
"
-s
ci_settings.xml
--batch-mode"
MAVEN_OPTS
:
"
-Dmaven.repo.local=.m2/repository
-Dmaven.artifact.threads=10"
MAIN_BRANCH
:
"
main"
RELEASE_BRANCH
:
"
release"
cache
:
paths
:
-
.m2/repository/
build
:
stage
:
build
script
:
-
./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS package
tags
:
-
vips-java
test
:
stage
:
test
script
:
-
./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS test
tags
:
-
vips-java
deploy-snapshot
:
stage
:
deploy
script
:
-
./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests
tags
:
-
vips-java
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
$MAIN_BRANCH'
deploy-release
:
stage
:
deploy
script
:
# For debugging git interaction
#- export GIT_TRACING=2
#- export GIT_CURL_VERBOSE=1
-
git config --global user.name "${GITLAB_USER_NAME}"
-
git config --global user.email "${GITLAB_USER_EMAIL}"
# Use access token given by CI/CD variable ACCESS_TOKEN to authenticate
-
export NEW_REPO_URL=https://root:$ACCESS_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git
-
git remote set-url --push origin $NEW_REPO_URL
-
git fetch origin --prune --prune-tags
# Checkout release branch, set release version and deploy. Commit, tag and push.
-
git checkout $RELEASE_BRANCH
-
git status
-
git reset --hard origin/$RELEASE_BRANCH
-
./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS validate -DremoveSnapshot
-
./mvnw $MAVEN_CLI_OPTS $MAVEN_OPTS deploy -DskipTests
-
export RELEASE_VERSION=$(./mvnw --batch-mode --no-transfer-progress --non-recursive help:evaluate -Dexpression=project.version | grep -v "\[.*")
-
export RELEASE_TAG="v${RELEASE_VERSION}"
-
git add pom.xml
-
git commit -m "[ci skip] Set release version ${RELEASE_VERSION}"
-
git tag -a $RELEASE_TAG -m "Tag release ${RELEASE_TAG}"
-
git push origin $RELEASE_TAG
-
git push origin $RELEASE_BRANCH
# Checkout main branch, merge release branch. Push commit.
-
git fetch
-
git checkout $MAIN_BRANCH
-
git reset --hard origin/$MAIN_BRANCH
-
git merge -m "[ci skip] Merge ${RELEASE_BRANCH}" --no-ff $RELEASE_BRANCH
-
git push origin $MAIN_BRANCH
tags
:
-
vips-java
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
$RELEASE_BRANCH'
include
:
-
project
:
'
VIPS/vips-common-config'
file
:
'
/gitlab-ci-vips-models.yml'
ref
:
main
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
12
−
0
View file @
4eefc758
# MamestraBrassicaeModel
This repository contains the implementation of the Cabbage moth model.
### Development
Clone Gitlab repository
```
$ git clone https://gitlab.nibio.no/VIPS/models/java/Model_MAMESTRABR.git
$ cd Model_MAMESTRABR
```
This diff is collapsed.
Click to expand it.
ci_settings.xml
deleted
100644 → 0
+
0
−
16
View file @
aa0a7160
<settings
xmlns=
"http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
>
<servers>
<server>
<id>
gitlab-maven
</id>
<configuration>
<httpHeaders>
<property>
<name>
Job-Token
</name>
<value>
${CI_JOB_TOKEN}
</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pom.xml
+
4
−
10
View file @
4eefc758
...
...
@@ -6,19 +6,14 @@
<parent>
<groupId>
no.nibio.vips
</groupId>
<artifactId>
vips-parent-pom
</artifactId>
<version>
1.0.
2
</version>
<version>
1.0.
0
</version>
</parent>
<groupId>
no.nibio.vips.model
</groupId>
<artifactId>
MamestraBrassicaeModel
</artifactId>
<version>
1.
0
.0
</version>
<version>
1.
1
.0
-SNAPSHOT
</version>
<packaging>
jar
</packaging>
<repositories>
<repository>
<id>
gitlab-maven
</id>
<url>
https://gitlab.nibio.no/api/v4/projects/401/packages/maven
</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
...
...
@@ -35,11 +30,10 @@
<dependency>
<groupId>
no.nibio.vips
</groupId>
<artifactId>
VIPSCommon
</artifactId>
<version>
2
.0.
1
</version>
<version>
0
.0.
4
</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
1.7
</maven.compiler.source>
<maven.compiler.target>
1.7
</maven.compiler.target>
</properties>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment