Skip to content

Commit

Permalink
Initial prototype, not working as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-ahemsath committed Jul 14, 2023
1 parent ec70f4e commit ee9ceb9
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Agent/IntegrationTests/Linux/distros/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM debian:stable

# Install dependencies
# dos2unix: needed to convert test runner script to Linux line ending format
# exiftool: ???
# wget: needed to download .NET SDK
# libicu72: needed to make dos2unix work
# git: needed by agent build process to determine agent version based on commit history
RUN apt-get update
RUN apt-get install --assume-yes dos2unix exiftool wget libicu72 git

# Install .NET SDK
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
RUN chmod +x ./dotnet-install.sh
RUN ./dotnet-install.sh --channel 7.0

# .NET 7 SDK is now installed at /root/.dotnet
# Sanity check
RUN PATH=$PATH:/root/.dotnet && dotnet --list-sdks


20 changes: 20 additions & 0 deletions tests/Agent/IntegrationTests/Linux/distros/debian/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# .NET SDK is in /root/.dotnet; add it to PATH
export PATH=$PATH:/root/.dotnet

REPO=/repo
SECRETS=/secrets

# set user secrets
cat /secrets/secrets.json | dotnet user-secrets set --project /repo/tests/Agent/IntegrationTests/Shared

cd ${REPO}/tests/Agent/IntegrationTests/IntegrationTests

dotnet test -f netcoreapp3.1 -c Release --filter RuntimeFramework=NetCore --verbosity detailed

echo "sleeping to allow debug"
sleep 60



10 changes: 10 additions & 0 deletions tests/Agent/IntegrationTests/Linux/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.8"
services:
debian:
build: ./distros/debian
command: bash -c "dos2unix /data/run_tests.sh && chmod 755 -R /data && chmod 777 /data/run_tests.sh && /data/run_tests.sh"
volumes:
- ../../../../:/repo
- ./distros/debian:/data
- ../../../../../secrets:/secrets
working_dir: /data

0 comments on commit ee9ceb9

Please sign in to comment.