Correct the jenkinsfiles.
This commit is contained in:
@@ -17,9 +17,7 @@ pipeline {
|
|||||||
git url:'https://gogs.takiguchi.ovh/florian/codiki-properties.git', branch: 'master', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
|
git url:'https://gogs.takiguchi.ovh/florian/codiki-properties.git', branch: 'master', credentialsId: 'a6494064-8130-42fd-9d3d-e7734518c79e'
|
||||||
}
|
}
|
||||||
script {
|
script {
|
||||||
sh """
|
sh 'cp ./codiki-properties/application-prod.yml ./src/main/resources/application.yml'
|
||||||
cp ./codiki-properties/application-prod.yml ./src/main/resources/application.yml
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,21 +25,17 @@ pipeline {
|
|||||||
stage('Documentation generation') {
|
stage('Documentation generation') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
sh """
|
sh '''
|
||||||
echo 'Génération de la documentation d'utilisation...'
|
echo "Génération de la documentation d'utilisation..."
|
||||||
|
|
||||||
docPath='../src/main/ts/src/assets/doc/'
|
docPath="../src/main/ts/src/assets/doc/"
|
||||||
cd \$WORKSPACE/doc/ && unoconv codiki_user_manual.odt
|
cd $WORKSPACE/doc/ && unoconv codiki_user_manual.odt \\
|
||||||
&& mkdir -p \$docPath
|
&& mkdir -p $docPath \\
|
||||||
&& mv codiki_user_manual.pdf \$docPath
|
&& mv codiki_user_manual.pdf $docPath \\
|
||||||
&& cd -
|
&& cd -
|
||||||
if [ \$? -eq 0 ]
|
|
||||||
then
|
echo "Documentation générée avec succès."
|
||||||
echo 'Documentation générée avec succès.'
|
'''
|
||||||
else
|
|
||||||
echo 'La génération de la documentation s'est terminée en erreur
|
|
||||||
fi
|
|
||||||
"""
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -49,13 +43,13 @@ pipeline {
|
|||||||
stage('Angular build') {
|
stage('Angular build') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
sh """
|
sh '''
|
||||||
echo "Construction de l'application Angular..."
|
echo "Construction de l'application Angular..."
|
||||||
|
|
||||||
cd \$WORKSPACE/src/main/ts && npm install && ng build --configuration=production && cd -
|
cd $WORKSPACE/src/main/ts && npm install && ng build --configuration=integ && cd -
|
||||||
|
|
||||||
echo "Application générée avec succès."
|
echo "Application générée avec succès."
|
||||||
"""
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +68,7 @@ pipeline {
|
|||||||
sshPublisher(
|
sshPublisher(
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: 'DebianServer [clubs]',
|
configName: 'DebianServer [codiki-integ]',
|
||||||
transfers: [
|
transfers: [
|
||||||
sshTransfer(
|
sshTransfer(
|
||||||
cleanRemote: false,
|
cleanRemote: false,
|
||||||
@@ -93,11 +87,11 @@ pipeline {
|
|||||||
sshTransfer(
|
sshTransfer(
|
||||||
cleanRemote: false,
|
cleanRemote: false,
|
||||||
excludes: '',
|
excludes: '',
|
||||||
execCommand: """
|
execCommand: '''
|
||||||
mv /opt/codiki-2/codiki.jar /opt/codiki-2/bin/codiki.jar
|
mv /opt/codiki-integ/codiki.jar /opt/codiki-integ/bin/codiki.jar
|
||||||
sudo /opt/codiki-2/bin/codiki-jenkins.sh
|
sudo /opt/codiki-integ/bin/codiki-jenkins.sh
|
||||||
sudo service codiki-2 restart
|
sudo service codiki-integ restart
|
||||||
""",
|
''',
|
||||||
execTimeout: 120000,
|
execTimeout: 120000,
|
||||||
flatten: false,
|
flatten: false,
|
||||||
makeEmptyDirs: false,
|
makeEmptyDirs: false,
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ pipeline {
|
|||||||
sshPublisher(
|
sshPublisher(
|
||||||
publishers: [
|
publishers: [
|
||||||
sshPublisherDesc(
|
sshPublisherDesc(
|
||||||
configName: 'DebianServer [clubs]',
|
configName: 'DebianServer [codiki]',
|
||||||
transfers: [
|
transfers: [
|
||||||
sshTransfer(
|
sshTransfer(
|
||||||
cleanRemote: false,
|
cleanRemote: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user