chore(ci): secrets
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/linux Pipeline was successful
ci/woodpecker/push/mingw Pipeline was successful

This commit is contained in:
nyyu 2024-12-14 09:54:41 +01:00
parent 2ee6a97a4f
commit 242dbffb49
3 changed files with 58 additions and 46 deletions

View file

@ -10,23 +10,27 @@ steps:
- cargo build --release
- strip target/release/cggitem_sets
when:
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [manual, tag]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [ manual, tag ]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
deploy:
image: alpine:3.21
pull: true
commands:
- apk add --no-cache curl
- curl -f -i -u $REGISTRY_USERNAME:$REGISTRY_PASSWORD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml) -F maven2.asset1=@target/release/cggitem_sets -F maven2.asset1.extension=elf -F maven2.asset1.classifier=linux-x64
secrets: [registry_username, registry_password]
environment:
REGISTRY_USERNAME:
from_secret: registry_username
REGISTRY_PASSWORD:
from_secret: registry_password
when:
path:
include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
event: [push, manual, tag]
include: [ '.woodpecker/*.yml', 'src/*', 'Cargo*' ]
event: [ push, manual, tag ]
branch:
- ${CI_REPO_DEFAULT_BRANCH}

View file

@ -13,22 +13,26 @@ steps:
- cargo build --release --target x86_64-pc-windows-gnu
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
when:
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [manual, tag]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [ manual, tag ]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
deploy:
image: alpine:3.21
pull: true
commands:
- apk add --no-cache curl
- curl -f -i -u $REGISTRY_USERNAME:$REGISTRY_PASSWORD -X POST 'https://nexus.nyyu.dev/service/rest/v1/components?repository=maven-releases' -F maven2.groupId=dev.nyyu -F maven2.artifactId=cggitem_sets -F maven2.version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2); printf("%s",$2) }' Cargo.toml) -F maven2.asset1=@target/x86_64-pc-windows-gnu/release/cggitem_sets.exe -F maven2.asset1.extension=exe -F maven2.asset1.classifier=mingw-x64
secrets: [registry_username, registry_password]
environment:
REGISTRY_USERNAME:
from_secret: registry_username
REGISTRY_PASSWORD:
from_secret: registry_password
when:
path:
include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
event: [push, manual, tag]
include: [ '.woodpecker/*.yml', 'src/*', 'Cargo*' ]
event: [ push, manual, tag ]
branch: ${CI_REPO_DEFAULT_BRANCH}

View file

@ -1,41 +1,45 @@
clone:
- name: clone
image: woodpeckerci/plugin-git:2.6.0
settings:
partial: false
when:
- event: [pull_request, manual, tag]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
- name: clone
image: woodpeckerci/plugin-git:2.6.0
settings:
partial: false
when:
- event: [ pull_request, manual, tag ]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
steps:
test:
image: rust:alpine
pull: true
commands:
- apk add --no-cache musl-dev openssl-dev
# - cargo install cargo-tarpaulin
# - cargo install cargo-tarpaulin
- rustup component add clippy
# - cargo tarpaulin --out Lcov
# - cargo tarpaulin --out Lcov
- cargo clippy --message-format=json &> clippy-report.json
when:
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [pull_request, manual, tag]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [ pull_request, manual, tag ]
- event: push
branch: renovate/*
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
sonar:
image: sonarsource/sonar-scanner-cli:11
pull: true
commands:
- curl -s https://git.nyyu.dev/nyyu/ci-scripts/raw/branch/main/sonar.sh | bash
secrets: [ sonar_host_url, sonar_token ]
- curl -s https://git.nyyu.dev/nyyu/ci-scripts/raw/branch/main/sonar.sh | bash
environment:
SONAR_HOST_URL:
from_secret: sonar_host_url
SONAR_TOKEN:
from_secret: sonar_token
when:
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [pull_request, manual, tag]
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}
# path:
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
- event: [ pull_request, manual, tag ]
- event: push
branch: ${CI_REPO_DEFAULT_BRANCH}