9 Commits

Author SHA1 Message Date
7b0109caf4 Merge pull request 'chore(deps): update dependency docker.io/library/golang to v1.21.0' (#6) from renovate/docker.io-library-golang-1.x into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #6
2023-08-16 17:48:01 +00:00
6bfd49947e chore(deps): update dependency docker.io/library/golang to v1.21.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-08-10 15:41:23 +02:00
04e0d98dde chore(deps): update dependency docker.io/library/alpine to v3.18.3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-08-07 23:42:48 +02:00
87ec3349ea fix(ci): execute linter and unit-test in parallel
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-02 23:26:19 +02:00
ad1cf8cbef fix(ci): execute unit tests on dry-run
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-08-02 23:20:38 +02:00
16f1f5e9da fix(ci): execute unit tests
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-02 23:19:08 +02:00
35d35f0b20 chore(deps): update dependency docker.io/library/golang to v1.20.7
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-08-02 00:43:07 +02:00
0375ccbf69 chore(deps): update dependency quay.io/skopeo/stable to v1.13.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-31 01:22:48 +02:00
ce48d6dd0c fix(dockerCompose): mergeLastWinImage
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-26 14:44:12 +02:00
4 changed files with 136 additions and 5 deletions

View File

@ -49,6 +49,87 @@ trigger:
exclude:
- tag
---
kind: pipeline
type: docker
name: unit-test-amd64
clone:
disable: true
platform:
arch: amd64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.2.1
- name: unit-test
commands:
- go test -v ./...
image: docker.io/library/golang:1.21.0
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: unit-test-arm-v7
clone:
disable: true
platform:
arch: arm
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.2.1
- name: unit-test
commands:
- go test -v ./...
image: docker.io/library/golang:1.21.0
trigger:
event:
include:
- pull_request
- push
exclude:
- tag
---
kind: pipeline
type: docker
name: unit-test-arm64
clone:
disable: true
platform:
arch: arm64
steps:
- name: clone
image: git.cryptic.systems/volker.raschek/git:1.2.1
- name: unit-test
commands:
- go test -v ./...
image: docker.io/library/golang:1.21.0
trigger:
event:
include:
- pull_request
- push
exclude:
- tag
---
kind: pipeline
type: docker
@ -59,6 +140,7 @@ clone:
depends_on:
- linter
- unit-test-amd64
platform:
os: linux
@ -125,6 +207,7 @@ clone:
depends_on:
- linter
- unit-test-arm-v7
platform:
os: linux
@ -191,6 +274,7 @@ clone:
depends_on:
- linter
- unit-test-arm64
platform:
os: linux
@ -257,6 +341,7 @@ clone:
depends_on:
- linter
- unit-test-amd64
platform:
os: linux
@ -321,6 +406,7 @@ clone:
depends_on:
- linter
- unit-test-arm-v7
platform:
os: linux
@ -385,6 +471,7 @@ clone:
depends_on:
- linter
- unit-test-arm64
platform:
os: linux
@ -530,7 +617,7 @@ steps:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.13.0
image: quay.io/skopeo/stable:v1.13.1
- name: email-notification
environment:
@ -831,7 +918,7 @@ steps:
from_secret: container_image_registry_user
DEST_CRED_PASSWORD:
from_secret: container_image_registry_password
image: quay.io/skopeo/stable:v1.13.0
image: quay.io/skopeo/stable:v1.13.1
- name: email-notification
environment:

View File

@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.20.6-alpine3.18 AS build
FROM docker.io/library/golang:1.21.0-alpine3.18 AS build
RUN apk add git make
@ -10,7 +10,7 @@ RUN make install \
PREFIX=/usr \
VERSION=${VERSION}
FROM docker.io/library/alpine:3.18.2
FROM docker.io/library/alpine:3.18.3
COPY --from=build /cache /

View File

@ -490,10 +490,19 @@ func (s *Service) mergeLastWinEnvironments(environments []string) {
}
func (s *Service) mergeLastWinImage(image string) {
switch {
case len(s.Image) == 0 && len(image) != 0:
s.Image = image
case len(s.Image) != 0 && len(image) == 0:
fallthrough
case len(s.Image) == 0 && len(image) == 0:
return
default:
if s.Image != image {
s.Image = image
}
}
}
func (s *Service) mergeLastWinExtraHosts(extraHosts []string) {
for _, extraHost := range extraHosts {

View File

@ -735,6 +735,41 @@ func TestService_MergeLastWin(t *testing.T) {
},
},
// Image
{
serviceDeploymentA: &dockerCompose.Service{
Image: "",
},
serviceDeploymentB: &dockerCompose.Service{
Image: "",
},
expectedService: &dockerCompose.Service{
Image: "",
},
},
{
serviceDeploymentA: &dockerCompose.Service{
Image: "HelloWorld",
},
serviceDeploymentB: &dockerCompose.Service{
Image: "FooBar",
},
expectedService: &dockerCompose.Service{
Image: "FooBar",
},
},
{
serviceDeploymentA: &dockerCompose.Service{
Image: "HelloWorld",
},
serviceDeploymentB: &dockerCompose.Service{
Image: "",
},
expectedService: &dockerCompose.Service{
Image: "HelloWorld",
},
},
// Labels
{
serviceDeploymentA: &dockerCompose.Service{