chore: push edge tag on succesful conformance

This adds a step to the conformance pipeline that pushes all containers
with the tag "edge." This Will allow us to start using and edge
"channel" for upgrades.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard 2019-11-27 15:39:53 +00:00
parent a6ab1ec2a5
commit 70b9186be0
3 changed files with 100 additions and 22 deletions

View File

@ -386,13 +386,13 @@ steps:
- osctl-linux
- integration-test
- name: push
- name: push-latest
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push
- make push-latest
environment:
DOCKER_PASSWORD:
from_secret: docker_password
@ -841,13 +841,13 @@ steps:
- osctl-linux
- integration-test
- name: push
- name: push-latest
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push
- make push-latest
environment:
DOCKER_PASSWORD:
from_secret: docker_password
@ -1445,13 +1445,13 @@ steps:
- osctl-linux
- integration-test
- name: push
- name: push-latest
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push
- make push-latest
environment:
DOCKER_PASSWORD:
from_secret: docker_password
@ -1628,6 +1628,34 @@ steps:
- capi
- push-image-gcp
- name: push-edge
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push-edge
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
volumes:
- name: dockersock
path: /var/run
- name: dev
path: /dev
- name: tmp
path: /tmp
when:
event:
exclude:
- pull_request
- promote
depends_on:
- conformance-aws
- conformance-gcp
services:
- name: docker
image: docker:19.03-dind
@ -2051,13 +2079,13 @@ steps:
- osctl-linux
- integration-test
- name: push
- name: push-latest
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push
- make push-latest
environment:
DOCKER_PASSWORD:
from_secret: docker_password
@ -2234,6 +2262,34 @@ steps:
- capi
- push-image-gcp
- name: push-edge
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push-edge
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
volumes:
- name: dockersock
path: /var/run
- name: dev
path: /dev
- name: tmp
path: /tmp
when:
event:
exclude:
- pull_request
- promote
depends_on:
- conformance-aws
- conformance-gcp
services:
- name: docker
image: docker:19.03-dind
@ -2657,13 +2713,13 @@ steps:
- osctl-linux
- integration-test
- name: push
- name: push-latest
pull: always
image: autonomy/build-container:latest
commands:
- make gitmeta
- make login
- make push
- make push-latest
environment:
DOCKER_PASSWORD:
from_secret: docker_password
@ -2828,7 +2884,7 @@ steps:
- image-gcp
- image-azure
- image-aws
- push
- push-latest
services:
- name: docker

View File

@ -411,15 +411,14 @@ images:
login:
@docker login --username "$(DOCKER_USERNAME)" --password "$(DOCKER_PASSWORD)"
.PHONY: push
push: gitmeta login
push-%: gitmeta login
@docker push autonomy/installer:$(TAG)
@docker push autonomy/talos:$(TAG)
ifeq ($(BRANCH),master)
@docker tag autonomy/installer:$(TAG) autonomy/installer:latest
@docker tag autonomy/talos:$(TAG) autonomy/talos:latest
@docker push autonomy/installer:latest
@docker push autonomy/talos:latest
@docker tag autonomy/installer:$(TAG) autonomy/installer:$*
@docker tag autonomy/talos:$(TAG) autonomy/talos:$*
@docker push autonomy/installer:$*
@docker push autonomy/talos:$*
endif
.PHONY: clean

View File

@ -166,15 +166,15 @@ local coverage = {
depends_on: [unit_tests.name],
};
local push = {
name: 'push',
local push_latest = {
name: 'push-latest',
image: 'autonomy/build-container:latest',
pull: 'always',
environment: {
DOCKER_USERNAME: { from_secret: 'docker_username' },
DOCKER_PASSWORD: { from_secret: 'docker_password' },
},
commands: ['make gitmeta', 'make login', 'make push'],
commands: ['make gitmeta', 'make login', 'make push-latest'],
volumes: volumes.ForStep(),
when: {
event: {
@ -210,7 +210,7 @@ local default_steps = [
unit_tests_race,
coverage,
basic_integration,
push,
push_latest,
];
local default_trigger = {
@ -281,6 +281,28 @@ local conformance_aws = Step("conformance-aws", "e2e-integration", depends_on=[c
local conformance_azure = Step("conformance-azure", "e2e-integration", depends_on=[capi, push_image_azure], environment={PLATFORM: "azure", CONFORMANCE: "run"});
local conformance_gcp = Step("conformance-gcp", "e2e-integration", depends_on=[capi, push_image_gcp], environment={PLATFORM: "gcp", CONFORMANCE: "run"});
local push_edge = {
name: 'push-edge',
image: 'autonomy/build-container:latest',
pull: 'always',
environment: {
DOCKER_USERNAME: { from_secret: 'docker_username' },
DOCKER_PASSWORD: { from_secret: 'docker_password' },
},
commands: ['make gitmeta', 'make login', 'make push-edge'],
volumes: volumes.ForStep(),
when: {
event: {
exclude: [
'pull_request',
'promote',
],
},
},
depends_on: [conformance_aws.name, /*conformance_azure.name,*/ conformance_gcp.name],
};
local conformance_steps = default_steps + [
capi,
image_aws,
@ -292,6 +314,7 @@ local conformance_steps = default_steps + [
conformance_aws,
//conformance_azure,
conformance_gcp,
push_edge,
];
local conformance_trigger = {
@ -347,7 +370,7 @@ local release = {
when: {
event: ['tag'],
},
depends_on: [kernel.name, iso.name, image_gcp.name, image_azure.name, image_aws.name, push.name]
depends_on: [kernel.name, iso.name, image_gcp.name, image_azure.name, image_aws.name, push_latest.name]
};
local release_steps = default_steps + [