Skip to content

Commit b742296

Browse files
committed
Прогон на новом сонаре
1 parent 007b80a commit b742296

File tree

3 files changed

+22
-51
lines changed

3 files changed

+22
-51
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
test-reports/*
22
*.ospx
33
tests.xml
4+
.scannerwork/

Jenkinsfile

Lines changed: 5 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ pipeline {
2727
}
2828
else
2929
echo 'no testing task'
30+
31+
def scannerHome = tool 'sonar-scanner';
32+
withSonarQubeEnv('silverbulleters') {
33+
sh "${scannerHome}/bin/sonar-scanner"
34+
}
3035
}
3136

3237
}
@@ -43,57 +48,6 @@ pipeline {
4348

4449
}
4550

46-
stage('Сборка пакета') {
47-
48-
agent { label 'windows' }
49-
50-
steps {
51-
checkout scm
52-
53-
bat 'erase /Q *.ospx'
54-
bat 'chcp 65001 > nul && call opm build .'
55-
56-
stash includes: '*.ospx', name: 'package'
57-
archiveArtifacts '*.ospx'
58-
}
59-
60-
}
61-
62-
stage('Публикация в хабе') {
63-
when {
64-
branch 'master'
65-
}
66-
agent { label 'master' }
67-
steps {
68-
sh 'rm -f *.ospx'
69-
unstash 'package'
70-
71-
sh '''
72-
artifact=`ls -1 *.ospx`
73-
basename=`echo $artifact | sed -r 's/(.+)-.*(.ospx)/\\1/'`
74-
cp $artifact $basename.ospx
75-
sudo rsync -rv *.ospx /var/www/hub.oscript.io/download/$basename/
76-
'''.stripIndent()
77-
}
78-
}
79-
80-
stage('Публикация в нестабильном хабе') {
81-
when {
82-
branch 'develop'
83-
}
84-
agent { label 'master' }
85-
steps {
86-
sh 'rm -f *.ospx'
87-
unstash 'package'
88-
89-
sh '''
90-
artifact=`ls -1 *.ospx`
91-
basename=`echo $artifact | sed -r 's/(.+)-.*(.ospx)/\\1/'`
92-
cp $artifact $basename.ospx
93-
sudo rsync -rv *.ospx /var/www/hub.oscript.io/dev-channel/$basename/
94-
'''.stripIndent()
95-
}
96-
}
9751
}
9852
}
9953

sonar-project.properties

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# must be unique in a given SonarQube instance
2+
sonar.organization=oscript-library
3+
sonar.projectKey=gitsync
4+
sonar.host.url=http://opensonar.silverbulleters.org
5+
6+
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
7+
8+
sonar.projectName=v8runner
9+
sonar.projectVersion=1.1.3
10+
11+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
12+
# This property is optional if sonar.modules is set.
13+
sonar.sources=src
14+
15+
# Encoding of the source code. Default is default system encoding
16+
sonar.sourceEncoding=UTF-8

0 commit comments

Comments
 (0)