This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
инструмент_gitlab [2022/09/23 19:27] val [Пример shell docker] |
инструмент_gitlab [2022/09/23 19:45] val [Пример shell docker] |
||
---|---|---|---|
Line 229: | Line 229: | ||
<code> | <code> | ||
- | export CI_REGISTRY=server.corpX.un:5000 | + | # Надо назначить в GitLab |
+ | export CI_REGISTRY=server.corpX.un:5000 | ||
export CI_REGISTRY_IMAGE=student/webd | export CI_REGISTRY_IMAGE=student/webd | ||
export CI_REGISTRY_USER=student | export CI_REGISTRY_USER=student | ||
export CI_REGISTRY_PASSWORD=password | export CI_REGISTRY_PASSWORD=password | ||
- | export CI_COMMIT_MESSAGE="ver1.N" # устанавливается автоматически | + | # в GitLab будет устанавлено автоматически |
+ | export CI_COMMIT_MESSAGE="ver 1.2" | ||
</code> | </code> | ||
<code> | <code> | ||
- | gitlab-runner@gate:~/webd$ cat build.sh | + | gitlab-runner@server:~/webd$ cat build.sh |
+ | ... | ||
+ | ---> Using cache | ||
+ | ... | ||
+ | ..............: Layer already exists | ||
+ | ... | ||
</code><code> | </code><code> | ||
#!/bin/sh | #!/bin/sh | ||
Line 254: | Line 261: | ||
docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE:$VER | docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE:$VER | ||
docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE | docker push $CI_REGISTRY/$CI_REGISTRY_IMAGE | ||
- | </code> | + | </code><code> |
- | + | gitlab-runner@server:~/webd$ sh build.sh | |
- | <code> | + | </code><code> |
- | gitlab-runner@gate:~/webd$ cat .gitlab-ci.yml | + | gitlab-runner@server:~/webd$ cat .gitlab-ci.yml |
stages: | stages: | ||
- lintertest | - lintertest |