Package org.codinjutsu.tools.jenkins.logic

Examples of org.codinjutsu.tools.jenkins.logic.RequestManager


        final BrowserPanel browserPanel = BrowserPanel.getInstance(project);
        try {
            Job job = browserPanel.getSelectedJob();

            RequestManager requestManager = browserPanel.getJenkinsManager();
            if (job.hasParameters()) {
                BuildParamDialog.showDialog(job, JenkinsAppSettings.getSafeInstance(project), requestManager, new BuildParamDialog.RunBuildCallback() {

                    public void notifyOnOk(Job job) {
                        notifyOnGoingMessage(job);
                    }

                    public void notifyOnError(Job job, Exception ex) {
                        browserPanel.notifyErrorJenkinsToolWindow("Build '" + job.getName() + "' cannot be run: " + ex.getMessage());
                    }
                });
            } else {
                requestManager.runBuild(job, JenkinsAppSettings.getSafeInstance(project));
                notifyOnGoingMessage(job);
                browserPanel.loadSelectedJob();
            }

        } catch (Exception ex) {
View Full Code Here


        final BrowserPanel browserPanel = BrowserPanel.getInstance(project);

        try {
            Job job = browserPanel.getSelectedJob();

            RequestManager requestManager = browserPanel.getJenkinsManager();

            if (job.hasParameters()) {
                if (job.hasParameter(PARAMETER_NAME)) {

                    JenkinsAppSettings settings = JenkinsAppSettings.getSafeInstance(project);

                    final VirtualFile virtualFile =
                        prepareFile(browserPanel, FileChooser.chooseFile(
                                browserPanel,
                                new FileChooserDescriptor(true, false, false, false, false, false))
                        , settings, job);

                    if ((null != virtualFile)) {
                        if (virtualFile.exists()) {
                            Map<String, VirtualFile> files = new HashMap<String, VirtualFile>();
                            files.put(PARAMETER_NAME, virtualFile);
                            requestManager.runBuild(job, settings, files);
                            notifyOnGoingMessage(job);
                            browserPanel.loadSelectedJob();
                        } else {
                            message = String.format("File \"%s\" not exists", virtualFile.getPath());
                        }
View Full Code Here

    private void onOK() {
        BrowserPanel browserPanel = BrowserPanel.getInstance(project);
        try {
            if (createPatch()) {
                RequestManager requestManager = browserPanel.getJenkinsManager();
                String selectedJobName = (String) jobsList.getSelectedItem();
                if (selectedJobName != null && !selectedJobName.isEmpty()) {
                    Job selectedJob = browserPanel.getJob(selectedJobName);
                    if (selectedJob != null) {
                        if (selectedJob.hasParameters()) {
                            if (selectedJob.hasParameter(UploadPatchToJob.PARAMETER_NAME)) {
                                JenkinsAppSettings settings = JenkinsAppSettings.getSafeInstance(project);
                                Map<String, VirtualFile> files = new HashMap<String, VirtualFile>();
                                VirtualFile virtualFile = UploadPatchToJob.prepareFile(browserPanel, LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(FILENAME)), settings, selectedJob);
                                if (virtualFile != null && virtualFile.exists()) {
                                    files.put(UploadPatchToJob.PARAMETER_NAME, virtualFile);
                                    requestManager.runBuild(selectedJob, settings, files);
                                    //browserPanel.loadSelectedJob();
                                    browserPanel.notifyInfoJenkinsToolWindow(HtmlUtil.createHtmlLinkMessage(
                                        selectedJob.getName() + " build is on going",
                                        selectedJob.getUrl())
                                    );
View Full Code Here

TOP

Related Classes of org.codinjutsu.tools.jenkins.logic.RequestManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.