Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 972
    • Issues 972
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 88
    • Merge requests 88
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
Collapse sidebar

Do not update/delete: Banner broadcast message test data

Do not update/delete: Notification broadcast message test data

  • GitLab.orgGitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #2547
Closed
Open
Issue created Jun 22, 2017 by username-removed-1127571@arturas.slajus

Powershell shell assumes it is ran on Windows

Summary

Summarize the bug encountered concisely

Powershell is now cross platform (Windows, OSX, Linux) and is great scripting tool. We shouldn't assume that it only runs on Windows with things like .ToBackslash(): https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/shells/powershell.go#L94

Steps to reproduce

Run any build with powershell shell on OSX or Windows. Paths are generated with , not /.

Expected behavior

Paths should use /, because powershell supports slash delimited paths:

PS C:\work> ls c:/work/build.status


    Directory: C:\work


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       2017-02-16     12:13           3997 build.status

Relevant logs and/or screenshots

Excerpt from generated powershell script.

md "\Users\gitlab\builds\6d255f49\0\games\funkidracing.tmp" -Force | out-null
Set-Content "\Users\gitlab\builds\6d255f49\0\games\funkidracing.tmp\CI_SERVER_TLS_CA_FILE" -Value "....masked...." -Encoding UTF8 -Force
$CI_SERVER_TLS_CA_FILE="\Users\gitlab\builds\6d255f49\0\games\funkidracing.tmp\CI_SERVER_TLS_CA_FILE"
$env:CI_SERVER_TLS_CA_FILE=$CI_SERVER_TLS_CA_FILE
$CI="true"
$env:CI=$CI
$GITLAB_CI="true"
$env:GITLAB_CI=$GITLAB_CI
$CI_SERVER_NAME="GitLab"
$env:CI_SERVER_NAME=$CI_SERVER_NAME
$CI_SERVER_VERSION="9.2.6"

Environment description

gitlabs-iMac:unity gitlab$ /usr/local/bin/gitlab-runner --version
Version:      9.2.1
Git revision: f018144
Git branch:
GO version:   go1.7.5
Built:        Sat, 17 Jun 2017 16:57:24 +0000
OS/Arch:      darwin/amd64

gitlabs-iMac:unity gitlab$ cat ~/.gitlab-runner/config.toml
concurrent = 3
check_interval = 0

[[runners]]
  name = "hackintosh"
  url = "https://.../"
  token = "..."
  executor = "shell"
  shell = "powershell"
  [runners.cache]

gitlabs-iMac:unity gitlab$ powershell --version
powershell v6.0.0-beta.2
GitLab 9.2.6
GitLab Shell 5.0.4
GitLab Workhorse v2.0.0
GitLab API v4
Git 2.11.1
Ruby 2.3.3p222
Rails 4.2.8
postgresql 9.6.1
Assignee
Assign to
Time tracking