The docker configuration for running integration tests locally needs to be updated.
Parent Issue: Update the drug dictionary to .Net 3.1 #54
docker-compose.yml
In the api service, add a new top-level volumes property:
volumes:
# Project root
- ../..:/app
# Integration configuration files we don't want in the source tree.
- ../../integration-tests/docker-drug-api/api/runtime/appsettings.inttest.json:/app/src/NCI.OCPL.Api.DrugDictionary/appsettings.inttest.json
- ../../integration-tests/docker-drug-api/api/runtime/hosting.json:/app/src/NCI.OCPL.Api.DrugDictionary/hosting.json
# Use the user's existing GitHub credentials
- ~/.nuget/NuGet/NuGet.Config:/root/.nuget/NuGet/NuGet.Config
API service's Dockerfile
Starting with FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env, remove everything down to the dotnet publish line.
In the "# Build runtime image" section:
Change the FROM line to FROM mcr.microsoft.com/dotnet/core/sdk:3.1
Remove COPY commands.
Change the ENTRYPOINT to ENTRYPOINT ["dotnet", "watch", "--project", "src/NCI.OCPL.Api.DrugDictionary", "run"]
integration-tests/README.md
Add a new Step 2, Have NuGet configured correctly (See the "NuGet Configuration" topic below).
Before the "Notes" section, add a new block:
## NuGet Configuraiton
1. Create a GitHub [Personal Access token](https://github.com/settings/tokens/) with a descriptive name such as "NuGet package".
2. Assign the token the `packages:read` scope and save it.
3. Copy the token's value.
4. If you have the dotnet command line tool installed, run this command (it's all one line), substituting your username and token value.
```bash
dotnet nuget add source https://nuget.pkg.github.com/nciocpl/index.json --name github --username <YOUR_GITHUB_USERNAME> --password <THE_TOKEN_VALUE> --store-password-in-clear-text
If you do NOT have the dotnet command line tool installed:
Create ~/.nuget/NuGet/NuGet.Config.
Put these lines in the file (be sure to substitute your username and toke value)
A side-effect of mapping the project directory into a Docker container is that the integration appsettings and hosting configuration files are copied into the source tree.
Add these lines at the end of the file
# Files mapped by integration tests
src/NCI.OCPL.Api.DrugDictionary/appsettings.inttest.json
src/NCI.OCPL.Api.DrugDictionary/hosting.json
The docker configuration for running integration tests locally needs to be updated.
Parent Issue: Update the drug dictionary to .Net 3.1 #54
docker-compose.yml
In the
api
service, add a new top-levelvolumes
property:API service's
Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
, remove everything down to thedotnet publish
line.FROM
line toFROM mcr.microsoft.com/dotnet/core/sdk:3.1
COPY
commands.ENTRYPOINT
toENTRYPOINT ["dotnet", "watch", "--project", "src/NCI.OCPL.Api.DrugDictionary", "run"]
integration-tests/README.md
Have NuGet configured correctly (See the "NuGet Configuration" topic below).
~/.nuget/NuGet/NuGet.Config
.Update
.gitignore
A side-effect of mapping the project directory into a Docker container is that the integration appsettings and hosting configuration files are copied into the source tree.
Add these lines at the end of the file
Sub-Tasks
Notes