chore(ci): secrets
This commit is contained in:
parent
2ee6a97a4f
commit
242dbffb49
3 changed files with 58 additions and 46 deletions
|
@ -10,23 +10,27 @@ steps:
|
||||||
- cargo build --release
|
- cargo build --release
|
||||||
- strip target/release/cggitem_sets
|
- strip target/release/cggitem_sets
|
||||||
when:
|
when:
|
||||||
# path:
|
# path:
|
||||||
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
||||||
- event: [manual, tag]
|
- event: [ manual, tag ]
|
||||||
- event: push
|
- event: push
|
||||||
branch: renovate/*
|
branch: renovate/*
|
||||||
- event: push
|
- event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine:3.21
|
image: alpine:3.21
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache curl
|
- 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
|
- 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:
|
when:
|
||||||
path:
|
path:
|
||||||
include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
include: [ '.woodpecker/*.yml', 'src/*', 'Cargo*' ]
|
||||||
event: [push, manual, tag]
|
event: [ push, manual, tag ]
|
||||||
branch:
|
branch:
|
||||||
- ${CI_REPO_DEFAULT_BRANCH}
|
- ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
|
@ -13,22 +13,26 @@ steps:
|
||||||
- cargo build --release --target x86_64-pc-windows-gnu
|
- cargo build --release --target x86_64-pc-windows-gnu
|
||||||
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
|
- strip target/x86_64-pc-windows-gnu/release/cggitem_sets.exe
|
||||||
when:
|
when:
|
||||||
# path:
|
# path:
|
||||||
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
||||||
- event: [manual, tag]
|
- event: [ manual, tag ]
|
||||||
- event: push
|
- event: push
|
||||||
branch: renovate/*
|
branch: renovate/*
|
||||||
- event: push
|
- event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine:3.21
|
image: alpine:3.21
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache curl
|
- 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
|
- 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:
|
when:
|
||||||
path:
|
path:
|
||||||
include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
include: [ '.woodpecker/*.yml', 'src/*', 'Cargo*' ]
|
||||||
event: [push, manual, tag]
|
event: [ push, manual, tag ]
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
|
@ -1,41 +1,45 @@
|
||||||
clone:
|
clone:
|
||||||
- name: clone
|
- name: clone
|
||||||
image: woodpeckerci/plugin-git:2.6.0
|
image: woodpeckerci/plugin-git:2.6.0
|
||||||
settings:
|
settings:
|
||||||
partial: false
|
partial: false
|
||||||
when:
|
when:
|
||||||
- event: [pull_request, manual, tag]
|
- event: [ pull_request, manual, tag ]
|
||||||
- event: push
|
- event: push
|
||||||
branch: renovate/*
|
branch: renovate/*
|
||||||
- event: push
|
- event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
steps:
|
steps:
|
||||||
test:
|
test:
|
||||||
image: rust:alpine
|
image: rust:alpine
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache musl-dev openssl-dev
|
- apk add --no-cache musl-dev openssl-dev
|
||||||
# - cargo install cargo-tarpaulin
|
# - cargo install cargo-tarpaulin
|
||||||
- rustup component add clippy
|
- rustup component add clippy
|
||||||
# - cargo tarpaulin --out Lcov
|
# - cargo tarpaulin --out Lcov
|
||||||
- cargo clippy --message-format=json &> clippy-report.json
|
- cargo clippy --message-format=json &> clippy-report.json
|
||||||
when:
|
when:
|
||||||
# path:
|
# path:
|
||||||
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
||||||
- event: [pull_request, manual, tag]
|
- event: [ pull_request, manual, tag ]
|
||||||
- event: push
|
- event: push
|
||||||
branch: renovate/*
|
branch: renovate/*
|
||||||
- event: push
|
- event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
sonar:
|
sonar:
|
||||||
image: sonarsource/sonar-scanner-cli:11
|
image: sonarsource/sonar-scanner-cli:11
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- curl -s https://git.nyyu.dev/nyyu/ci-scripts/raw/branch/main/sonar.sh | bash
|
- curl -s https://git.nyyu.dev/nyyu/ci-scripts/raw/branch/main/sonar.sh | bash
|
||||||
secrets: [ sonar_host_url, sonar_token ]
|
environment:
|
||||||
|
SONAR_HOST_URL:
|
||||||
|
from_secret: sonar_host_url
|
||||||
|
SONAR_TOKEN:
|
||||||
|
from_secret: sonar_token
|
||||||
when:
|
when:
|
||||||
# path:
|
# path:
|
||||||
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
# include: ['.woodpecker/*.yml', 'src/*', 'Cargo*']
|
||||||
- event: [pull_request, manual, tag]
|
- event: [ pull_request, manual, tag ]
|
||||||
- event: push
|
- event: push
|
||||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||||
|
|
Loading…
Add table
Reference in a new issue