Skip to content

Commit

Permalink
Task techjoomla#8 chore: Implement the build jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Amol Thite committed Aug 9, 2019
1 parent 498465e commit e8cf4fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
4 changes: 0 additions & 4 deletions build/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"package_name": "com_cluster",
"core_files": {
"src": "./src/components/*",
"dest": "builds/"
},
"subextensions": [
{
"name": "com_cluster",
Expand Down
28 changes: 4 additions & 24 deletions build/pipelines/nightly.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pipeline {
def props = readJSON file: 'scm/build/package.json'

// Copy core files
sh("cp -r " + props["core_files"].src + " " + props['core_files'].dest)
// sh("cp -r " + props["core_files"].src + " " + props['core_files'].dest)

// Copy Make the zips
props['subextensions'].eachWithIndex { item, index ->
Expand Down Expand Up @@ -130,32 +130,12 @@ pipeline {
sh("rm -rf $item.dest")
}
}
}
}
}

stage('Build pacakge') {
steps {
script {
// // Get commit id
// // @TODO - needs to define shortGitCommit at global level
def gitCommit = ''
def shortGitCommit = ''
def props = readJSON file: 'scm/build/package.json'

// // For branch based build - we need the revision number of tag checked out,
// Custom DIR
dir('scm') {
gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim().take(8)
shortGitCommit = gitCommit[0..7]
echo gitCommit
echo shortGitCommit
}

// Now we are good to create zip for component
sh('cd builds && zip -rq ../' + props['package_name'] + '_v' + version + "_" + shortGitCommit + '.zip .')
sh('mv com_cluster.zip ../')

archiveArtifacts "com_cluster.zip"

archiveArtifacts props['package_name'] + '_v' + version + "_" + shortGitCommit + '.zip'
}
}
}
Expand Down

0 comments on commit e8cf4fd

Please sign in to comment.