Skip to content

Commit

Permalink
try drone workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
thampiotr committed Nov 5, 2024
1 parent 23fc404 commit fcef827
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,22 @@ platform:
version: "1809"
steps:
- commands:
- '& "C:/Program Files/git/bin/bash.exe" -c ''echo "=== Workaround for failing clone
step ==="'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''echo "DRONE_TAG=${DRONE_TAG}"'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''rm -rf .git/'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''git clone https://github.com/grafana/alloy.git'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''cd alloy'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''git checkout ${DRONE_COMMIT}'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''echo "=== DONE Workaround for failing
clone step ==="'''
- '& "C:/Program Files/git/bin/bash.exe" -c ''go test -tags="nodocker,nonetwork"
./...'''
image: grafana/alloy-build-image:v0.1.6-windows
name: Run Go tests
trigger:
ref:
- refs/heads/main
event:
- pull_request
type: docker
---
kind: pipeline
Expand Down Expand Up @@ -836,6 +845,6 @@ kind: secret
name: updater_private_key
---
kind: signature
hmac: fd0699c2276e04bf3f9957b8eca427f3812c0aaf17bb969760f66574dcaf250c
hmac: c2cbdb258086c4124f5c1b6efdf96cefb0af3aced09a08f893887973ead2b12b

...
9 changes: 8 additions & 1 deletion .drone/pipelines/test.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,19 @@ local pipelines = import '../util/pipelines.jsonnet';

pipelines.windows('Test (Windows)') {
trigger: {
ref: ['refs/heads/main'],
event: ['pull_request'],
},
steps: [{
name: 'Run Go tests',
image: build_image.windows,
commands: [
pipelines.windows_command('echo "=== Workaround for failing clone step ==="'),
pipelines.windows_command('echo "DRONE_TAG=${DRONE_TAG}"'),
pipelines.windows_command('rm -rf .git/'),
pipelines.windows_command('git clone https://github.com/grafana/alloy.git'),
pipelines.windows_command('cd alloy'),
pipelines.windows_command('git checkout ${DRONE_COMMIT}'),
pipelines.windows_command('echo "=== DONE Workaround for failing clone step ==="'),
pipelines.windows_command('go test -tags="nodocker,nonetwork" ./...'),
],
}],
Expand Down

0 comments on commit fcef827

Please sign in to comment.