Skip to content

Commit

Permalink
Deploy 'latest' tag to docker hub (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariomac authored Sep 5, 2023
1 parent b74116e commit d3586d4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ local onMain = {
event: ['push'],
};

local onTagOrMain = {
event: ['push', 'tag'],
};

local pipeline(name) = {
kind: 'pipeline',
name: name,
Expand Down Expand Up @@ -63,7 +59,14 @@ local beyla() = pipeline('beyla') {
},
},
] + [
buildx('tagged', 'beyla', true, 'latest') {
// on each new version, it tags version `a.b.c` and `a.b`
buildx('tagged', 'beyla', true, '') {
when: onTag,
},
] + [
// on each new version, it tags version `latest`,
// equivalent to the versions from the previous section
buildx('latest', 'beyla', false, 'latest') {
when: onTag,
},
] + [
Expand Down
21 changes: 20 additions & 1 deletion .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ steps:
- linux/arm64
- linux/amd64
repo: grafana/beyla
tags: ""
username:
from_secret: docker_username
when:
event:
- tag
- image: thegeeklab/drone-docker-buildx:24
name: beyla-latest-docker-buildx
privileged: true
settings:
auto_tag: false
dockerfile: Dockerfile
dry_run: false
password:
from_secret: docker_password
platforms:
- linux/arm64
- linux/amd64
repo: grafana/beyla
tags: latest
username:
from_secret: docker_username
Expand Down Expand Up @@ -77,6 +96,6 @@ kind: secret
name: docker_password
---
kind: signature
hmac: 596f1c15aa7a0918c5983b390801fe734d0655097fc009cbe1083c836e533833
hmac: b2d0a0ed30050f8632ab6331f58a4d147c8e155e5f28a51de72a1d3b3a46759e

...

0 comments on commit d3586d4

Please sign in to comment.