diff --git a/.woodpecker/.linux.yml b/.woodpecker/.linux.yml index 757c884..14be698 100644 --- a/.woodpecker/.linux.yml +++ b/.woodpecker/.linux.yml @@ -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} diff --git a/.woodpecker/.mingw.yml b/.woodpecker/.mingw.yml index 5e088fd..ddc9d02 100644 --- a/.woodpecker/.mingw.yml +++ b/.woodpecker/.mingw.yml @@ -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} diff --git a/.woodpecker/.test.yml b/.woodpecker/.test.yml index 3944a00..e9ed21b 100644 --- a/.woodpecker/.test.yml +++ b/.woodpecker/.test.yml @@ -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}