Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46974b120e | ||
|
|
3332e7bbcf |
No files matched your search
+40
-28
@@ -1,45 +1,57 @@
|
|||||||
when:
|
when:
|
||||||
- event: [push, manual]
|
- event: [push, manual]
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
ci: domain-linux-native
|
ci: domain-linux-native
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
- name: git
|
- name: git
|
||||||
image: woodpeckerci/plugin-git:2.9.3
|
image: woodpeckerci/plugin-git:2.9.3
|
||||||
settings:
|
settings:
|
||||||
remote:
|
remote:
|
||||||
from_secret: gitea_clone_webdrop
|
from_secret: gitea_clone_webdrop
|
||||||
lfs: false
|
lfs: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
api-contract:
|
prefetch-dependencies:
|
||||||
image: bash
|
image: bash
|
||||||
commands:
|
commands:
|
||||||
- node scripts/check-api-contract.mjs
|
- mkdir -p "$HOME/.cache/woodpecker/webdrop/npm" "$HOME/.cache/woodpecker/webdrop/nuget"
|
||||||
|
- cd packages/core
|
||||||
|
- npm ci --cache "$HOME/.cache/woodpecker/webdrop/npm" --prefer-offline --no-audit
|
||||||
|
- cd ../../web
|
||||||
|
- npm ci --cache "$HOME/.cache/woodpecker/webdrop/npm" --prefer-offline --no-audit
|
||||||
|
- cd ..
|
||||||
|
- NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet restore server/WebDrop.slnx
|
||||||
|
|
||||||
|
api-contract:
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
|
- node scripts/check-api-contract.mjs
|
||||||
|
|
||||||
core-and-web:
|
core-and-web:
|
||||||
image: bash
|
image: bash
|
||||||
|
depends_on: [prefetch-dependencies]
|
||||||
commands:
|
commands:
|
||||||
- cd packages/core
|
- cd packages/core
|
||||||
- npm ci
|
|
||||||
- npm run typecheck
|
- npm run typecheck
|
||||||
- npm test
|
- npm test
|
||||||
- npm run vectors:check
|
- npm run vectors:check
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|
||||||
web:
|
web:
|
||||||
image: bash
|
image: bash
|
||||||
|
depends_on: [prefetch-dependencies]
|
||||||
commands:
|
commands:
|
||||||
- cd web
|
- cd web
|
||||||
- npm ci
|
|
||||||
- npm run typecheck
|
- npm run typecheck
|
||||||
- npm run lint:css
|
- npm run lint:css
|
||||||
- npm test
|
- npm test
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: bash
|
image: bash
|
||||||
|
depends_on: [prefetch-dependencies]
|
||||||
commands:
|
commands:
|
||||||
- dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal
|
- NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal --no-restore
|
||||||
@@ -1,57 +1,59 @@
|
|||||||
when:
|
when:
|
||||||
- event: tag
|
- event: tag
|
||||||
ref: refs/tags/v*
|
ref: refs/tags/v*
|
||||||
- event: manual
|
- event: manual
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
ci: domain-linux-native
|
ci: domain-linux-native
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
- name: git
|
- name: git
|
||||||
image: woodpeckerci/plugin-git:2.9.3
|
image: woodpeckerci/plugin-git:2.9.3
|
||||||
settings:
|
settings:
|
||||||
remote:
|
remote:
|
||||||
from_secret: gitea_clone_webdrop
|
from_secret: gitea_clone_webdrop
|
||||||
lfs: false
|
lfs: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
checkout-release-source:
|
checkout-release-source:
|
||||||
image: bash
|
image: bash
|
||||||
commands:
|
commands:
|
||||||
- set -euo pipefail
|
- set -euo pipefail
|
||||||
|
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
||||||
|
- test -n "$release_tag"
|
||||||
|
- node scripts/check-api-contract.mjs "$release_tag"
|
||||||
|
- git fetch --force origin "refs/tags/$release_tag:refs/tags/$release_tag"
|
||||||
|
- git checkout --detach "refs/tags/$release_tag"
|
||||||
|
|
||||||
|
release-checks:
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
||||||
- test -n "$release_tag"
|
- test -n "$release_tag"
|
||||||
- node scripts/check-api-contract.mjs "$release_tag"
|
- node scripts/check-api-contract.mjs "$release_tag"
|
||||||
- git fetch --force origin "refs/tags/$release_tag:refs/tags/$release_tag"
|
- mkdir -p "$HOME/.cache/woodpecker/webdrop/nuget"
|
||||||
- git checkout --detach "refs/tags/$release_tag"
|
- NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet restore server/WebDrop.slnx
|
||||||
|
- NUGET_PACKAGES="$HOME/.cache/woodpecker/webdrop/nuget" dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal --no-restore
|
||||||
release-checks:
|
|
||||||
image: bash
|
publish-backend:
|
||||||
commands:
|
image: bash
|
||||||
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
environment:
|
||||||
- test -n "$release_tag"
|
ZOT_USERNAME:
|
||||||
- node scripts/check-api-contract.mjs "$release_tag"
|
from_secret: registry_username
|
||||||
- dotnet test server/WebDrop.slnx --configuration Release --verbosity minimal
|
ZOT_PASSWORD:
|
||||||
|
from_secret: registry_password
|
||||||
publish-backend:
|
ZOT_REGISTRY: 192.168.2.162:5000
|
||||||
image: bash
|
commands:
|
||||||
environment:
|
- set -euo pipefail
|
||||||
ZOT_USERNAME:
|
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
||||||
from_secret: registry_username
|
- test -n "$release_tag"
|
||||||
ZOT_PASSWORD:
|
- ': "${WOODPECKER_BACKEND_LOCAL_TEMP_DIR:=$HOME/woodpecker/work}"'
|
||||||
from_secret: registry_password
|
- buildah_store="$(dirname "$WOODPECKER_BACKEND_LOCAL_TEMP_DIR")/buildah-cache/webdrop"
|
||||||
ZOT_REGISTRY: 192.168.2.162:5000
|
- mkdir -p "$buildah_store/storage" "$buildah_store/run"
|
||||||
commands:
|
- 'buildah() { command buildah --root "$buildah_store/storage" --runroot "$buildah_store/run" "$@"; }'
|
||||||
- set -euo pipefail
|
- printf '%s' "$ZOT_PASSWORD" | buildah login --tls-verify=false "$ZOT_REGISTRY" --username "$ZOT_USERNAME" --password-stdin
|
||||||
- release_tag="${CI_COMMIT_TAG:-${RELEASE_TAG:-}}"
|
- trap 'buildah logout "$ZOT_REGISTRY" >/dev/null 2>&1 || true' EXIT
|
||||||
- test -n "$release_tag"
|
- image="$ZOT_REGISTRY/justme/webdrop-api:$release_tag"
|
||||||
- ': "${WOODPECKER_BACKEND_LOCAL_TEMP_DIR:=$HOME/woodpecker/work}"'
|
- buildah bud --network host --format docker --platform linux/amd64 --tag "$image" --file server/Dockerfile .
|
||||||
- buildah_store="$(dirname "$WOODPECKER_BACKEND_LOCAL_TEMP_DIR")/buildah-cache/webdrop"
|
- buildah push --tls-verify=false "$image" "docker://$image"
|
||||||
- mkdir -p "$buildah_store/storage" "$buildah_store/run"
|
|
||||||
- 'buildah() { command buildah --root "$buildah_store/storage" --runroot "$buildah_store/run" "$@"; }'
|
|
||||||
- printf '%s' "$ZOT_PASSWORD" | buildah login --tls-verify=false "$ZOT_REGISTRY" --username "$ZOT_USERNAME" --password-stdin
|
|
||||||
- trap 'buildah logout "$ZOT_REGISTRY" >/dev/null 2>&1 || true' EXIT
|
|
||||||
- image="$ZOT_REGISTRY/justme/webdrop-api:$release_tag"
|
|
||||||
- buildah bud --network host --format docker --platform linux/amd64 --tag "$image" --file server/Dockerfile .
|
|
||||||
- buildah push --tls-verify=false "$image" "docker://$image"
|
|
||||||
Reference in new issue
Block a user