“从另一个项目复制工件”从mulijob到多配置

时间:2016-03-08 18:52:29

标签: jenkins jenkins-plugins

我有一个多工作项目,几乎没有多配置工作作为“multiJob阶段”:

var passport = require('passport')
, FacebookStrategy = require('passport-facebook').Strategy
, moment= require('moment')
, momentTimeZone=require('moment-timezone')
, inflection = require('inflection')
, markdown = require('markdown').markdown
, URL =require('url')
, LocalStrategy=require('passport-local').Strategy
, config= require('./local')
, device = require('express-device')


var createUser = function (token, tokenSecret, profile, done) {
process.nextTick(function () {
    User.findOne({
            or: [
                {uid: parseInt(profile.id)},
                {uid: profile.id}
            ]
        }
    ).exec(function (err, user) {
            if (user) {
                return done(null, user);
            } else {

                var data = {
                    provider: profile.provider,
                    uid: profile.id,
                    name: profile.displayName,
                    email: profile.email
                };

                if(profile.emails && profile.emails[0] && profile.emails[0].value) {
                    data.email = profile.emails[0].value;
                }
                if(profile.name && profile.name.givenName) {
                    data.firstname = profile.name.givenName;
                }
                if(profile.name && profile.name.familyName) {
                    data.lastname = profile.name.familyName;
                }
                User.create(data).exec(function (err, user) {
                    sails.log.info("Error",JSON.stringify(err))
                    return done(err, user);
                });
            }
        });
});
};
module.exports = {
 passport.use(new FacebookStrategy({
                clientID: config.facebook.clientID,
                clientSecret: config.facebook.clientSecret,
                callbackURL: config.facebook.callbackURL,
                profileFields: ['name', 'emails' ],
                enableProof: true
            },
         function  (accessToken, refreshToken, email, done)
        {
            //console.log("Auth done");
            //done(null, email);
            createUser
        }
            //createUser
        //}
        ))

         passport.serializeUser(function(user, done) {
            done(null, user);
      });
        passport.deserializeUser(function(obj, done) {
            done(null, obj);
});


        /*app.get("/auth/facebook", passport.authenticate("facebook",  { scope: ['email', 'public_profile'] }));*/
        app.get('/auth/facebook',
         passport.authenticate('facebook', { scope: ['email', 'public_profile'] }));

        app.get("/auth/facebook/callback",
            passport.authenticate("facebook", {
                successRedirect: "/",
                failureRedirect: "/login"
            }),
            function(req, res) {
               res.redirect('/');
            });
            app.get('/logout', function(req, res){
            req.logout();
            res.redirect('/');
            });
            function ensureAuthenticated(req, res, next) {
                if (req.isAuthenticated()) { return next(); }
                    res.redirect('/login')
                }

 app.use(passport.initialize());
        app.use(passport.session());
        app.use(device.capture());
        device.enableDeviceHelpers(app)
    }
}

};

JobMaster定期运行,首先从CentosJob开始,然后逐个启动UbuntuJob。 CentosJob和UbuntuJob生成一些工件。我想将这些工件复制到JobMaster。我试图使用“从另一个项目复制工件”插件但无法理解其设置。他们的名字似乎很混乱。请澄清是否可能以及如何实现这一目标。

0 个答案:

没有答案