mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-19 21:51:12 +02:00
chore: push latest tag on tag events
This ensures that the latest tag is updated on git tag events. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
parent
e6a16d5572
commit
288d4d0b51
182
.drone.yml
182
.drone.yml
@ -586,11 +586,38 @@ steps:
|
|||||||
- osctl-linux
|
- osctl-linux
|
||||||
- integration-test
|
- integration-test
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
pull: always
|
||||||
|
image: autonomy/build-container:latest
|
||||||
|
commands:
|
||||||
|
- make push
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
- name: docker
|
||||||
|
path: /root/.docker/buildx
|
||||||
|
- name: kube
|
||||||
|
path: /root/.kube
|
||||||
|
- name: dev
|
||||||
|
path: /dev
|
||||||
|
- name: tmp
|
||||||
|
path: /tmp
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- basic-integration
|
||||||
|
|
||||||
- name: push-latest
|
- name: push-latest
|
||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-latest
|
- make push-latest
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -609,10 +636,9 @@ steps:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
path: /tmp
|
path: /tmp
|
||||||
when:
|
when:
|
||||||
branch:
|
ref:
|
||||||
- master
|
- refs/heads/master
|
||||||
event:
|
- refs/tags/v0.4.0*
|
||||||
- push
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- basic-integration
|
- basic-integration
|
||||||
|
|
||||||
@ -1247,11 +1273,38 @@ steps:
|
|||||||
- osctl-linux
|
- osctl-linux
|
||||||
- integration-test
|
- integration-test
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
pull: always
|
||||||
|
image: autonomy/build-container:latest
|
||||||
|
commands:
|
||||||
|
- make push
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
- name: docker
|
||||||
|
path: /root/.docker/buildx
|
||||||
|
- name: kube
|
||||||
|
path: /root/.kube
|
||||||
|
- name: dev
|
||||||
|
path: /dev
|
||||||
|
- name: tmp
|
||||||
|
path: /tmp
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- basic-integration
|
||||||
|
|
||||||
- name: push-latest
|
- name: push-latest
|
||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-latest
|
- make push-latest
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -1270,10 +1323,9 @@ steps:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
path: /tmp
|
path: /tmp
|
||||||
when:
|
when:
|
||||||
branch:
|
ref:
|
||||||
- master
|
- refs/heads/master
|
||||||
event:
|
- refs/tags/v0.4.0*
|
||||||
- push
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- basic-integration
|
- basic-integration
|
||||||
|
|
||||||
@ -2036,11 +2088,38 @@ steps:
|
|||||||
- osctl-linux
|
- osctl-linux
|
||||||
- integration-test
|
- integration-test
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
pull: always
|
||||||
|
image: autonomy/build-container:latest
|
||||||
|
commands:
|
||||||
|
- make push
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
- name: docker
|
||||||
|
path: /root/.docker/buildx
|
||||||
|
- name: kube
|
||||||
|
path: /root/.kube
|
||||||
|
- name: dev
|
||||||
|
path: /dev
|
||||||
|
- name: tmp
|
||||||
|
path: /tmp
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- basic-integration
|
||||||
|
|
||||||
- name: push-latest
|
- name: push-latest
|
||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-latest
|
- make push-latest
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -2059,10 +2138,9 @@ steps:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
path: /tmp
|
path: /tmp
|
||||||
when:
|
when:
|
||||||
branch:
|
ref:
|
||||||
- master
|
- refs/heads/master
|
||||||
event:
|
- refs/tags/v0.4.0*
|
||||||
- push
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- basic-integration
|
- basic-integration
|
||||||
|
|
||||||
@ -2205,7 +2283,6 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-edge
|
- make push-edge
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -2856,11 +2933,38 @@ steps:
|
|||||||
- osctl-linux
|
- osctl-linux
|
||||||
- integration-test
|
- integration-test
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
pull: always
|
||||||
|
image: autonomy/build-container:latest
|
||||||
|
commands:
|
||||||
|
- make push
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
- name: docker
|
||||||
|
path: /root/.docker/buildx
|
||||||
|
- name: kube
|
||||||
|
path: /root/.kube
|
||||||
|
- name: dev
|
||||||
|
path: /dev
|
||||||
|
- name: tmp
|
||||||
|
path: /tmp
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- basic-integration
|
||||||
|
|
||||||
- name: push-latest
|
- name: push-latest
|
||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-latest
|
- make push-latest
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -2879,10 +2983,9 @@ steps:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
path: /tmp
|
path: /tmp
|
||||||
when:
|
when:
|
||||||
branch:
|
ref:
|
||||||
- master
|
- refs/heads/master
|
||||||
event:
|
- refs/tags/v0.4.0*
|
||||||
- push
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- basic-integration
|
- basic-integration
|
||||||
|
|
||||||
@ -3025,7 +3128,6 @@ steps:
|
|||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-edge
|
- make push-edge
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -3676,11 +3778,38 @@ steps:
|
|||||||
- osctl-linux
|
- osctl-linux
|
||||||
- integration-test
|
- integration-test
|
||||||
|
|
||||||
|
- name: push
|
||||||
|
pull: always
|
||||||
|
image: autonomy/build-container:latest
|
||||||
|
commands:
|
||||||
|
- make push
|
||||||
|
environment:
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run
|
||||||
|
- name: docker
|
||||||
|
path: /root/.docker/buildx
|
||||||
|
- name: kube
|
||||||
|
path: /root/.kube
|
||||||
|
- name: dev
|
||||||
|
path: /dev
|
||||||
|
- name: tmp
|
||||||
|
path: /tmp
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
exclude:
|
||||||
|
- pull_request
|
||||||
|
depends_on:
|
||||||
|
- basic-integration
|
||||||
|
|
||||||
- name: push-latest
|
- name: push-latest
|
||||||
pull: always
|
pull: always
|
||||||
image: autonomy/build-container:latest
|
image: autonomy/build-container:latest
|
||||||
commands:
|
commands:
|
||||||
- make login
|
|
||||||
- make push-latest
|
- make push-latest
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PASSWORD:
|
DOCKER_PASSWORD:
|
||||||
@ -3699,10 +3828,9 @@ steps:
|
|||||||
- name: tmp
|
- name: tmp
|
||||||
path: /tmp
|
path: /tmp
|
||||||
when:
|
when:
|
||||||
branch:
|
ref:
|
||||||
- master
|
- refs/heads/master
|
||||||
event:
|
- refs/tags/v0.4.0*
|
||||||
- push
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- basic-integration
|
- basic-integration
|
||||||
|
|
||||||
|
6
Makefile
6
Makefile
@ -205,15 +205,15 @@ capi: ## Deploys Cluster API to the basic integration cluster.
|
|||||||
login: ## Logs in to the configured container registry.
|
login: ## Logs in to the configured container registry.
|
||||||
@docker login --username "$(DOCKER_USERNAME)" --password "$(DOCKER_PASSWORD)" $(REGISTRY)
|
@docker login --username "$(DOCKER_USERNAME)" --password "$(DOCKER_PASSWORD)" $(REGISTRY)
|
||||||
|
|
||||||
push-%: login ## Pushes the installer, and talos images to the configured container registry with the specified tag (e.g. push-latest).
|
push: login ## Pushes the installer, and talos images to the configured container registry with the generated tag.
|
||||||
@docker push autonomy/installer:$(TAG)
|
@docker push autonomy/installer:$(TAG)
|
||||||
@docker push autonomy/talos:$(TAG)
|
@docker push autonomy/talos:$(TAG)
|
||||||
ifeq ($(BRANCH),master)
|
|
||||||
|
push-%: login ## Pushes the installer, and talos images to the configured container registry with the specified tag (e.g. push-latest).
|
||||||
@docker tag autonomy/installer:$(TAG) autonomy/installer:$*
|
@docker tag autonomy/installer:$(TAG) autonomy/installer:$*
|
||||||
@docker tag autonomy/talos:$(TAG) autonomy/talos:$*
|
@docker tag autonomy/talos:$(TAG) autonomy/talos:$*
|
||||||
@docker push autonomy/installer:$*
|
@docker push autonomy/installer:$*
|
||||||
@docker push autonomy/talos:$*
|
@docker push autonomy/talos:$*
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean: ## Cleans up all artifacts.
|
clean: ## Cleans up all artifacts.
|
||||||
|
@ -209,6 +209,26 @@ local coverage = {
|
|||||||
depends_on: [unit_tests.name],
|
depends_on: [unit_tests.name],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
local push = {
|
||||||
|
name: 'push',
|
||||||
|
image: 'autonomy/build-container:latest',
|
||||||
|
pull: 'always',
|
||||||
|
environment: {
|
||||||
|
DOCKER_USERNAME: { from_secret: 'docker_username' },
|
||||||
|
DOCKER_PASSWORD: { from_secret: 'docker_password' },
|
||||||
|
},
|
||||||
|
commands: ['make push'],
|
||||||
|
volumes: volumes.ForStep(),
|
||||||
|
when: {
|
||||||
|
event: {
|
||||||
|
exclude: [
|
||||||
|
'pull_request',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
depends_on: [basic_integration.name],
|
||||||
|
};
|
||||||
|
|
||||||
local push_latest = {
|
local push_latest = {
|
||||||
name: 'push-latest',
|
name: 'push-latest',
|
||||||
image: 'autonomy/build-container:latest',
|
image: 'autonomy/build-container:latest',
|
||||||
@ -217,14 +237,12 @@ local push_latest = {
|
|||||||
DOCKER_USERNAME: { from_secret: 'docker_username' },
|
DOCKER_USERNAME: { from_secret: 'docker_username' },
|
||||||
DOCKER_PASSWORD: { from_secret: 'docker_password' },
|
DOCKER_PASSWORD: { from_secret: 'docker_password' },
|
||||||
},
|
},
|
||||||
commands: ['make login', 'make push-latest'],
|
commands: ['make push-latest'],
|
||||||
volumes: volumes.ForStep(),
|
volumes: volumes.ForStep(),
|
||||||
when: {
|
when: {
|
||||||
branch: [
|
ref: [
|
||||||
'master',
|
'refs/heads/master',
|
||||||
],
|
'refs/tags/v0.4.0*',
|
||||||
event: [
|
|
||||||
'push',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
depends_on: [basic_integration.name],
|
depends_on: [basic_integration.name],
|
||||||
@ -258,6 +276,7 @@ local default_steps = [
|
|||||||
unit_tests_race,
|
unit_tests_race,
|
||||||
coverage,
|
coverage,
|
||||||
basic_integration,
|
basic_integration,
|
||||||
|
push,
|
||||||
push_latest,
|
push_latest,
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -319,7 +338,6 @@ local conformance_aws = Step("conformance-aws", target="e2e-integration", depend
|
|||||||
local conformance_azure = Step("conformance-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={PLATFORM: "azure", CONFORMANCE: "run"});
|
local conformance_azure = Step("conformance-azure", target="e2e-integration", depends_on=[capi, push_image_azure], environment={PLATFORM: "azure", CONFORMANCE: "run"});
|
||||||
local conformance_gcp = Step("conformance-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={PLATFORM: "gcp", CONFORMANCE: "run"});
|
local conformance_gcp = Step("conformance-gcp", target="e2e-integration", depends_on=[capi, push_image_gcp], environment={PLATFORM: "gcp", CONFORMANCE: "run"});
|
||||||
|
|
||||||
|
|
||||||
local push_edge = {
|
local push_edge = {
|
||||||
name: 'push-edge',
|
name: 'push-edge',
|
||||||
image: 'autonomy/build-container:latest',
|
image: 'autonomy/build-container:latest',
|
||||||
@ -328,7 +346,7 @@ local push_edge = {
|
|||||||
DOCKER_USERNAME: { from_secret: 'docker_username' },
|
DOCKER_USERNAME: { from_secret: 'docker_username' },
|
||||||
DOCKER_PASSWORD: { from_secret: 'docker_password' },
|
DOCKER_PASSWORD: { from_secret: 'docker_password' },
|
||||||
},
|
},
|
||||||
commands: ['make login', 'make push-edge'],
|
commands: ['make push-edge'],
|
||||||
volumes: volumes.ForStep(),
|
volumes: volumes.ForStep(),
|
||||||
when: {
|
when: {
|
||||||
cron: [
|
cron: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user