jenkins deployment making the build very slow
What wound would be of little consequence to a biped but terrible for a quadruped?
Space in array system equations
How strictly should I take "Candidates must be local"?
Who deserves to be first and second author? PhD student who collected data, research associate who wrote the paper or supervisor?
How much attack damage does the AC boost from a shield prevent on average?
Why would one plane in this picture not have gear down yet?
Good allowance savings plan?
A three room house but a three headED dog
Good for you! in Russian
Given the sum of two powers of two, extract the exponents
My story is written in English, but is set in my home country. What language should I use for the dialogue?
Word for a person who has no opinion about whether god exists
How much stiffer are 23c tires over 28c?
Set and print content of environment variable in cmd.exe subshell?
What are some noteworthy "mic-drop" moments in math?
PTIJ: Why can't I eat anything?
Why the color red for the Republican Party
Should I tell my boss the work he did was worthless
Built-In Shelves/Bookcases - IKEA vs Built
Virginia employer terminated employee and wants signing bonus returned
Should I take out a loan for a friend to invest on my behalf?
Is Gradient Descent central to every optimizer?
Do items de-spawn in Diablo?
What's the "normal" opposite of flautando?
jenkins deployment making the build very slow
$begingroup$
- I am new to jenkins
- I am doing a build through my jenkins.
- but my build is very slow.
- is there any way I can speed it up.
- providing my code snippet below
#!/usr/bin/env groovy
@Library('cplib') _
import com.sports.paas.cplib.helpers.Build
import com.sports.paas.cplib.helpers.Workspace
import com.sports.paas.cplib.utils.Openshift
def bld = new Build()
def wspace = new Workspace()
def osh = new Openshift()
def appReleaseTag = ""
def NODE_HOME = "${JENKINS_HOME_SLAVE}/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_6.11.1"
def projectName = "player"
def appName = "ball"
def appOcpConfigBranch = "master"
// ########################################################################################
// PIPELINE WORKFLOW
// ########################################################################################
pipeline {
agent { node('nodejs')}
tools {
nodejs 'nodejs-8.11.2'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15'))
skipDefaultCheckout(true)
timestamps()
skipStagesAfterUnstable()
}
parameters {
choice (
name : 'DEPLOY_ENVIRONMENT',
choices: ' nunitntestnstage',
description: '[Required] Select the location to deploy.'
)
}
stages {
stage('Prepare') {
steps {
script {
log.info "Explicit scm checkout ..."
checkout scm
wspace.init()
// wspace.checkoutAppOcpConfig(appName, appOcpConfigBranch)
appReleaseTag = wspace.getBuildProperty("version") + "." + env.BUILD_NUMBER
}
}
}
stage('Build Artifacts') {
steps {
script {
sh """
echo "Building artifacts ..."
export PATH=$PATH:$NODE_HOME/bin;
echo "Running node build ..."
# Please build your application using npm or yarn. Application build
# using yarn has been tested for a 35% faster execution when compared to yarn.
#npm install --no-optional --production --silent
npm install
echo "@@@ NPM RUN PROD ( BUILD )"
npm run build
#yarn
"""
}
prepareForBuildImage()
}
}
stage('Build Image') {
steps {
script {
if(!wspace.releaseVersionExists()) {
appReleaseTag = osh.buildAppImage(appName, appReleaseTag)
} else {
appReleaseTag = env.RELEASE_VERSION
}
}
}
}
stage('Deploy Unit') {
steps {
script {
envName=env.DEPLOY_ENVIRONMENT
osh.deploy(projectName+"-"+envName, appName, envName,appReleaseTag)
}
}
}
} //stages
} // pipeline
def prepareForBuildImage() {
sh '''
echo "Preparing Image contents ..."
rm -rf tmp
mkdir -p tmp
chmod -R 777 tmp
echo "Compressing files ..."
tar cvzf tmp.tar.gz client server *.json node_modules index.js build.properties README.md
cp -pr tmp.tar.gz tmp/
echo "Decompressing files ..."
cd tmp
tar xvzf tmp.tar.gz
rm -fr tmp.tar.gz
cd ..
echo "Displaying deployment artifacts ..."
ls -Rlt tmp/ --ignore=node_modules
'''
}
javascript performance node.js json yaml
New contributor
$endgroup$
add a comment |
$begingroup$
- I am new to jenkins
- I am doing a build through my jenkins.
- but my build is very slow.
- is there any way I can speed it up.
- providing my code snippet below
#!/usr/bin/env groovy
@Library('cplib') _
import com.sports.paas.cplib.helpers.Build
import com.sports.paas.cplib.helpers.Workspace
import com.sports.paas.cplib.utils.Openshift
def bld = new Build()
def wspace = new Workspace()
def osh = new Openshift()
def appReleaseTag = ""
def NODE_HOME = "${JENKINS_HOME_SLAVE}/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_6.11.1"
def projectName = "player"
def appName = "ball"
def appOcpConfigBranch = "master"
// ########################################################################################
// PIPELINE WORKFLOW
// ########################################################################################
pipeline {
agent { node('nodejs')}
tools {
nodejs 'nodejs-8.11.2'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15'))
skipDefaultCheckout(true)
timestamps()
skipStagesAfterUnstable()
}
parameters {
choice (
name : 'DEPLOY_ENVIRONMENT',
choices: ' nunitntestnstage',
description: '[Required] Select the location to deploy.'
)
}
stages {
stage('Prepare') {
steps {
script {
log.info "Explicit scm checkout ..."
checkout scm
wspace.init()
// wspace.checkoutAppOcpConfig(appName, appOcpConfigBranch)
appReleaseTag = wspace.getBuildProperty("version") + "." + env.BUILD_NUMBER
}
}
}
stage('Build Artifacts') {
steps {
script {
sh """
echo "Building artifacts ..."
export PATH=$PATH:$NODE_HOME/bin;
echo "Running node build ..."
# Please build your application using npm or yarn. Application build
# using yarn has been tested for a 35% faster execution when compared to yarn.
#npm install --no-optional --production --silent
npm install
echo "@@@ NPM RUN PROD ( BUILD )"
npm run build
#yarn
"""
}
prepareForBuildImage()
}
}
stage('Build Image') {
steps {
script {
if(!wspace.releaseVersionExists()) {
appReleaseTag = osh.buildAppImage(appName, appReleaseTag)
} else {
appReleaseTag = env.RELEASE_VERSION
}
}
}
}
stage('Deploy Unit') {
steps {
script {
envName=env.DEPLOY_ENVIRONMENT
osh.deploy(projectName+"-"+envName, appName, envName,appReleaseTag)
}
}
}
} //stages
} // pipeline
def prepareForBuildImage() {
sh '''
echo "Preparing Image contents ..."
rm -rf tmp
mkdir -p tmp
chmod -R 777 tmp
echo "Compressing files ..."
tar cvzf tmp.tar.gz client server *.json node_modules index.js build.properties README.md
cp -pr tmp.tar.gz tmp/
echo "Decompressing files ..."
cd tmp
tar xvzf tmp.tar.gz
rm -fr tmp.tar.gz
cd ..
echo "Displaying deployment artifacts ..."
ls -Rlt tmp/ --ignore=node_modules
'''
}
javascript performance node.js json yaml
New contributor
$endgroup$
add a comment |
$begingroup$
- I am new to jenkins
- I am doing a build through my jenkins.
- but my build is very slow.
- is there any way I can speed it up.
- providing my code snippet below
#!/usr/bin/env groovy
@Library('cplib') _
import com.sports.paas.cplib.helpers.Build
import com.sports.paas.cplib.helpers.Workspace
import com.sports.paas.cplib.utils.Openshift
def bld = new Build()
def wspace = new Workspace()
def osh = new Openshift()
def appReleaseTag = ""
def NODE_HOME = "${JENKINS_HOME_SLAVE}/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_6.11.1"
def projectName = "player"
def appName = "ball"
def appOcpConfigBranch = "master"
// ########################################################################################
// PIPELINE WORKFLOW
// ########################################################################################
pipeline {
agent { node('nodejs')}
tools {
nodejs 'nodejs-8.11.2'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15'))
skipDefaultCheckout(true)
timestamps()
skipStagesAfterUnstable()
}
parameters {
choice (
name : 'DEPLOY_ENVIRONMENT',
choices: ' nunitntestnstage',
description: '[Required] Select the location to deploy.'
)
}
stages {
stage('Prepare') {
steps {
script {
log.info "Explicit scm checkout ..."
checkout scm
wspace.init()
// wspace.checkoutAppOcpConfig(appName, appOcpConfigBranch)
appReleaseTag = wspace.getBuildProperty("version") + "." + env.BUILD_NUMBER
}
}
}
stage('Build Artifacts') {
steps {
script {
sh """
echo "Building artifacts ..."
export PATH=$PATH:$NODE_HOME/bin;
echo "Running node build ..."
# Please build your application using npm or yarn. Application build
# using yarn has been tested for a 35% faster execution when compared to yarn.
#npm install --no-optional --production --silent
npm install
echo "@@@ NPM RUN PROD ( BUILD )"
npm run build
#yarn
"""
}
prepareForBuildImage()
}
}
stage('Build Image') {
steps {
script {
if(!wspace.releaseVersionExists()) {
appReleaseTag = osh.buildAppImage(appName, appReleaseTag)
} else {
appReleaseTag = env.RELEASE_VERSION
}
}
}
}
stage('Deploy Unit') {
steps {
script {
envName=env.DEPLOY_ENVIRONMENT
osh.deploy(projectName+"-"+envName, appName, envName,appReleaseTag)
}
}
}
} //stages
} // pipeline
def prepareForBuildImage() {
sh '''
echo "Preparing Image contents ..."
rm -rf tmp
mkdir -p tmp
chmod -R 777 tmp
echo "Compressing files ..."
tar cvzf tmp.tar.gz client server *.json node_modules index.js build.properties README.md
cp -pr tmp.tar.gz tmp/
echo "Decompressing files ..."
cd tmp
tar xvzf tmp.tar.gz
rm -fr tmp.tar.gz
cd ..
echo "Displaying deployment artifacts ..."
ls -Rlt tmp/ --ignore=node_modules
'''
}
javascript performance node.js json yaml
New contributor
$endgroup$
- I am new to jenkins
- I am doing a build through my jenkins.
- but my build is very slow.
- is there any way I can speed it up.
- providing my code snippet below
#!/usr/bin/env groovy
@Library('cplib') _
import com.sports.paas.cplib.helpers.Build
import com.sports.paas.cplib.helpers.Workspace
import com.sports.paas.cplib.utils.Openshift
def bld = new Build()
def wspace = new Workspace()
def osh = new Openshift()
def appReleaseTag = ""
def NODE_HOME = "${JENKINS_HOME_SLAVE}/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_6.11.1"
def projectName = "player"
def appName = "ball"
def appOcpConfigBranch = "master"
// ########################################################################################
// PIPELINE WORKFLOW
// ########################################################################################
pipeline {
agent { node('nodejs')}
tools {
nodejs 'nodejs-8.11.2'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '15'))
skipDefaultCheckout(true)
timestamps()
skipStagesAfterUnstable()
}
parameters {
choice (
name : 'DEPLOY_ENVIRONMENT',
choices: ' nunitntestnstage',
description: '[Required] Select the location to deploy.'
)
}
stages {
stage('Prepare') {
steps {
script {
log.info "Explicit scm checkout ..."
checkout scm
wspace.init()
// wspace.checkoutAppOcpConfig(appName, appOcpConfigBranch)
appReleaseTag = wspace.getBuildProperty("version") + "." + env.BUILD_NUMBER
}
}
}
stage('Build Artifacts') {
steps {
script {
sh """
echo "Building artifacts ..."
export PATH=$PATH:$NODE_HOME/bin;
echo "Running node build ..."
# Please build your application using npm or yarn. Application build
# using yarn has been tested for a 35% faster execution when compared to yarn.
#npm install --no-optional --production --silent
npm install
echo "@@@ NPM RUN PROD ( BUILD )"
npm run build
#yarn
"""
}
prepareForBuildImage()
}
}
stage('Build Image') {
steps {
script {
if(!wspace.releaseVersionExists()) {
appReleaseTag = osh.buildAppImage(appName, appReleaseTag)
} else {
appReleaseTag = env.RELEASE_VERSION
}
}
}
}
stage('Deploy Unit') {
steps {
script {
envName=env.DEPLOY_ENVIRONMENT
osh.deploy(projectName+"-"+envName, appName, envName,appReleaseTag)
}
}
}
} //stages
} // pipeline
def prepareForBuildImage() {
sh '''
echo "Preparing Image contents ..."
rm -rf tmp
mkdir -p tmp
chmod -R 777 tmp
echo "Compressing files ..."
tar cvzf tmp.tar.gz client server *.json node_modules index.js build.properties README.md
cp -pr tmp.tar.gz tmp/
echo "Decompressing files ..."
cd tmp
tar xvzf tmp.tar.gz
rm -fr tmp.tar.gz
cd ..
echo "Displaying deployment artifacts ..."
ls -Rlt tmp/ --ignore=node_modules
'''
}
javascript performance node.js json yaml
javascript performance node.js json yaml
New contributor
New contributor
New contributor
asked 2 mins ago
zi zizi zi
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
});
});
}, "mathjax-editing");
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "196"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
zi zi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215290%2fjenkins-deployment-making-the-build-very-slow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
zi zi is a new contributor. Be nice, and check out our Code of Conduct.
zi zi is a new contributor. Be nice, and check out our Code of Conduct.
zi zi is a new contributor. Be nice, and check out our Code of Conduct.
zi zi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f215290%2fjenkins-deployment-making-the-build-very-slow%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown