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

Upgrade Alpine and package versions, increase app version #34

Merged
merged 4 commits into from
Feb 27, 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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-push-container-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
!contains(github.event.pull_request.labels.*.name, 'chore')
steps:
- name: Checkout GIT repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get the application version
id: application-version
run: |
Expand All @@ -30,16 +30,16 @@ jobs:
fi
echo "tag=${image_version}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to container registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
push: true
context: .
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/container-image-build-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout GIT repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Test build
uses: docker/build-push-action@v4.1.0
uses: docker/build-push-action@v5
with:
push: false
load: false
context: .
platforms: linux/amd64, linux/arm64
tags: container-build:test
- name: Test build and export for further validation
uses: docker/build-push-action@v4.1.0
uses: docker/build-push-action@v5
with:
push: false
load: true
context: .
tags: container-build:test
outputs: type=docker,dest=/tmp/container.tar
- name: Upload container image as artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: container-build
path: /tmp/container.tar
Expand All @@ -44,11 +44,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout GIT repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Log in to Github container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build container for functionality test
uses: docker/build-push-action@v4.1.0
uses: docker/build-push-action@v5
with:
push: true
load: false
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
scan:
name: Container vulnerability scan
needs: container-build
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.3.0
with:
image_name: container-build:test
image_artifact_filename: container.tar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ on:
- main
jobs:
pre-commit:
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.3.0
2 changes: 1 addition & 1 deletion .github/workflows/release-from-label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ on:
- closed
jobs:
release:
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.3.0
2 changes: 1 addition & 1 deletion .github/workflows/release-label-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:
- unlabeled
jobs:
release-label-validation:
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.3.0
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM alpine:3.18.5
FROM alpine:3.19.1

LABEL maintainer="Michael Oberdorf IT-Consulting <[email protected]>"
LABEL site.local.program.version="1.3.0"
LABEL site.local.program.version="1.3.1"

RUN apk upgrade --available --no-cache --update \
&& apk add --no-cache --update \
python3=3.11.6-r0 \
py3-pip=23.1.2-r0 \
python3=3.11.8-r0 \
py3-pip=23.3.1-r0 \
# Cleanup APK
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

COPY --chown=root:root /src /

RUN pip3 install --no-cache-dir -r /requirements.txt
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages

EXPOSE 5020/tcp

Expand Down
10 changes: 5 additions & 5 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM alpine:3.18.5
FROM alpine:3.19.1

LABEL maintainer="Michael Oberdorf IT-Consulting <[email protected]>"
LABEL site.local.program.version="1.3.0"
LABEL site.local.program.version="1.3.1"

RUN apk upgrade --available --no-cache --update \
&& apk add --no-cache --update \
python3=3.11.6-r0 \
py3-pip=23.1.2-r0 \
python3=3.11.8-r0 \
py3-pip=23.3.1-r0 \
# Cleanup APK
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

COPY --chown=root:root /src /
COPY --chown=root:root /examples/test.json /test.json

RUN pip3 install --no-cache-dir -r /requirements.txt
RUN pip3 install --no-cache-dir -r /requirements.txt --break-system-packages

EXPOSE 5020/tcp

Expand Down
4 changes: 2 additions & 2 deletions src/app/modbus_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Author: Michael Oberdorf IT-Consulting
Datum: 2020-03-30
Last modified by: Michael Oberdorf
Last modified at: 2023-12-06
Last modified at: 2024-02-27
*************************************************************************** """
import argparse
import json
Expand All @@ -25,7 +25,7 @@

# default configuration file path
default_config_file = "/app/modbus_server.json"
VERSION = "1.3.0"
VERSION = "1.3.1"

log = logging.getLogger()

Expand Down
Loading