Cache not the whole world
continuous-integration/drone/push Build is failing Details

pull/5/head
jhot 2023-11-01 09:48:49 -06:00
parent 1f9d566474
commit f4e78814c0
Signed by: jhot
GPG Key ID: 612ED70E22571DD4
1 changed files with 24 additions and 14 deletions

View File

@ -6,8 +6,10 @@ steps:
- name: setup - name: setup
image: debian:12 image: debian:12
volumes: volumes:
- name: system - name: docker
path: / path: /var/lib/docker
- name: usrbin
path: /usr/bin
- name: dockersocket - name: dockersocket
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
@ -15,32 +17,36 @@ steps:
- curl -fsSL https://get.docker.com -o get-docker.sh # install docker - curl -fsSL https://get.docker.com -o get-docker.sh # install docker
- sh ./get-docker.sh - sh ./get-docker.sh
- docker buildx create --name ${DRONE_COMMIT_SHA}${DRONE_BUILD_NUMBER} --use - docker buildx create --name ${DRONE_COMMIT_SHA}${DRONE_BUILD_NUMBER} --use
- sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d # install task - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/bin # install task
- ./bin/task build # build the docker image # - task build # build the docker image
- name: build - name: build
image: debian:12 image: debian:12
volumes: volumes:
- name: system - name: docker
path: / path: /var/lib/docker
- name: usrbin
path: /usr/bin
- name: dockersocket - name: dockersocket
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name - tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name
- ./bin/task build TAG=$tag # build the docker image - task build TAG=$tag # build the docker image
- name: publish tag - name: publish tag
image: debian:12 image: debian:12
environment: environment:
PASSOWRD: PASSOWRD:
from_secret: FORGEJO_PASSWORD from_secret: FORGEJO_PASSWORD
volumes: volumes:
- name: system - name: docker
path: / path: /var/lib/docker
- name: usrbin
path: /usr/bin
- name: dockersocket - name: dockersocket
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- docker login -u drone -p ${PASSWORD} - docker login -u drone -p ${PASSWORD}
- tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name - tag=$${DRONE_TAG:-$DRONE_BRANCH} # set tag to tag name (if applicable) or branch name
- ./bin/task push TAG=$tag - task push TAG=$tag
when: when:
event: event:
- tag - tag
@ -50,13 +56,15 @@ steps:
PASSOWRD: PASSOWRD:
from_secret: FORGEJO_PASSWORD from_secret: FORGEJO_PASSWORD
volumes: volumes:
- name: system - name: docker
path: / path: /var/lib/docker
- name: usrbin
path: /usr/bin
- name: dockersocket - name: dockersocket
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
- docker login -u drone -p ${PASSWORD} - docker login -u drone -p ${PASSWORD}
- ./bin/task push TAG=main - task push TAG=main
when: when:
branch: branch:
- main - main
@ -65,5 +73,7 @@ volumes:
- name: dockersocket - name: dockersocket
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: system - name: docker
temp: {}
- name: usrbin
temp: {} temp: {}