|
| 1 | +--- |
| 2 | +stage: Verify |
| 3 | +group: Runner Core |
| 4 | +info: To determine the technical writer assigned to the Stage/Group associated with this page, see <https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments> |
| 5 | +description: GitLab Functionsを使用するために、step runnerを手動でインストールします。 |
| 6 | +title: step runnerを手動でインストールします |
| 7 | +--- |
| 8 | + |
| 9 | +{{< details >}} |
| 10 | + |
| 11 | +- プラン: Free、Premium、Ultimate |
| 12 | +- 提供形態: GitLab.com、GitLab Self-Managed、GitLab Dedicated |
| 13 | + |
| 14 | +{{< /details >}} |
| 15 | + |
| 16 | +step runnerは、ネイティブ関数をサポートしないexecutorでGitLab RunnerがGitLab Functionsを実行できるようにするバイナリです。これらのexecutorでは、パイプラインで関数を使用する前に、ジョブが実行されるホストまたはコンテナにstep runnerのバイナリをインストールする必要があります。 |
| 17 | + |
| 18 | +## 手動でのstep runnerインストールが必要なexecutor {#executors-that-require-manual-step-runner-installation} |
| 19 | + |
| 20 | +step runnerを手動でインストールする必要があるかどうかは、お使いのexecutorによって異なります。以下の表は、手動でのstep runnerのインストールが必要なexecutorを示しています: |
| 21 | + |
| 22 | +| executor | 手動インストールが必要 | |
| 23 | +|-------------------|------------------------------| |
| 24 | +| Shell | はい | |
| 25 | +| SSH | はい | |
| 26 | +| Kubernetes | はい | |
| 27 | +| VirtualBox | はい | |
| 28 | +| Parallels | はい | |
| 29 | +| カスタム | はい | |
| 30 | +| インスタンス | はい | |
| 31 | +| Docker | Windowsのみ | |
| 32 | +| Docker Autoscaler | Windowsのみ | |
| 33 | +| Docker Machine | Windowsのみ | |
| 34 | + |
| 35 | +手動インストールが不要なexecutorの場合、`gitlab-runner-helper`がstep runnerとして機能します。これらのexecutorには、`step-runner`バイナリは存在せず、必要もありません。 |
| 36 | + |
| 37 | +### 変数アクセス制限 {#variable-access-restrictions} |
| 38 | + |
| 39 | +step runnerを手動でインストールしたexecutorでは、step runnerはジョブ変数と環境変数へのアクセスが制限されます: |
| 40 | + |
| 41 | +| 構文 | 利用可能な値 | |
| 42 | +|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 43 | +| `${{ vars.<name> }}` | プレフィックスが`CI_`、`DOCKER_`、または`GITLAB_`のジョブ変数のみ。 | |
| 44 | +| `${{ env.<name> }}` | `HTTPS_PROXY`, `HTTP_PROXY`, `NO_PROXY`, `http_proxy`, `https_proxy`, `no_proxy`, `all_proxy`, `LANG`, `LC_ALL`, `LC_CTYPE`, `LOGNAME`, `USER`, `PATH`, `SHELL`, `TERM`, `TMPDIR`, `TZ` | |
| 45 | + |
| 46 | +## step runnerを手動でインストールします {#install-step-runner-manually} |
| 47 | + |
| 48 | +複数のプラットフォーム向けのコンパイルされたバイナリは、[step runnerのリリースページ](https://gitlab.com/gitlab-org/step-runner/-/releases)から入手できます。サポートされているプラットフォームには、Windows、Linux、macOS、およびFreeBSDがあり、複数のアーキテクチャ(amd64、arm64、386、ARM、s390x、ppc64le)に対応しています。 |
| 49 | + |
| 50 | +### バイナリの信頼性を検証します {#verify-authenticity-of-the-binary} |
| 51 | + |
| 52 | +インストールする前に、バイナリが改ざんされておらず、公式のGitLabチームから提供されていることを確認してください。 |
| 53 | + |
| 54 | +1. GPG公開キーをダウンロードしてインポートします: |
| 55 | + |
| 56 | + ```shell |
| 57 | + # All platforms (requires gpg installed: https://gnupg.org/download/) |
| 58 | + curl -o step-runner.pub.gpg "https://gitlab.com/gitlab-org/step-runner/-/package_files/257922684/download" |
| 59 | + gpg --import step-runner.pub.gpg |
| 60 | + gpg --fingerprint |
| 61 | + ``` |
| 62 | + |
| 63 | + インポートしたキーが以下と一致することを確認してください: |
| 64 | + |
| 65 | + | キー属性 | 値 | |
| 66 | + |---------------|------------------------------------------------------| |
| 67 | + | 名前 | `GitLab, Inc.` | |
| 68 | + | メール | `support@gitlab.com` | |
| 69 | + | フィンガープリント | `0FCD 59B1 6F4A 62D0 3839 27A5 42FF CA71 62A5 35F5` | |
| 70 | + | 有効期限 | `2029-01-05` | |
| 71 | + |
| 72 | +1. [リリースページ](https://gitlab.com/gitlab-org/step-runner/-/releases)から、以下のファイルをダウンロードしてください: |
| 73 | + |
| 74 | + - お使いのプラットフォーム用のバイナリ(例: `step-runner-linux-amd64`または`step-runner-darwin-arm64`) |
| 75 | + - `step-runner-release.sha256` |
| 76 | + - `step-runner-release.sha256.asc` |
| 77 | + |
| 78 | +1. GPG署名を検証します: |
| 79 | + |
| 80 | + ```shell |
| 81 | + # All platforms (requires gpg) |
| 82 | + gpg --verify step-runner-release.sha256.asc step-runner-release.sha256 |
| 83 | + ``` |
| 84 | + |
| 85 | + 出力には`Good signature`メッセージが含まれているはずです。 |
| 86 | + |
| 87 | +1. バイナリのチェックサムを検証します: |
| 88 | + |
| 89 | + ```shell |
| 90 | + # Linux |
| 91 | + sha256sum -c step-runner-release.sha256 |
| 92 | + ``` |
| 93 | + |
| 94 | + ```shell |
| 95 | + # macOS |
| 96 | + shasum -a 256 -c step-runner-release.sha256 |
| 97 | + ``` |
| 98 | + |
| 99 | + ```shell |
| 100 | + # Windows (PowerShell) — replace 'step-runner-windows-amd64.exe' with your binary name |
| 101 | + $binary = "step-runner-windows-amd64.exe" |
| 102 | + $expected = (Select-String -Path "step-runner-release.sha256" -Pattern $binary).Line.Split(" ")[0] |
| 103 | + $actual = (Get-FileHash -Algorithm SHA256 $binary).Hash.ToLower() |
| 104 | + if ($actual -eq $expected) { "OK" } else { "FAILED: checksum mismatch" } |
| 105 | + ``` |
| 106 | +
|
| 107 | + 出力には、お使いのバイナリに対して`OK`が表示されるはずです。 |
| 108 | +
|
| 109 | +### step-runnerをPATHに追加します {#add-step-runner-to-path} |
| 110 | +
|
| 111 | +バイナリをダウンロードして検証したら、ジョブが実行されるインスタンスの`PATH`で利用できるようにします。このインスタンスは、executorによってはホストマシンまたはコンテナの場合があります。 |
| 112 | +
|
| 113 | +1. バイナリを`step-runner`(Windowsでは`step-runner.exe`)に名前変更します: |
| 114 | +
|
| 115 | + ```shell |
| 116 | + mv step-runner-<os>-<arch> step-runner |
| 117 | + ``` |
| 118 | +
|
| 119 | +1. Unix系システムでは、バイナリを実行可能にします: |
| 120 | +
|
| 121 | + ```shell |
| 122 | + chmod +x step-runner |
| 123 | + ``` |
| 124 | +
|
| 125 | +1. バイナリを`PATH`上のディレクトリに移動します: |
| 126 | +
|
| 127 | + ```shell |
| 128 | + mv step-runner /usr/local/bin/ |
| 129 | + ``` |
0 commit comments