Skip to content
Snippets Groups Projects
Select Git revision
  • b0c589ab246a71d4436b0f6fd2d25c170de6f759
  • master default protected
  • gitkeep
  • Issue/2463-newCoscinePIDTypes
  • dev protected
  • Issue/2309-docs
  • Issue/2259-updatePids
  • Issue/1321-pidEnquiryOverhaul
  • Issue/2158-emailServicedesk
  • uiv2
  • Hotfix/2130-uiv2ContactChange
  • Hotfix/2087-efNet6
  • Issue/1910-MigrationtoNET6.0
  • Issue/1971-projectEditCreateMigration
  • Issue/1980-userManagement
  • Sprint/2022-01
  • Sprint/2021-2022
  • Issue/1741-semanticSearchActions
  • Sprint/2021-23
  • Issue/1746-ApplicationProfileStoringMethod
  • Hotfix/1466-projectCreationTimeout
  • v3.3.2
  • v3.3.1
  • v3.3.0
  • v3.2.0
  • v3.1.0
  • v3.0.0
  • v2.4.1
  • v2.4.0
  • v2.3.0
  • v2.2.0
  • v2.1.1
  • v2.1.0
  • v2.0.0
  • v1.18.0
  • v1.17.1
  • v1.17.0
  • v1.16.0
  • v1.15.1
  • v1.15.0
  • v1.14.0
41 results

PowerShellUtil.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    PowerShellUtil.cs 1.00 KiB
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace Coscine.Action.Utils
    {
        public class PowerShellUtil
        {
    
            public static string GetTemplatesScript(string tempDirectory)
            {
                return @"$extractPath =  'C:\Programs\Consul\'
                    $fileName = 'Consul.exe'
                    $fullPath = ($extractPath + $fileName)
    
                    $tempDirectory = '{{tempDirectory}}'
    
                    $gitlab_token = & $fullPath kv get 'coscine/global/gitlabtoken'
    
                    git clone https://gitlab-ci-token:$gitlab_token@git.rwth-aachen.de/coscine/backend/sharepoint/templates.git $tempDirectory
    
                    cd $tempDirectory
    
                    $pagebranch = & $fullPath kv get 'coscine/local/sharepoint/pagebranch'
    
                    if (!$pagebranch) {
    	                $pagebranch = 'master';
                    }
    
                    git checkout $pagebranch".Replace("{{tempDirectory}}", tempDirectory);
            }
        }
    }