Skip to content

Commit

Permalink
Update circleci jobs (open-telemetry#671)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk authored Aug 26, 2021
1 parent 471ac4d commit a4511e6
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ jobs:
- persist_to_workspace:
root: ~/
paths: project/bin
- store_artifacts:
path: bin

test:
executor: golang
Expand Down Expand Up @@ -218,10 +220,9 @@ jobs:
name: Save docker image
command: |
mkdir -p dist
docker save -o dist/image.tar otelcol:latest
- persist_to_workspace:
root: ~/
paths: project/dist
docker save -o dist/otelcol.tar otelcol:latest
- store_artifacts:
path: dist/otelcol.tar

windows-docker-otelcol:
executor:
Expand All @@ -232,12 +233,14 @@ jobs:
- run:
name: Build docker image
command: |
$ErrorActionPreference = 'Stop'
Copy-Item .\bin\otelcol_windows_amd64.exe .\cmd\otelcol\otelcol.exe
docker build -t otelcol-windows --build-arg SMART_AGENT_RELEASE=$((Get-Content internal\buildscripts\packaging\smart-agent-release.txt).TrimStart("v")) -f .\cmd\otelcol\Dockerfile.windows .\cmd\otelcol\
Remove-Item .\cmd\otelcol\otelcol.exe
- run:
name: Run docker image
command: |
$ErrorActionPreference = 'Stop'
docker run -d -e SPLUNK_ACCESS_TOKEN=12345 -e SPLUNK_REALM=fake-realm --name otelcol otelcol-windows:latest
Start-Sleep 10
$DockerOutput=$(docker ps --filter=status=running --filter=name=otelcol -q)
Expand All @@ -249,13 +252,11 @@ jobs:
- run:
name: Save docker image
command: |
$ErrorActionPreference = 'Stop'
New-Item -ItemType Directory -Force -Path dist
docker save -o dist\windows-image.tar otelcol-windows:latest
- persist_to_workspace:
root: ~/
paths: project/dist
docker save -o dist\otelcol-windows.tar otelcol-windows:latest
- store_artifacts:
path: dist/windows-image.tar
path: dist/otelcol-windows.tar

windows-test:
executor:
Expand All @@ -269,6 +270,7 @@ jobs:
- run:
name: Upgrade golang
command: |
$ErrorActionPreference = 'Stop'
choco upgrade golang --version=1.17
refreshenv
go env -w CGO_ENABLED=0
Expand All @@ -277,7 +279,9 @@ jobs:
# (New-Object System.Net.WebClient).DownloadFile("https://codecov.io/bash", "C:\Users\circleci\project\codecov.sh")
- run:
name: Unit tests with coverage
command: go-acc ./...
command: |
$ErrorActionPreference = 'Stop'
go-acc ./...
# - run:
# name: Upload coverage
# command: bash codecov.sh -f coverage.txt
Expand Down Expand Up @@ -309,9 +313,6 @@ jobs:
--html=~/testresults/results.html\
--self-contained-html \
internal/buildscripts/packaging/tests/package_test.py
- persist_to_workspace:
root: ~/
paths: project/dist/*.<< parameters.package_type >>
- store_artifacts:
path: dist
- save_pytest_results
Expand Down Expand Up @@ -380,6 +381,7 @@ jobs:
- run:
name: Installation test
command: |
$ErrorActionPreference = 'Stop'
Set-PSDebug -Trace 1
$msi_path = Resolve-Path .\dist\splunk-otel-collector*.msi
$env:VERIFY_ACCESS_TOKEN = "false"
Expand Down

0 comments on commit a4511e6

Please sign in to comment.