Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker build before release #42

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/release-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'MockServer/**'

env:
IMAGES: raaedge.azurecr.io/opcua-test-server
IMAGES: ${{ secrets.RAAEDGE_LOGIN_SERVER }}/opcua-test-server
COVERAGE_FOLDER: Coverage

jobs:
Expand All @@ -32,6 +32,22 @@ jobs:
fetch_all_tags: true
dry_run: ${{ env.RELEASE != 'true' }}
release_branches: ${{ inputs.branches }}

- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: false
no-cache: true
context: .
file: 'MockServer/Dockerfile.Server'
secrets: |
NUGET_GITHUB_PACKAGES_USERNAME=${{ secrets.NUGET_GITHUB_PACKAGES_USERNAME }}
NUGET_GITHUB_PACKAGES_TOKEN=${{ secrets.NUGET_GITHUB_PACKAGES_TOKEN }}
load: true
platforms: linux/amd64
tags: image:local
build-args: |
BUILD_VERSION=${{ steps.tag.outputs.new_version }}

- name: Apply version tag to Docker images
id: references
Expand Down
4 changes: 2 additions & 2 deletions MockServer/Dockerfile.Client
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.12.0-slim

COPY client.py .
COPY MockServer/client.py .

RUN pip install asyncua

CMD [ "python", "./client.py" ]
CMD [ "python", "./client.py" ]
6 changes: 3 additions & 3 deletions MockServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ docker run --name opcuaserver --network my-net -p 4840:4840 docker.io/library/op
docker run --network my-net docker.io/library/opcua-test-client
````

Config for OPCUA connector:
Config for OPCUA connector (the host used in the serverUrl must match the name given to the Docker container):
````json
{
"serverUrl": "opc.tcp://opcua-test-server:4840/freeopcua/server/",
"serverUrl": "opc.tcp://opcuaserver:4840/freeopcua/server/",
"publishingIntervalSeconds": 1.0,
"nodes": [
{
Expand All @@ -22,4 +22,4 @@ Config for OPCUA connector:
}
]
}
````
````
Loading