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 Topics Snippets
  • Register
  • Sign in
  • 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
  • #298
Closed
Open
Issue created Nov 23, 2015 by username-removed-204177@SPARTAN563

Cache and Artifacts support for PowerShell

Currently the cache and artifacts implementation relies on tar and curl in order to function correctly. As a consequence of this, the functionality is unavailable on PowerShell.

This is a pretty significant issue for us as most of our work is done targeting Windows and using PowerShell for builds.

Recommendations

The tar requirement can be bypassed by making use of Go's built in compression/gzip and archive/tar writers. While you're implementing the writer, it would make sense to implement the reader and extract all of that functionality into its own helper.

You'd then need to add an extract command which would function the same way as the current archive command does, and switch to calling the gitlab-runner executable instead of tar for all compression/decompression requirements.

In addition to this, since the gitlab-runner executable is rarely on the Windows path, it would make sense to use something like filepath.Abs(os.Args[0]) to get the executing assembly's full path and execute that instead on Windows.

Once that functionality is in place, you should have everything needed for caching support within PowerShell. Artifacts would require you to implement a means of uploading the file on PowerShell, as it doesn't include something analogous to curl -F file=@artifacts.tgz out of the box. The easiest solution would probably be to change the API to directly accept the data as the body, rather than using multipart form encoding, and then do the following in PowerShell:

$WebClient = New-Object System.Net.WebClient
$WebClient.Headers.Add("BUILD-TOKEN", "...")
$WebClient.UploadFile($artifactsUploadURL, "POST", "artifacts.tgz")

This represents the following in CURL:

curl --data-binary=@artifacts.tgz -H "BUILD-TOKEN: ..." -X POST
Assignee
Assign to
Time tracking