Compare commits

6 Commits

Author SHA1 Message Date
a5e74216c1 Test2 2019-08-13 22:27:37 +02:00
fde51cff62 Test 2019-08-13 22:20:30 +02:00
313c9fa696 Add property 2019-08-13 22:19:03 +02:00
c6d977babe Set execution rights to release script 2019-08-13 22:17:53 +02:00
ee386225a4 Test with new version. 2019-08-13 22:07:03 +02:00
87ac9cce7d Test with new version. 2019-08-13 22:03:19 +02:00
6 changed files with 25 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ pipeline {
stage('Clone Minager-properties repository') {
steps {
dir('minager-properties') {
git url:'https://gogs.takiguchi.ovh/Minager/minager-properties.git', branch: 'master', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
git url:'https://gogs.takiguchi.ovh/Minager/minager-properties.git', branch: 'do-release', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
}
}
}

View File

@@ -2,8 +2,8 @@ pipeline {
agent any
tools {
maven 'Maven-3.6.0'
jdk 'OpenJdk-11.0.4'
maven 'Maven-3.5.0'
jdk 'OpenJdk-11.0.2'
}
environment {
@@ -14,7 +14,7 @@ pipeline {
stage('Configuration') {
steps {
dir('minager-properties') {
git url:'https://gitea.takiguchi.ovh/Minager/minager-properties.git', branch: 'master', credentialsId: 'Jenkins-gitea'
git url:'https://gogs.takiguchi.ovh/Minager/minager-properties.git', branch: 'master', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
}
script {
sh 'cp ./minager-properties/application-prod.yml ./src/main/resources/application.yml'
@@ -50,7 +50,7 @@ pipeline {
sshPublisher(
publishers: [
sshPublisherDesc(
configName: 'DebianServer [minecraft]',
configName: 'DebianServer [minager]',
transfers: [
sshTransfer(
cleanRemote: false,
@@ -70,8 +70,8 @@ pipeline {
cleanRemote: false,
excludes: '',
execCommand: """
mv /home/minecraft/minager.jar /home/minecraft/minager/minager.jar
chmod 700 /home/minecraft/minager/minager.jar
mv /home/minecraft/minager.jar /home/minecraft/minager/bin/minager.jar
chmod 500 /home/minecraft/minager/bin/minager.jar
sudo service minager restart
""",
execTimeout: 120000,

View File

@@ -5,7 +5,7 @@
<groupId>org.minager</groupId>
<artifactId>minager</artifactId>
<version>1.2.0</version>
<version>1.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Minager</name>

23
src/main/bash/do-release.bash Normal file → Executable file
View File

@@ -6,13 +6,16 @@ function setVersion()
echo 'Update properties file'
sed -i -z -E "s/minager:\n version: ([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)/minager:\n version: $1/" \
minager-properties/application-prod.yml
../minager-properties/application-prod.yml
echo 'Update Angular app version'
sed -i -E "s/appVersion: '([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)'/appVersion: $1/" \
src/main/ts/src/environments/environment.prod.ts
}
BRANCH_NAME=do-release
cd ../../..
echo 'Retreive the project version...'
VERSION=$(mvn -q \
-Dexec.executable="echo" \
@@ -37,21 +40,25 @@ setVersion $RELEASE_VERSION
echo 'Git tag for release freezing'
git tag $RELEASE_VERSION
cd minager-properties && git tag $RELEASE_VERSION && cd ..
cd ../minager-properties || exit 1
git tag $RELEASE_VERSION || exit 1
cd - || exit 1
echo 'Change files to next version'
setVersion $NEXT_VERSION
echo 'Git commit and push'
# Minager-properties
cd minager-properties
git add application-prod.yml
git commit -m "Set version for next iteration: $NEXT_VERSION"
git push origin master
cd ..
cd ../minager-properties || exit 1
git add application-prod.yml || exit 1
git commit -m "Set version for next iteration: $NEXT_VERSION" || exit 1
git push origin $BRANCH_NAME || exit 1
git push origin --tags || exit 1
cd - || exit 1
# Minager
git add pom.xml
git add src/main/ts/src/environments/environment.prod.ts
git commit -m "Set version for next iteration: $NEXT_VERSION"
git push origin master
git push origin $BRANCH_NAME
git push origin --tags

View File

@@ -27,7 +27,7 @@ import { NotificationsComponent } from '../core/notifications/notifications.comp
`]
})
export class ServerComponent implements OnInit {
serverAddress = 'takiguchi.ovh:54311';
serverAddress = '176.188.217.1:54311';
serverStartedChecked = false;
serverStarted = false;
restarting = false;

View File

@@ -1,5 +1,5 @@
export const environment = {
production: true,
appVersion: '1.2.0',
appVersion: '1.3.0-SNAPSHOT',
title: ''
};