try backblaze again

This commit is contained in:
Patrick Schratz 2024-09-04 15:59:52 +02:00
commit b36aa7907f
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -3,16 +3,16 @@ when:
matrix: matrix:
include: include:
- PLATFORM: rhel-9 # - PLATFORM: rhel-9
PLATFORM_ID: el9 # PLATFORM_ID: el9
- PLATFORM: centos-8 # - PLATFORM: centos-8
PLATFORM_ID: el8 # PLATFORM_ID: el8
- PLATFORM: ubuntu-2204 # - PLATFORM: ubuntu-2204
PLATFORM_ID: 2204 # PLATFORM_ID: 2204
- PLATFORM: ubuntu-2404 # - PLATFORM: ubuntu-2404
PLATFORM_ID: 2404 # PLATFORM_ID: 2404
- PLATFORM: opensuse-155 # - PLATFORM: opensuse-155
PLATFORM_ID: suse155 # PLATFORM_ID: suse155
- PLATFORM: alpine-320 - PLATFORM: alpine-320
PLATFORM_ID: alpine320 PLATFORM_ID: alpine320
@ -52,14 +52,15 @@ steps:
- name: Check if files for R version already exist in s3 - name: Check if files for R version already exist in s3
environment: environment:
AWS_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID:
from_secret: aws_access_key_id from_secret: b2_application_key
AWS_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY:
from_secret: aws_secret_access_key from_secret: b2_application_key_id
AWS_REGION: eu-central-2 AWS_REGION: eu-central-2
AWS_ENDPOINT: s3.eu-central-003.backblazeb2.com
image: alpine:3.20 image: alpine:3.20
commands: commands:
- apk add -q --no-cache aws-cli - apk add -q --no-cache aws-cli
- aws s3 ls s3://devxy-rbuilds/${PLATFORM_ID}/ | tail -1 | awk '{print $NF}' | cut -c 3-7 > r_build_latest.txt - aws s3 ls s3://devxy-r-builds/${PLATFORM_ID}/ | tail -1 | awk '{print $NF}' | cut -c 3-7 > r_build_latest.txt
- cat r_build_latest.txt - cat r_build_latest.txt
backend_options: backend_options:
kubernetes: kubernetes:
@ -67,55 +68,51 @@ steps:
topology.kubernetes.io/region: fsn1 topology.kubernetes.io/region: fsn1
# ref: https://github.com/woodpecker-ci/woodpecker/discussions/2721 # ref: https://github.com/woodpecker-ci/woodpecker/discussions/2721
- name: Build # - name: Build
# image: library/docker:26.1.4-dind-alpine3.20 # agent on k8s # image: alpine:3.20
image: alpine:3.20 # agent on VM # privileged: true
privileged: true # environment:
environment: # DOCKER_HOST: tcp://docker:2375
DOCKER_HOST: tcp://docker:2375 # commands: |
commands: | # # docker info
# docker info # if [ ! -s r_build_latest.txt ] || [ ! "$(cat r-release-version.txt)" = "$(cat r_build_latest.txt)" ]; then
if [ ! -s r_build_latest.txt ] || [ ! "$(cat r-release-version.txt)" = "$(cat r_build_latest.txt)" ]; then # apk add -q --no-cache py3-pip make just aws-cli docker-compose
apk add -q --no-cache py3-pip make just aws-cli docker-compose # pip3 install -q b2 --break-system-packages
pip3 install -q b2 --break-system-packages # just build-r-${PLATFORM} $(cat r-release-version.txt)
just build-r-${PLATFORM} $(cat r-release-version.txt) # fi
fi # backend_options:
backend_options: # kubernetes:
kubernetes: # resources:
resources: # requests:
requests: # memory: 200Mi
memory: 200Mi # cpu: 500m
cpu: 500m # limits:
limits: # memory: 1000Mi
memory: 1000Mi # cpu: 4000m
cpu: 4000m # nodeSelector:
nodeSelector: # kubernetes.io/arch: "arm64"
kubernetes.io/arch: "arm64" # topology.kubernetes.io/region: fsn1
topology.kubernetes.io/region: fsn1 # tolerations:
tolerations: # - key: "CI"
- key: "CI" # operator: "Equal"
operator: "Equal" # value: "true"
value: "true" # effect: "NoSchedule"
effect: "NoSchedule"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock # agent on VM
# - /tmp:/tmp # agent on VM
- name: Upload - name: Upload
image: woodpeckerci/plugin-s3:1.3.0 image: woodpeckerci/plugin-s3:1.3.0
pull: true pull: true
settings: settings:
bucket: devxy-rbuilds bucket: devxy-r-builds
strip_prefix: /tmp/${PLATFORM}/ strip_prefix: /tmp/${PLATFORM}/
source: /tmp/${PLATFORM}/* source: /tmp/${PLATFORM}/*
target: ${PLATFORM_ID}/ target: ${PLATFORM_ID}/
region: eu-central-2 region: s3.eu-central-003
# acl: public-read acl: public-read
access_key: access_key:
from_secret: aws_access_key_id from_secret: b2_application_key_id
secret_key: secret_key:
from_secret: aws_secret_access_key from_secret: b2_application_key
# endpoint: s3.eu-central-003.backblazeb2.com endpoint: s3.eu-central-003.backblazeb2.com
overwrite: false overwrite: false
volumes: volumes:
- ci-tmp-rwx:/tmp # agent on k8s - ci-tmp-rwx:/tmp # agent on k8s