|
| 1 | +--- |
| 2 | +title: Generowanie materiałów źródłowych dla metryk |
| 3 | +content_type: task |
| 4 | +weight: 100 |
| 5 | +--- |
| 6 | + |
| 7 | +<!-- overview --> |
| 8 | + |
| 9 | +Ta strona demonstruje generowanie materiałów źródłowych dotyczących metryk. |
| 10 | + |
| 11 | +## {{% heading "prerequisites" %}} |
| 12 | + |
| 13 | +{{< include "prerequisites-ref-docs.md" >}} |
| 14 | + |
| 15 | +<!-- steps --> |
| 16 | + |
| 17 | +## Sklonuj repozytorium Kubernetesa {#clone-the-kubernetes-repository} |
| 18 | + |
| 19 | +Generowanie metryk odbywa się w repozytorium Kubernetesa. Aby |
| 20 | +sklonować repozytorium, przejdź do katalogu, w którym chcesz, aby klon istniał. |
| 21 | + |
| 22 | +Następnie wykonaj następujące polecenie: |
| 23 | + |
| 24 | +```shell |
| 25 | +git clone https://www.github.com/kubernetes/kubernetes |
| 26 | +``` |
| 27 | + |
| 28 | +To tworzy folder `kubernetes` w bieżącym katalogu roboczym. |
| 29 | + |
| 30 | +## Generowanie metryk {#generate-the-metrics} |
| 31 | + |
| 32 | +W sklonowanym repozytorium Kubernetesa |
| 33 | +zlokalizuj katalog `test/instrumentation/documentation`. |
| 34 | +Dokumentacja metryk jest generowana w tym katalogu. |
| 35 | + |
| 36 | +Przy każdej wersji dodawane są nowe metryki. Po |
| 37 | +uruchomieniu skryptu generatora dokumentacji metryk, |
| 38 | +skopiuj dokumentację metryk na stronę internetową |
| 39 | +Kubernetesa i opublikuj zaktualizowaną dokumentację metryk. |
| 40 | + |
| 41 | +Aby wygenerować najnowsze metryki, upewnij się, że znajdujesz się w katalogu |
| 42 | +głównym sklonowanego katalogu Kubernetesa. Następnie wykonaj następujące polecenie: |
| 43 | + |
| 44 | +```shell |
| 45 | +./test/instrumentation/update-documentation.sh |
| 46 | +``` |
| 47 | + |
| 48 | +Aby sprawdzić zmiany, wykonaj: |
| 49 | + |
| 50 | +```shell |
| 51 | +git status |
| 52 | +``` |
| 53 | + |
| 54 | +Wynik jest podobny do: |
| 55 | + |
| 56 | +``` |
| 57 | +./test/instrumentation/documentation/documentation.md |
| 58 | +./test/instrumentation/documentation/documentation-list.yaml |
| 59 | +``` |
| 60 | + |
| 61 | +## Skopiuj wygenerowany plik dokumentacji metryk do repozytorium strony internetowej Kubernetesa {#copy-the-generated-metrics-documentation-file-to-the-kubernetes-website-repository} |
| 62 | + |
| 63 | +1. Ustaw zmienną środowiskową głównego katalogu strony Kubernetesa. |
| 64 | + |
| 65 | + Wykonaj następujące polecenie, aby ustawić główny katalog witryny: |
| 66 | + |
| 67 | + ```shell |
| 68 | + export WEBSITE_ROOT=<path to website root> |
| 69 | + ``` |
| 70 | + |
| 71 | +2. Skopiuj wygenerowany plik metryk do repozytorium witryny Kubernetesa. |
| 72 | + |
| 73 | + ```shell |
| 74 | + cp ./test/instrumentation/documentation/documentation.md "${WEBSITE_ROOT}/content/en/docs/reference/instrumentation/metrics.md" |
| 75 | + ``` |
| 76 | + |
| 77 | + {{< note >}} |
| 78 | + Jeśli pojawi się błąd, sprawdź, czy masz uprawnienia do skopiowania |
| 79 | + pliku. Możesz użyć `chown`, aby zmienić własność pliku na swojego użytkownika. |
| 80 | + {{< /note >}} |
| 81 | + |
| 82 | +## Utwórz pull requesta {#create-a-pull-request} |
| 83 | + |
| 84 | +Aby utworzyć pull request, postępuj zgodnie z instrukcjami w [Otwarcie pull requesta](/docs/contribute/new-content/open-a-pr/). |
| 85 | + |
| 86 | +## {{% heading "whatsnext" %}} |
| 87 | + |
| 88 | +* [Współpraca z głównym projektem](/docs/contribute/generate-ref-docs/contribute-upstream/) |
| 89 | +* [Generowanie materiałów źródłowych dla komponentów i narzędzi Kubernetesa](/docs/contribute/generate-ref-docs/kubernetes-components/) |
| 90 | +* [Generowanie materiałów źródłowych dla poleceń kubectl](/docs/contribute/generate-ref-docs/kubectl/) |
0 commit comments