ci: build and push with kaniko
This commit is contained in:
parent
894a195f41
commit
cec441a9ab
1 changed files with 11 additions and 12 deletions
|
|
@ -4,17 +4,16 @@ when:
|
|||
|
||||
steps:
|
||||
- name: build-and-push
|
||||
image: registry.nxtgauge.com/docker:28-cli
|
||||
environment:
|
||||
REGISTRY_HOSTPORT: registry.nxtgauge.com
|
||||
REGISTRY_USERNAME:
|
||||
image: registry.nxtgauge.com/kaniko:2.1.1
|
||||
settings:
|
||||
registry: registry.nxtgauge.com
|
||||
username:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
password:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
commands:
|
||||
- test -n "${REGISTRY_HOSTPORT:-}" || (echo "missing REGISTRY_HOSTPORT" && exit 1)
|
||||
- test -n "${REGISTRY_USERNAME:-}" || (echo "missing REGISTRY_USERNAME" && exit 1)
|
||||
- test -n "${REGISTRY_PASSWORD:-}" || (echo "missing REGISTRY_PASSWORD" && exit 1)
|
||||
- echo "$REGISTRY_PASSWORD" | docker login "$REGISTRY_HOSTPORT" -u "$REGISTRY_USERNAME" --password-stdin
|
||||
- docker build -t "${REGISTRY_HOSTPORT}/nxtgauge-ai-assistant" -f Dockerfile .
|
||||
- docker push "${REGISTRY_HOSTPORT}/nxtgauge-ai-assistant"
|
||||
repo: nxtgauge-ai-assistant
|
||||
tags:
|
||||
- ${CI_COMMIT_SHA}
|
||||
- ${CI_COMMIT_BRANCH}-latest
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue