Merge pull request 'Woodpecker CI: Remake docs building pipelines' (#7928) from woodpecker-ci-docs into develop
This commit is contained in:
commit
c023727ecd
3 changed files with 147 additions and 0 deletions
45
.woodpecker/docs.yaml
Normal file
45
.woodpecker/docs.yaml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
path: [ "docs/**" ]
|
||||
- event: tag
|
||||
- event: manual
|
||||
evaluate: 'CI_COMMIT_BRANCH == "stable" || CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
||||
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
|
||||
skip_clone: true
|
||||
|
||||
variables:
|
||||
trigger_settings: &trigger_settings
|
||||
deploy: 'docs'
|
||||
last-successful: true
|
||||
token:
|
||||
from_secret: pleroma-ci-woodpecker-token
|
||||
repositories:
|
||||
- pleroma/docs@master
|
||||
docker_image: &docker_image docker.io/woodpeckerci/plugin-trigger:1.1.1
|
||||
|
||||
steps:
|
||||
trigger-deploy-stable:
|
||||
when:
|
||||
- event: tag
|
||||
- event: manual
|
||||
branch: stable
|
||||
image: *docker_image
|
||||
settings:
|
||||
<<: *trigger_settings
|
||||
params:
|
||||
- BRANCH=stable
|
||||
|
||||
trigger-deploy-develop:
|
||||
when:
|
||||
- event: push
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
image: *docker_image
|
||||
settings:
|
||||
<<: *trigger_settings
|
||||
params:
|
||||
- BRANCH=develop
|
||||
102
.woodpecker/spec-build.yaml
Normal file
102
.woodpecker/spec-build.yaml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
path:
|
||||
- ".woodpecker/spec-build.yaml"
|
||||
- "mix.exs"
|
||||
- "mix.lock"
|
||||
- "lib/pleroma/web.ex"
|
||||
- "lib/pleroma/web/**/*.ex"
|
||||
- event: tag
|
||||
- event: manual
|
||||
evaluate: 'CI_COMMIT_BRANCH == "stable" || CI_COMMIT_BRANCH == CI_REPO_DEFAULT_BRANCH'
|
||||
|
||||
labels:
|
||||
platform: linux/amd64
|
||||
|
||||
concurrency: 1
|
||||
|
||||
variables:
|
||||
artifacts_uploader_image: &artifacts_uploader_image docker.io/woodpeckercommunity/plugin-gitea-package:0.5.1
|
||||
artifacts_uploader_settings: &artifacts_uploader_settings
|
||||
user:
|
||||
from_secret: pleroma-ci-user
|
||||
password:
|
||||
from_secret: pleroma-ci-password
|
||||
owner: 'pleroma'
|
||||
package_name: api-docs-spec
|
||||
file_source: ./spec.json
|
||||
file_name: spec.json
|
||||
update: 'true'
|
||||
trigger_image: &trigger_image docker.io/woodpeckerci/plugin-trigger:1.1.1
|
||||
trigger_settings: &trigger_settings
|
||||
deploy: 'api-docs'
|
||||
last-successful: true
|
||||
token:
|
||||
from_secret: pleroma-ci-woodpecker-token
|
||||
repositories:
|
||||
- pleroma/api-docs@master
|
||||
|
||||
steps:
|
||||
build-spec:
|
||||
image: docker.io/hexpm/elixir:1.17.3-erlang-27.3.4.17-alpine-3.22.5
|
||||
environment:
|
||||
MIX_ENV: prod
|
||||
VIX_COMPILATION_MODE: PLATFORM_PROVIDED_LIBVIPS
|
||||
commands:
|
||||
- apk update --no-cache
|
||||
- apk add git build-base cmake file-dev openssl vips-dev zip
|
||||
- mix local.hex --force
|
||||
- mix local.rebar --force
|
||||
- mix deps.get --only prod
|
||||
- mix pleroma.openapi_spec spec.json
|
||||
|
||||
upload-spec:
|
||||
image: *artifacts_uploader_image
|
||||
settings:
|
||||
<<: *artifacts_uploader_settings
|
||||
package_version: ${CI_COMMIT_SHA}
|
||||
|
||||
upload-spec-stable:
|
||||
when:
|
||||
- event: tag
|
||||
- event: manual
|
||||
branch: stable
|
||||
image: *artifacts_uploader_image
|
||||
settings:
|
||||
<<: *artifacts_uploader_settings
|
||||
package_version: stable
|
||||
|
||||
upload-spec-develop:
|
||||
when:
|
||||
- event: push
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
image: *artifacts_uploader_image
|
||||
settings:
|
||||
<<: *artifacts_uploader_settings
|
||||
package_version: develop
|
||||
|
||||
trigger-deploy-stable:
|
||||
when:
|
||||
- event: tag
|
||||
- event: manual
|
||||
branch: stable
|
||||
image: *trigger_image
|
||||
settings:
|
||||
<<: *trigger_settings
|
||||
params:
|
||||
- BRANCH=stable
|
||||
- SPEC_VERSION=${CI_COMMIT_SHA}
|
||||
|
||||
trigger-deploy-develop:
|
||||
when:
|
||||
- event: push
|
||||
- event: manual
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
image: *trigger_image
|
||||
settings:
|
||||
<<: *trigger_settings
|
||||
params:
|
||||
- BRANCH=develop
|
||||
- SPEC_VERSION=${CI_COMMIT_SHA}
|
||||
0
changelog.d/woodpecker-ci-docs.skip
Normal file
0
changelog.d/woodpecker-ci-docs.skip
Normal file
Loading…
Add table
Add a link
Reference in a new issue