IDE --> Native tooling --> Deployment
Current issues facing delivery teams
Client transparency
Time to market
Encourages developers
Mitigates integration issues
built frequentlythe latest level of codepossibly unstableimmediate feedback
Bug Fixing &New features in parallel
Powerful SCM can boost development time and simplify integration
More stable code base
Promoted at end of Sprints
End to end process tests
QA and UI testing can be expanded
Integration tests
The final check before code is pushed to production Business sign off Final QA "Production like" environment (clustered, load balanced etc)
var baseUrl = "http://" + domain + ":" + port + "/" + contextRoot;
var address = baseUrl + "/invoke?adapter=%ADAPTERNAME%&procedure=%PROCEDURENAME%¶meters=%PARAMETERS%";
var domain = process.env.npm_package_config_domain;
var request = require('request');
var invokeProcedure = function (adapter, procedure, parameters, callback, done){ // prepare the URL var payload = _invoke(URL)
callback(payload) // passed from script calling this function
done(); // Mocha callback for async completeness
} var _invoke = function (address) { request.get({url:address, json:true}, function(error, response, data){ // do something interesting? return {error: error, response: response, data: payload}; }) }
exports.invokeProcedure = invokeProcedure;
check in POSTman (dev)
var when = require('when');
_prepareChallengeResponse(url).then(_invoke).then(
function(payload){
callback(payload);
}).done(function(done /*Mocha done*/){
done();
});
var _prepareChallengeResponse = function (url){
var deferred = when.defer();
request.get(url, function(error, response, data){
// handle error & strip out the /*secure */ string
wlInstanceId = data.challenges.wl_antiXSRFRealm['WL-Instance-Id'];
url.headers = { 'WL-Instance-Id' : wlInstanceId}; return deferred.resolve(url);
})
};
var invokeProcedureDefer = function (adapter, procedure, parameters){ // form url from param etc var deferred = when.defer(); _prepareChallengeResponse(url).then(_invoke).then( function(payload){ deferred.resolve(payload); }, function(error){ // handle error in some way deferred.reject(error); } ); return deferred.promise; };
BUILD_TAG=${JOB_NAME}.${BUILD_NUMBER}
setEnvironment $DEPLOYER_ENV
restartServer
setUpRepo $PROJECT_DIR $MAINREPO_TREEISH $BUILD_TAG
runLocalAnt $BUILD_OUTPUT -DlibertyAppDir=${LIBERTY_APP_DIR} \
buildRestApplication buildSecurityTestApplication \
deployCustomizationWar deployAllAdapters
setBuildDescription
buildOnSlave
deployApplications
addCustomServerConfig
runTests
deployAppsToAppCenter $BUILD_OUTPUT/archived-products
security unlock-keychain -p PASSWORD $LOGIN_KEYCHAIN
# 2. git checkout git_pull cleanOutput # 2.5 (minification / LESS / etc.) gruntTask # 3. run worklight ant task runWorklightTask addProvisioningProfile # 4. Build the ios app cleanAndBuild $SCHEME # 5. archive + sign ios app archive $SCHEME # 6. build android app cleanAndBuildAndroid # 7. remove the .app and .app.dSYm files as they take up too much space removeIosArtefacts $SCHEME $APP_CENTER_SCHEME $APP_CENTER_IPA_NAME
GOTCHA - npm config Global issue
*without rebuilding WAR & Adapters
adapter.proxy.protocol=http adapter.proxy.domain=192.168.12.10 adapter.proxy.port=8080
In deploy-to-environment-ant.xml add <!--JNDI_PROPERTIES-->
<jndiEntry jndiName="worklight/adapter.proxy.protocol" value='"http"'/> <jndiEntry jndiName="worklight/adapter.proxy.domain" value='"192.188.12.10"'/>
<jndiEntry jndiName="worklight/adapter.proxy.port" value='"8080"'/>
<include optional="true" location="server.CI.xml"/>
<server>
<logging traceSpecification=
"com.worklight.adapters=FINEST:com.worklight.integration=FINEST"
traceFileName="stdout" maxFileSize="20" maxFiles="2"
traceFormat="BASIC" />
</server>
cp / scp depending on what you need / where you are
curl -H 'Authorization: $TOKEN' -H 'Accept: application/vnd.github.v3.raw' -L https://api.github.com/locationOfFileToExtract/$1 > $2
chmod 755 $2
./$2
set$ENV () {
export $WL_SERVER_URL
export $DB2_DATABASES_DBNAME_WRKLGHT
# and what ever else per environment
}