Exemple #1
0
        public BuildConfig ByConfigurationName(string buildConfigName)
        {
            var build = _caller.GetFormat <BuildConfig>(ActionHelper.CreateFieldUrl("/app/rest/buildTypes/name:{0}", _fields),
                                                        buildConfigName);

            return(build);
        }
Exemple #2
0
        public VcsRoot ById(string vcsRootId)
        {
            var vcsRoot = m_caller.GetFormat <VcsRoot>(ActionHelper.CreateFieldUrl("/vcs-roots/id:{0}", m_fields),
                                                       vcsRootId);

            return(vcsRoot);
        }
Exemple #3
0
        public List <Build> ByBuildLocator(BuildLocator locator)
        {
            var buildWrapper =
                m_caller.GetFormat <BuildWrapper>(ActionHelper.CreateFieldUrl("/builds?locator={0}", m_fields), locator);

            return(int.Parse(buildWrapper.Count) > 0 ? buildWrapper.Build : new List <Build>());
        }
Exemple #4
0
        public List <Build> AllRunningBuild()
        {
            var buildWrapper =
                m_caller.GetFormat <BuildWrapper>(ActionHelper.CreateFieldUrl("/builds?locator=running:true", m_fields));

            return(int.Parse(buildWrapper.Count) > 0 ? buildWrapper.Build : new List <Build>());
        }
        public List <Build> All()
        {
            var buildQueue =
                m_caller.Get <BuildWrapper>(ActionHelper.CreateFieldUrl("/buildQueue", m_fields));

            return(buildQueue.Build);
        }
Exemple #6
0
        public List <Build> ByBuildLocator(BuildLocator locator, List <String> param)
        {
            var strParam     = GetParamLocator(param);
            var buildWrapper =
                m_caller.Get <BuildWrapper>(
                    ActionHelper.CreateFieldUrl($"/builds?locator={locator}{strParam}", m_fields));

            return(int.Parse(buildWrapper.Count) > 0 ? buildWrapper.Build : new List <Build>());
        }
Exemple #7
0
        public Branches GetBranchesByBuildConfigurationId(string buildTypeId, BranchLocator locator = null)
        {
            var locatorString = (locator != null)?$"?locator={locator}":"";
            var branches      =
                m_caller.Get <Branches>(
                    ActionHelper.CreateFieldUrl(
                        $"/buildTypes/id:{buildTypeId}/branches{locatorString}", m_fields));

            return(branches);
        }
Exemple #8
0
        public Branches GetBranchesByBuildProjectId(string projectId, BranchLocator locator = null)
        {
            var locatorString = (locator != null)?$"?locator={locator}":"";
            var branches      =
                m_caller.Get <Branches>(
                    ActionHelper.CreateFieldUrl(
                        $"/projects/id:{projectId}/branches{locatorString}", m_fields));

            return(branches);
        }
Exemple #9
0
        public List <Build> RetrieveEntireBuildChainTo(string buildConfigId)
        {
            var buildWrapper =
                _caller.GetFormat <BuildWrapper>(
                    ActionHelper.CreateFieldUrl(
                        "/app/rest/builds?locator=snapshotDependency:(to:(id:{0}),includeInitial:true),defaultFilter:false", _fields),
                    buildConfigId);

            return(int.Parse(buildWrapper.Count) > 0 ? buildWrapper.Build : new List <Build>());
        }
Exemple #10
0
        private List <Build> GetBuildListQuery(string url, string id, List <string> param = null)
        {
            var strParam     = GetParamLocator(param);
            var buildWrapper =
                m_caller.GetFormat <BuildWrapper>(
                    ActionHelper.CreateFieldUrl(
                        url, m_fields),
                    id, strParam);

            return(int.Parse(buildWrapper.Count) > 0 ? buildWrapper.Build : new List <Build>());
        }
Exemple #11
0
        public List <Agent> All(bool includeDisconnected = true, bool includeUnauthorized = true)
        {
            var url =
                string.Format(
                    ActionHelper.CreateFieldUrl("/agents?includeDisconnected={0}&includeUnauthorized={1}", m_fields),
                    includeDisconnected.ToString().ToLower(), includeUnauthorized.ToString().ToLower());

            var agentWrapper = m_caller.Get <AgentWrapper>(url);

            return(agentWrapper.Agent);
        }
Exemple #12
0
        public List <BuildConfig> ByProjectName(string projectName)
        {
            var buildWrapper =
                _caller.GetFormat <BuildTypeWrapper>(
                    ActionHelper.CreateFieldUrl("/app/rest/projects/name:{0}/buildTypes", _fields), projectName);

            if (buildWrapper == null || buildWrapper.BuildType == null)
            {
                return(new List <BuildConfig>());
            }
            return(buildWrapper.BuildType);
        }