質問編集履歴
5
質問修正
    
        title	
    CHANGED
    
    | @@ -1,1 +1,1 @@ | |
| 1 | 
            -
            [GitLab CI]  | 
| 1 | 
            +
            [GitLab CI] ローカルランナーのジョブ(PHPUnit)が失敗する。
         | 
    
        body	
    CHANGED
    
    | @@ -11,26 +11,8 @@ | |
| 11 11 | 
             
            ご教授のほどお願いいたします。
         | 
| 12 12 |  | 
| 13 13 |  | 
| 14 | 
            -
             | 
| 14 | 
            +
            ジョブの実行環境に使用するイメージ。(コンテナ名はphptest)
         | 
| 15 15 | 
             
            ```
         | 
| 16 | 
            -
            1. Dockerをインストールする。
         | 
| 17 | 
            -
            2. CentOS7イメージをpull & コンテナへログインする。
         | 
| 18 | 
            -
            $ sudo docker pull centos:centos7
         | 
| 19 | 
            -
            $ sudo docker run -it centos:centos7 /bin/bash
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            3. コンテナ内でcomposerをインストールしてPHPUnitをインストールする。
         | 
| 22 | 
            -
            ########手順は省略しますが、PHPUnitをインストールしできた事を下記コマンドで確認########
         | 
| 23 | 
            -
            # /root/vendor/bin/phpunit --version
         | 
| 24 | 
            -
            PHPUnit 3.7.38 by Sebastian Bergmann.
         | 
| 25 | 
            -
             | 
| 26 | 
            -
            4. docker commitでコンテナ内で行った作業を保存
         | 
| 27 | 
            -
            $ ~/GitLab/gitlabci-test$ docker ps
         | 
| 28 | 
            -
            CONTAINER ID   IMAGE                         COMMAND                  CREATED          STATUS          PORTS     NAMES
         | 
| 29 | 
            -
            37b1923e5f16   centos:centos7                "/bin/bash"              5 hours ago      Up 5 hours                nervous_lamarr
         | 
| 30 | 
            -
            $ docker commit ea8c26d07671 phptest                ######docker commit
         | 
| 31 | 
            -
            ```
         | 
| 32 | 
            -
            ジョブの実行環境に使用するイメージができました。(コンテナ名はphptest)
         | 
| 33 | 
            -
            ```
         | 
| 34 16 | 
             
            $ docker images
         | 
| 35 17 | 
             
            REPOSITORY          TAG               IMAGE ID       CREATED              SIZE
         | 
| 36 18 | 
             
            phptest             latest            131e6a77f5da   About a minute ago   471MB
         | 
| @@ -48,34 +30,8 @@ | |
| 48 30 | 
             
            ```
         | 
| 49 31 |  | 
| 50 32 |  | 
| 51 | 
            -
             | 
| 33 | 
            +
            ランナーを登録した後、gitlab-runner runをします。
         | 
| 52 | 
            -
             | 
| 53 34 | 
             
            ```
         | 
| 54 | 
            -
            $ sudo gitlab-ci-multi-runner register
         | 
| 55 | 
            -
            Runtime platform                                    arch=amd64 os=linux pid=15677 revision=d540b510 version=15.9.1
         | 
| 56 | 
            -
            Running in system-mode.
         | 
| 57 | 
            -
             | 
| 58 | 
            -
            Enter the GitLab instance URL (for example, https://gitlab.com/):
         | 
| 59 | 
            -
            https://gitlab.com/                          ###プロジェクトのCI設定画面内のURL
         | 
| 60 | 
            -
            Enter the registration token:
         | 
| 61 | 
            -
            GR1348941XXXX_XXXXXXX_uzT2Ve                          ###プロジェクトのCI設定画面内のトークン
         | 
| 62 | 
            -
            Enter a description for the runner:
         | 
| 63 | 
            -
            [DESKTOP-JUAPL98]:                          ###そのままエンター
         | 
| 64 | 
            -
            Enter tags for the runner (comma-separated):
         | 
| 65 | 
            -
            phptest                          ###docker commitで決めたコンテナ名
         | 
| 66 | 
            -
            Enter optional maintenance note for the runner:
         | 
| 67 | 
            -
                                      ###そのままエンター
         | 
| 68 | 
            -
            WARNING: Support for registration tokens and runner parameters in the 'register' command has been deprecated in GitLab Runner 15.6 and will be replaced with support for authentication tokens. For more information, see https://gitlab.com/gitlab-org/gitlab/-/issues/380872
         | 
| 69 | 
            -
            Registering runner... succeeded                     runner=GR1348941PfxD_fG6
         | 
| 70 | 
            -
            Enter an executor: ssh, docker+machine, instance, kubernetes, custom, docker, parallels, shell, docker-ssh, virtualbox, docker-ssh+machine:
         | 
| 71 | 
            -
            docker                          ###実行環境の種類
         | 
| 72 | 
            -
            Enter the default Docker image (for example, ruby:2.7):
         | 
| 73 | 
            -
            phptest                          ###docker commitで決めたコンテナ名
         | 
| 74 | 
            -
            Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
         | 
| 75 | 
            -
            ```
         | 
| 76 | 
            -
            gitlabにランナーを登録できました。
         | 
| 77 | 
            -
            このままではCIがpendingするのでgitlab-runner runをします。
         | 
| 78 | 
            -
            ```
         | 
| 79 35 | 
             
            $ gitlab-runner run
         | 
| 80 36 | 
             
            Runtime platform                                    arch=amd64 os=linux pid=15873 revision=d540b510 version=15.9.1
         | 
| 81 37 | 
             
            Starting multi-runner from /home/USER/.gitlab-runner/config.toml...  builds=0
         | 
| @@ -95,6 +51,3 @@ | |
| 95 51 | 
             
            ランナー失敗。からの問題となっているログです。
         | 
| 96 52 | 
             
            
         | 
| 97 53 | 
             
            
         | 
| 98 | 
            -
            ### 参考にしたサイト
         | 
| 99 | 
            -
            https://tracpath.com/bootcamp/ci/php_tutorial_5.html
         | 
| 100 | 
            -
            https://tracpath.com/bootcamp/ci/php_tutorial_6.html
         | 
4
タグ編集
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | 
            File without changes
         | 
3
タイトル編集
    
        title	
    CHANGED
    
    | @@ -1,1 +1,1 @@ | |
| 1 | 
            -
            [GitLab CI] 登録したランナーの | 
| 1 | 
            +
            [GitLab CI] 登録したランナーのジョブ(PHPUnit)が失敗する。
         | 
    
        body	
    CHANGED
    
    | 
            File without changes
         | 
2
微修正
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -27,7 +27,7 @@ | |
| 27 27 | 
             
            $ ~/GitLab/gitlabci-test$ docker ps
         | 
| 28 28 | 
             
            CONTAINER ID   IMAGE                         COMMAND                  CREATED          STATUS          PORTS     NAMES
         | 
| 29 29 | 
             
            37b1923e5f16   centos:centos7                "/bin/bash"              5 hours ago      Up 5 hours                nervous_lamarr
         | 
| 30 | 
            -
            $ docker commit ea8c26d07671 phptest
         | 
| 30 | 
            +
            $ docker commit ea8c26d07671 phptest                ######docker commit
         | 
| 31 31 | 
             
            ```
         | 
| 32 32 | 
             
            ジョブの実行環境に使用するイメージができました。(コンテナ名はphptest)
         | 
| 33 33 | 
             
            ```
         | 
1
参考にしたサイト追加
    
        title	
    CHANGED
    
    | 
            File without changes
         | 
    
        body	
    CHANGED
    
    | @@ -94,4 +94,7 @@ | |
| 94 94 | 
             
            ### 問題となっているログ
         | 
| 95 95 | 
             
            ランナー失敗。からの問題となっているログです。
         | 
| 96 96 | 
             
            
         | 
| 97 | 
            -
            
         | 
| 97 | 
            +
            
         | 
| 98 | 
            +
            ### 参考にしたサイト
         | 
| 99 | 
            +
            https://tracpath.com/bootcamp/ci/php_tutorial_5.html
         | 
| 100 | 
            +
            https://tracpath.com/bootcamp/ci/php_tutorial_6.html
         | 
