Skip to content

Commit

Permalink
use make for manifest (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
galal-hussein authored Jul 13, 2020
1 parent f6b5c63 commit cc95ce8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,18 @@ platform:

steps:
- name: manifest
image: plugins/manifest:1.0.2
settings:
username:
image: ranchertest/build-base:v1.14.2
volumes:
- name: docker
path: /var/run/docker.sock
environment:
DOCKER_USERNAME:
from_secret: docker_username
password:
DOCKER_PASSWORD:
from_secret: docker_password
platforms:
- linux/amd64
target: "rancher/rke2-runtime:${DRONE_TAG}"
template: "rancher/rke2-runtime:${DRONE_TAG}-ARCH"
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- DRONE_TAG=${DRONE_TAG} make image-manifest
when:
instance:
- drone-publish.rancher.io
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,10 @@ k8s-image-scan:
k8s-image-publish: k8s-image
docker push ranchertest/kubernetes:${VERSION}-${GOARCH}

# currently works only with amd64
image-manifest:
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create --amend ${REPO}/rke2-runtime:${VERSION} ${REPO}/rke2-runtime:${VERSION}-${GOARCH}
DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push ${REPO}/rke2-runtime:${VERSION}

help: ## this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

0 comments on commit cc95ce8

Please sign in to comment.