Merge pull request 'utilisation des credentials' (#32) from pipeline10 into main
All checks were successful
Organisation/sirh/pipeline/head This commit looks good

Reviewed-on: #32
This commit was merged in pull request #32.
This commit is contained in:
2026-05-04 09:52:26 +00:00

8
Jenkinsfile vendored
View File

@@ -2,6 +2,11 @@ pipeline
{ {
agent any agent any
environment
{
SUDO_PASSWORD = credentials('sudo-password')
}
stages stages
{ {
stage ( 'checkout' ) stage ( 'checkout' )
@@ -17,8 +22,9 @@ pipeline
when { branch 'main' } when { branch 'main' }
steps { steps {
sh ''' sh '''
echo $SUDO_PASSWORD
cd /jenkins_test/sirh cd /jenkins_test/sirh
"sylla" | sudo -S chown -R jenkins:jenkins /jenkins_test/sirh echo $SUDO_PASSWORD | sudo -S chown -R jenkins:jenkins /jenkins_test/sirh
git pull origin main git pull origin main
python3 -m venv venv python3 -m venv venv
. venv/bin/activate . venv/bin/activate