build: Include semantic release (WIP)
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
1ab1c10f37
commit
ec276c088d
77
.drone.yml
77
.drone.yml
@ -1,12 +1,51 @@
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Container image
|
||||
name: Container & Helm chart
|
||||
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
steps:
|
||||
- name: Build & publish (Harbor)
|
||||
- name: Semantic Release (Dry-run)
|
||||
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
apt-get update
|
||||
- |
|
||||
apt-get install -y --no-install-recommends \
|
||||
git-core \
|
||||
ca-certificates
|
||||
- |
|
||||
npm install \
|
||||
semantic-release \
|
||||
@semantic-release/commit-analyzer \
|
||||
@semantic-release/exec \
|
||||
- |
|
||||
export GIT_CREDENTIALS=$${GIT_USERNAME}:$${GIT_APIKEY}
|
||||
- |
|
||||
npx semantic-release \
|
||||
--package @semantic-release/exec \
|
||||
--package semantic-release \
|
||||
--branches ${DRONE_BRANCH} \
|
||||
--tag-format "v\$${version}" \
|
||||
--dry-run \
|
||||
--plugins @semantic-release/commit-analyzer,@semantic-release/exec \
|
||||
--analyzeCommits @semantic-release/commit-analyzer \
|
||||
--verifyRelease @semantic-release/exec \
|
||||
--verifyReleaseCmd 'echo "$${nextRelease.version}" > .version'
|
||||
environment:
|
||||
GIT_APIKEY:
|
||||
from_secret: git_apikey
|
||||
GIT_USERNAME: djpbessems
|
||||
|
||||
- name: Build & publish container image (Harbor)
|
||||
depends_on:
|
||||
- clone
|
||||
- Semantic Release (Dry-run)
|
||||
image: plugins/kaniko
|
||||
pull: always
|
||||
context: .
|
||||
settings:
|
||||
repo: bv11-cr01.bessems.eu/library/json-server
|
||||
@ -16,10 +55,12 @@ steps:
|
||||
from_secret: harbor_username
|
||||
password:
|
||||
from_secret: harbor_password
|
||||
- name: Build & publish (Dockerhub)
|
||||
|
||||
- name: Build & publish container image (docker.io)
|
||||
depends_on:
|
||||
- clone
|
||||
- Semantic Release (Dry-run)
|
||||
image: plugins/kaniko
|
||||
pull: always
|
||||
context: .
|
||||
settings:
|
||||
repo: index.docker.io/djpbessems/json-server
|
||||
@ -30,15 +71,16 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Helm chart (Gitea)
|
||||
|
||||
steps:
|
||||
- name: Package & publish
|
||||
- name: Package & publish helm chart (Gitea)
|
||||
depends_on:
|
||||
- Semantic Release (Dry-run)
|
||||
image: bv11-cr01.bessems.eu/proxy/alpine/helm
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
echo '$MIRROR/alpine/edge/community' >> /etc/apk/repositories
|
||||
apk update && apk add -y \
|
||||
yq
|
||||
- |
|
||||
helm package ./charts/json-server
|
||||
- |
|
||||
@ -57,3 +99,14 @@ steps:
|
||||
GIT_APIKEY:
|
||||
from_secret: git_apikey
|
||||
GIT_USERNAME: djpbessems
|
||||
|
||||
- name: Semantic Release
|
||||
depends_on:
|
||||
- Build & publish container image (Harbor)
|
||||
- Build & publish container image (docker.io)
|
||||
- Package & publish helm chart (Gitea)
|
||||
image: bv11-cr01.bessems.eu/proxy/library/node:20-slim
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
echo 'foo'
|
||||
|
Loading…
Reference in New Issue
Block a user