Compare commits

..

8 Commits

Author SHA1 Message Date
524dd41700 Merge pull request 'Configure Renovate' (#1) from renovate/configure into main
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
Reviewed-on: https://git.front.kjuulh.io/kjuulh/drone-semantic-release/pulls/1
2022-10-25 20:58:21 +00:00
0b3ca0997f Add renovate.json
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2022-10-25 20:49:26 +00:00
f08fee0ada with docker login
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-21 16:14:45 +02:00
6a38904af2 without copy
All checks were successful
continuous-integration/drone/push Build is passing
2022-08-21 16:14:03 +02:00
f0a5ca6900 with push
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is passing
2022-08-21 16:11:56 +02:00
f32ffa466d with cache as well
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-21 16:10:33 +02:00
9a8e901219 removed ssh
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-21 16:10:02 +02:00
d16b61702c with drone
Some checks failed
continuous-integration/drone Build is failing
2022-08-21 16:07:08 +02:00
5 changed files with 82 additions and 3 deletions

63
.drone.yml Normal file
View File

@@ -0,0 +1,63 @@
kind: pipeline
name: default
type: docker
steps:
- name: load_secret
image: debian:buster-slim
volumes:
- name: ssh
path: /root/.ssh/
environment:
SSH_KEY:
from_secret: gitea_id_ed25519
commands:
- mkdir -p $HOME/.ssh/
- echo "$SSH_KEY" | base64 -d > $HOME/.ssh/id_ed25519
- name: build
image: kasperhermansen/cuddle:latest
pull: always
volumes:
- name: ssh
path: /root/.ssh/
- name: dockersock
path: /var/run
commands:
- apk add bash git
- cuddle_cli x build_docker
environment:
DOCKER_BUILDKIT: 1
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
SSH_KEY:
from_secret: gitea_id_ed25519
depends_on:
- "load_secret"
- name: send telegram notification
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to: 2129601481
format: markdown
depends_on:
- build
when:
status: [failure, success]
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: ssh
temp: {}
- name: dockersock
temp: {}

View File

@@ -2,6 +2,10 @@
base: false
vars:
service: "drone-semantic-release"
registry: "kasperhermansen"
scripts:
build_docker:
type: shell

3
renovate.json Normal file
View File

@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@@ -2,6 +2,17 @@
set -e
echo "building docker image"
export DOCKER_BUILDKIT=1
docker build --ssh default -f $TMP/build_docker.Dockerfile .
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
latest_tag="$REGISTRY/$SERVICE:latest"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker build -t "$tag" --cache-from "$latest_tag" -f $TMP/build_docker.Dockerfile .
docker tag "$tag" "$latest_tag"
docker push "$tag" &
docker push "$latest_tag" &
wait

View File

@@ -15,7 +15,5 @@ RUN \
WORKDIR /src/app/
COPY . .
#RUN --mount=type=ssh,id=default semantic-release --no-ci
# run as cmd during pipeline, such easier