deploy on push
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
when:
|
when:
|
||||||
event: [ tag ]
|
event: [ PUSH ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build:
|
build:
|
||||||
@@ -8,12 +8,12 @@ steps:
|
|||||||
repo: ${FORGE_NAME}/${CI_REPO}
|
repo: ${FORGE_NAME}/${CI_REPO}
|
||||||
registry:
|
registry:
|
||||||
from_secret: local_registry
|
from_secret: local_registry
|
||||||
tags: latest,${CI_COMMIT_TAG}
|
tags: latest,${CI_COMMIT_SHA}
|
||||||
username:
|
username:
|
||||||
from_secret: local_username
|
from_secret: local_username
|
||||||
password:
|
password:
|
||||||
from_secret: local_password
|
from_secret: local_password
|
||||||
build-args: "BASE_URL=https://minimal-setups.de, RELEASETAG=${CI_COMMIT_TAG}"
|
build-args: "BASE_URL=https://minimal-setups.de, RELEASETAG=${CI_COMMIT_SHA}"
|
||||||
|
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable
|
- export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable
|
||||||
- HOME=/home/`id -nu`
|
- HOME=/home/`id -nu`
|
||||||
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_TAG}"
|
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
|
||||||
- |
|
- |
|
||||||
trivy image \
|
trivy image \
|
||||||
--server $TRIVY_URL \
|
--server $TRIVY_URL \
|
||||||
@@ -39,7 +39,7 @@ steps:
|
|||||||
--format cyclonedx \
|
--format cyclonedx \
|
||||||
--scanners license \
|
--scanners license \
|
||||||
--output /tmp/sbom.xml \
|
--output /tmp/sbom.xml \
|
||||||
$FORGE_NAME/$CI_REPO:$CI_COMMIT_TAG
|
$FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA
|
||||||
- cat /tmp/sbom.xml
|
- cat /tmp/sbom.xml
|
||||||
- |
|
- |
|
||||||
curl -X "POST" \
|
curl -X "POST" \
|
||||||
@@ -57,7 +57,7 @@ steps:
|
|||||||
KUBE_CONFIG_CONTENT:
|
KUBE_CONFIG_CONTENT:
|
||||||
from_secret: kube_config
|
from_secret: kube_config
|
||||||
commands:
|
commands:
|
||||||
- export IMAGE_TAG=$CI_COMMIT_TAG
|
- export IMAGE_TAG=$CI_COMMIT_SHA
|
||||||
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
||||||
- export KUBECONFIG=/tmp/kubeconfig
|
- export KUBECONFIG=/tmp/kubeconfig
|
||||||
- ./deployment/deploy.sh
|
- ./deployment/deploy.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user