This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stage ('Publish version') { | |
def commitAuthor = sh(script: "git --no-pager show -s --format='%an'", returnStdout: true).trim() | |
def branchIsDevelop = "develop".equals(env.BRANCH_NAME); | |
def authorIsJenkins = "TeamJenkins".equals(commitAuthor) | |
if(branchIsDevelop && !authorIsJenkins) { | |
echo "Dette er et nytt bygg på develop. Bumper versjon og publiserer!" | |
sh "git checkout ${env.BRANCH_NAME}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableTransactionManagement | |
public class HibernateConf { | |
@Bean | |
public LocalSessionFactoryBean sessionFactory() { | |
LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); | |
sessionFactory.setDataSource(dataSource()); | |
sessionFactory.setPackagesToScan( | |
{"org.example.model" }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If not already added, add remote to original project: git remote add upstream https://github.com/spring-projects/spring-boot | |
Fetch original project: | |
git fetch upstream | |
Rebase the master branch of original project: | |
git co master | |
git rebase upstream/master | |
git push -f origin master |
NewerOlder