Skip to content

Commit

Permalink
Merge pull request #4 from codecentric/arm-testing
Browse files Browse the repository at this point in the history
Fixes related to testing on M1/ARM Mac
  • Loading branch information
denniseffing committed Apr 22, 2022
2 parents 682bf0b + a9a939d commit 55a8c1c
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 22 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
version:
required: true
type: string
platforms:
required: false
type: string
default: "linux/amd64,linux/arm64"
working-dir:
required: true
type: string
Expand All @@ -24,28 +28,32 @@ jobs:
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v2
- name: Download artifact
- name: 📦 Download artifact
uses: actions/download-artifact@v2
if: inputs.artifact-name && inputs.artifact-path
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.artifact-path }}
- name: 🦤 Set up qemu
uses: docker/setup-qemu-action@v1
- name: 🐳 Set up docker buildx
uses: docker/setup-buildx-action@v1
- name: 🧰 Build container image
if: github.ref != 'refs/heads/main' || inputs.version == 'dev'
working-directory: ${{ inputs.working-dir }}
run: |
docker build \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:latest" \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:$(git rev-parse --short HEAD)" \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:${{ inputs.version }}" .
run: docker buildx build --platform "${{ inputs.platforms }}" .
- name: 🔑 Login to GitHub Container registry
if: github.ref == 'refs/heads/main' && inputs.version != 'dev'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ⬆️ Push container image
- name: 🧰 ⬆️ Build and push container image
if: github.ref == 'refs/heads/main' && inputs.version != 'dev'
working-directory: ${{ inputs.working-dir }}
run: |
docker push "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:latest"
docker push "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:$(git rev-parse --short HEAD)"
docker push "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:${{ inputs.version }}"
docker buildx build --push --platform "${{ inputs.platforms }}" \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:latest" \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:$(git rev-parse --short HEAD)" \
-t "ghcr.io/codecentric/habitcentric/${{ inputs.image-name }}:${{ inputs.version }}" .
4 changes: 3 additions & 1 deletion services/habit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ ext {
springfox : '2.9.2',
liquibase : '4.4.3',
pactProvider : '3.6.12',
springCloudVersion: 'Greenwich.SR6'
springCloudVersion: 'Greenwich.SR6',
jna : '5.8.0'
]
}
// override the version the spring boot dependency-management plugin would enforce
ext['junit-jupiter.version'] = versions.junitJupiter
ext['jna.version'] = versions.jna // Required for Docker on ARM

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
Expand Down
2 changes: 1 addition & 1 deletion services/habit/helm/habit/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Return the proper habitcentric init image name
{{- define "habit.init.image" -}}
{{- $registryName := .Values.init.image.registry -}}
{{- $repositoryName := .Values.init.image.repository -}}
{{- $tag := .Values.image.tag | toString -}}
{{- $tag := .Values.init.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Expand Down
6 changes: 3 additions & 3 deletions services/report/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ plugins {
id("com.github.jk1.dependency-license-report") version "1.16"
id("org.springframework.boot") version "2.2.5.RELEASE"
id("com.diffplug.spotless") version "5.14.3"
kotlin("jvm") version "1.5.30"
kotlin("kapt") version "1.5.30"
kotlin("plugin.spring") version "1.5.30"
kotlin("jvm") version "1.6.10"
kotlin("kapt") version "1.6.10"
kotlin("plugin.spring") version "1.6.10"
// we should switch to the plugin but enabling it causes warnings for the openapi generator
//id("io.freefair.lombok") version "6.2.0"
}
Expand Down
4 changes: 3 additions & 1 deletion services/track/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ ext {
testcontainers : '1.15.3',
reflections : '0.9.12',
postgresql : '42.2.23',
springCloudVersion: 'Greenwich.SR6'
springCloudVersion: 'Greenwich.SR6',
jna : '5.8.0'
]
}
// override the version the spring boot dependency-management plugin would enforce
ext['junit-jupiter.version'] = versions.junitJupiter
ext['jna.version'] = versions.jna // Required for Docker on ARM

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
Expand Down
2 changes: 1 addition & 1 deletion services/track/helm/track/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Return the proper habitcentric init image name
{{- define "track.init.image" -}}
{{- $registryName := .Values.init.image.registry -}}
{{- $repositoryName := .Values.init.image.repository -}}
{{- $tag := .Values.image.tag | toString -}}
{{- $tag := .Values.init.image.tag | toString -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
Expand Down
2 changes: 1 addition & 1 deletion test/lpt-locust/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM locustio/locust:1.2.3
FROM locustio/locust:2.8.4
RUN pip3 install kubernetes
COPY src /locust-config
ENV LOCUST_LOCUSTFILE /locust-config/locustfile.py
10 changes: 6 additions & 4 deletions test/lpt-locust/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ click==8.0.4
ConfigArgParse==1.5.3
Flask==2.0.3
Flask-BasicAuth==0.2.0
Flask-Cors==3.0.10
gevent==21.12.0
geventhttpclient==1.5.3
google-auth==2.6.0
google-auth==2.6.2
greenlet==1.1.2
idna==3.3
itsdangerous==2.1.0
itsdangerous==2.1.1
Jinja2==3.0.3
kubernetes==11.0.0
locust==1.2.3
kubernetes==23.3.0
MarkupSafe==2.1.0
msgpack==1.0.3
oauthlib==3.2.0
Expand All @@ -28,8 +28,10 @@ PyYAML==6.0
pyzmq==22.3.0
requests==2.27.1
requests-oauthlib==1.3.1
roundrobin==0.0.2
rsa==4.8
six==1.16.0
typing_extensions==4.1.1
urllib3==1.26.8
websocket-client==1.3.1
Werkzeug==2.0.3
Expand Down

0 comments on commit 55a8c1c

Please sign in to comment.