Compare commits
6 Commits
master
...
do-release
| Author | SHA1 | Date | |
|---|---|---|---|
| a5e74216c1 | |||
| fde51cff62 | |||
| 313c9fa696 | |||
| c6d977babe | |||
| ee386225a4 | |||
| 87ac9cce7d |
@@ -9,7 +9,7 @@ pipeline {
|
|||||||
stage('Clone Minager-properties repository') {
|
stage('Clone Minager-properties repository') {
|
||||||
steps {
|
steps {
|
||||||
dir('minager-properties') {
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ pipeline {
|
|||||||
agent any
|
agent any
|
||||||
|
|
||||||
tools {
|
tools {
|
||||||
maven 'Maven-3.6.0'
|
maven 'Maven-3.5.0'
|
||||||
jdk 'OpenJdk-11.0.4'
|
jdk 'OpenJdk-11.0.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
@@ -14,7 +14,7 @@ pipeline {
|
|||||||
stage('Configuration') {
|
stage('Configuration') {
|
||||||
steps {
|
steps {
|
||||||
dir('minager-properties') {
|
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 {
|
script {
|
||||||
sh 'cp ./minager-properties/application-prod.yml ./src/main/resources/application.yml'
|
sh 'cp ./minager-properties/application-prod.yml ./src/main/resources/application.yml'
|
||||||
@@ -50,7 +50,7 @@ pipeline {
|
|||||||
sshPublisher(
|
sshPublisher(
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: 'DebianServer [minecraft]',
|
configName: 'DebianServer [minager]',
|
||||||
transfers: [
|
transfers: [
|
||||||
sshTransfer(
|
sshTransfer(
|
||||||
cleanRemote: false,
|
cleanRemote: false,
|
||||||
@@ -70,8 +70,8 @@ pipeline {
|
|||||||
cleanRemote: false,
|
cleanRemote: false,
|
||||||
excludes: '',
|
excludes: '',
|
||||||
execCommand: """
|
execCommand: """
|
||||||
mv /home/minecraft/minager.jar /home/minecraft/minager/minager.jar
|
mv /home/minecraft/minager.jar /home/minecraft/minager/bin/minager.jar
|
||||||
chmod 700 /home/minecraft/minager/minager.jar
|
chmod 500 /home/minecraft/minager/bin/minager.jar
|
||||||
sudo service minager restart
|
sudo service minager restart
|
||||||
""",
|
""",
|
||||||
execTimeout: 120000,
|
execTimeout: 120000,
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>org.minager</groupId>
|
<groupId>org.minager</groupId>
|
||||||
<artifactId>minager</artifactId>
|
<artifactId>minager</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>1.3.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Minager</name>
|
<name>Minager</name>
|
||||||
|
|||||||
23
src/main/bash/do-release.bash
Normal file → Executable file
23
src/main/bash/do-release.bash
Normal file → Executable file
@@ -6,13 +6,16 @@ function setVersion()
|
|||||||
|
|
||||||
echo 'Update properties file'
|
echo 'Update properties file'
|
||||||
sed -i -z -E "s/minager:\n version: ([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)/minager:\n version: $1/" \
|
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'
|
echo 'Update Angular app version'
|
||||||
sed -i -E "s/appVersion: '([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)'/appVersion: $1/" \
|
sed -i -E "s/appVersion: '([0-9]+(\.[0-9]+){2}(-SNAPSHOT)?)'/appVersion: $1/" \
|
||||||
src/main/ts/src/environments/environment.prod.ts
|
src/main/ts/src/environments/environment.prod.ts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BRANCH_NAME=do-release
|
||||||
|
cd ../../..
|
||||||
|
|
||||||
echo 'Retreive the project version...'
|
echo 'Retreive the project version...'
|
||||||
VERSION=$(mvn -q \
|
VERSION=$(mvn -q \
|
||||||
-Dexec.executable="echo" \
|
-Dexec.executable="echo" \
|
||||||
@@ -37,21 +40,25 @@ setVersion $RELEASE_VERSION
|
|||||||
|
|
||||||
echo 'Git tag for release freezing'
|
echo 'Git tag for release freezing'
|
||||||
git tag $RELEASE_VERSION
|
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'
|
echo 'Change files to next version'
|
||||||
setVersion $NEXT_VERSION
|
setVersion $NEXT_VERSION
|
||||||
|
|
||||||
echo 'Git commit and push'
|
echo 'Git commit and push'
|
||||||
# Minager-properties
|
# Minager-properties
|
||||||
cd minager-properties
|
cd ../minager-properties || exit 1
|
||||||
git add application-prod.yml
|
git add application-prod.yml || exit 1
|
||||||
git commit -m "Set version for next iteration: $NEXT_VERSION"
|
git commit -m "Set version for next iteration: $NEXT_VERSION" || exit 1
|
||||||
git push origin master
|
git push origin $BRANCH_NAME || exit 1
|
||||||
cd ..
|
git push origin --tags || exit 1
|
||||||
|
cd - || exit 1
|
||||||
|
|
||||||
# Minager
|
# Minager
|
||||||
git add pom.xml
|
git add pom.xml
|
||||||
git add src/main/ts/src/environments/environment.prod.ts
|
git add src/main/ts/src/environments/environment.prod.ts
|
||||||
git commit -m "Set version for next iteration: $NEXT_VERSION"
|
git commit -m "Set version for next iteration: $NEXT_VERSION"
|
||||||
git push origin master
|
git push origin $BRANCH_NAME
|
||||||
|
git push origin --tags
|
||||||
@@ -27,7 +27,7 @@ import { NotificationsComponent } from '../core/notifications/notifications.comp
|
|||||||
`]
|
`]
|
||||||
})
|
})
|
||||||
export class ServerComponent implements OnInit {
|
export class ServerComponent implements OnInit {
|
||||||
serverAddress = 'takiguchi.ovh:54311';
|
serverAddress = '176.188.217.1:54311';
|
||||||
serverStartedChecked = false;
|
serverStartedChecked = false;
|
||||||
serverStarted = false;
|
serverStarted = false;
|
||||||
restarting = false;
|
restarting = false;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const environment = {
|
export const environment = {
|
||||||
production: true,
|
production: true,
|
||||||
appVersion: '1.2.0',
|
appVersion: '1.3.0-SNAPSHOT',
|
||||||
title: ''
|
title: ''
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user