Skip to content

Commit

Permalink
[DOPS-1289] Rename master branch (#804)
Browse files Browse the repository at this point in the history
* fix main branch

Signed-off-by: Bulat Saifullin <[email protected]>

* Update doxygen.groovy

Signed-off-by: Bulat Saifullin <[email protected]>

* rename master to main

Signed-off-by: Bulat Saifullin <[email protected]>
  • Loading branch information
BulatSaif authored and kamilsa committed Mar 10, 2021
1 parent 9085ec2 commit cd11253
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .jenkinsci/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def sonarScanner(scmVars, environment) {
-Dsonar.projectVersion=${BUILD_TAG} \
-Dsonar.github.oauth=${SORABOT_TOKEN} ${sonar_option}
"""
if (scmVars.GIT_BRANCH == "master" )
if (scmVars.GIT_BRANCH == "main" )
// push analysis results to sonar
sh """
sonar-scanner \
Expand Down
2 changes: 1 addition & 1 deletion .jenkinsci/builders/x64-linux-build-steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def buildSteps(int parallelism, String compiler, String build_type, boolean buil
"""
postgresIP = sh(script: "docker inspect ${env.IROHA_POSTGRES_HOST} --format '{{ (index .NetworkSettings.Networks \"${env.IROHA_NETWORK}\").IPAddress }}'", returnStdout: true).trim()

def referenceBranchOrCommit = 'master'
def referenceBranchOrCommit = 'main'
if (scmVars.GIT_LOCAL_BRANCH == referenceBranchOrCommit && scmVars.GIT_PREVIOUS_COMMIT) {
referenceBranchOrCommit = scmVars.GIT_PREVIOUS_COMMIT
}
Expand Down
8 changes: 4 additions & 4 deletions .jenkinsci/text-variables.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ cmd_description = """
</ul>
</li>
<li>
<p><strong>doxygen</strong> = false (or = true if master ) </p>
<p><strong>doxygen</strong> = false (or = true if main ) </p>
<ul>
<li>
<p>Build doxygen, docs will be uploaded to jenkins,</p>
Expand Down Expand Up @@ -246,7 +246,7 @@ cmd_description = """
</ul>
</li>
<li>
<p><strong>pushDockerTag</strong> = 'not-supposed-to-be-pushed'(or = master if master)</p>
<p><strong>pushDockerTag</strong> = 'not-supposed-to-be-pushed'(or = main if main)</p>
<ul>
<li>
<p>if&nbsp;packagePush=true&nbsp;it the name of docker tag that will be pushed</p>
Expand All @@ -257,7 +257,7 @@ cmd_description = """
</ul>
</li>
<li>
<p><strong>packagePush</strong> = false (or = true if master )</p>
<p><strong>packagePush</strong> = false (or = true if main )</p>
<ul>
<li>
<p>push all packages and docker to the artifactory and docker hub</p>
Expand Down Expand Up @@ -312,7 +312,7 @@ cmd_description = """
</ul>
</li>
<li>
<p><strong>specialBranch</strong> = false (or = true if master ),</p>
<p><strong>specialBranch</strong> = false (or = true if main ),</p>
<ul>
<li>
<p>Not recommended to set, it used to decide push&nbsp;doxygen&nbsp;and&nbsp;iroha:develop-build&nbsp;or not, and force to run&nbsp;build_type = 'Release'</p>
Expand Down
10 changes: 5 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ node ('master') {
use_burrow = false
forceDockerDevelopBuild = false

if (scmVars.GIT_LOCAL_BRANCH in ["master"] || env.TAG_NAME )
if (scmVars.GIT_LOCAL_BRANCH in ["main"] || env.TAG_NAME )
specialBranch = true
else
specialBranch = false
Expand All @@ -184,8 +184,8 @@ node ('master') {
use_burrow = true
}

if (scmVars.GIT_LOCAL_BRANCH == "master")
pushDockerTag = 'master'
if (scmVars.GIT_LOCAL_BRANCH == "main")
pushDockerTag = 'main'
else if (env.TAG_NAME)
pushDockerTag = env.TAG_NAME
else
Expand Down Expand Up @@ -346,15 +346,15 @@ node ('master') {
x64LinuxAlwaysPostSteps, "x86_64 Linux ${build_type} ${compiler}", x64LinuxWorker, tasks)
}
}
// If "master" also run Release build
// If "main" branch also run Release build
if (release_build){
registerBuildSteps([{x64LinuxBuildScript.buildSteps(
current_parallelism, first_compiler, 'Release', build_shared_libs, specialBranch, /*coverage*/false,
/*testing*/false, testList, /*cppcheck*/false, /*sonar*/false, /*codestyle*/false, /*doxygen*/false, /*package_build*/true, /*sanitize*/false,
/*fuzzing*/false, /*benchmarking*/false, /*coredumps*/false, /*use_btf*/false, use_libursa, use_burrow, /*force_docker_develop_build*/false,
/*manifest_push*/false, environmentList)}],
x64LinuxPostSteps, "x86_64 Linux Release ${first_compiler}", x64LinuxWorker, tasks)
// will not be executed in usual case, because x64linux_compiler_list = ['gcc9'] for master branch or tags
// will not be executed in usual case, because x64linux_compiler_list = ['gcc9'] for main branch or tags
if (x64linux_compiler_list.size() > 1){
x64linux_compiler_list[1..-1].each { compiler ->
registerBuildSteps([{x64LinuxBuildScript.buildSteps(
Expand Down

0 comments on commit cd11253

Please sign in to comment.