简体   繁体   English

如何访问在 Gitlab 审查应用程序上运行的应用程序?

[英]How to access application running on Gitlab review apps?

.gitlab-ci.yml file .gitlab-ci.yml 文件

image: node:latest

services:
# This folder is cached between builds

stages:
  - deploy
cache:
  paths:
  - node_modules/
deploy_staging:
  stage: deploy
  script:
    - echo "Deploy to staging server"
    - npm install
    - npm install pm2 -g
    - pm2 start bin/www --name mms
    - ps -ef | grep mms
  environment:
    name: staging
    url: http://staging.example.com

I have deployed a nodeJS application on the server, how can I access the endpoints of the app using this URL?我已经在服务器上部署了一个 nodeJS 应用程序,如何使用这个 URL 访问应用程序的端点?

You seem to be confusing what the environment can and can not do.您似乎混淆了环境可以做什么和不能做什么。 The url variable is just for your convenience : url 变量只是为了您的方便

This is an optional value that when set, it exposes buttons in various places in GitLab which when clicked take you to the defined URL.这是一个可选值,设置后,它会在 GitLab 中的各个位置公开按钮,单击后会将您带到定义的 URL。

Gitlab doesn't create an endpoint under the URL, you supply the URL under which the application is reachable after the deploy. Gitlab 不会在 URL 下创建端点,您提供应用程序在部署后可访问的 URL。

Link to answer which solves all queries 解决所有查询的答案链接

This is most accurate answer to solve all gitlab CI queries这是解决所有 gitlab CI 查询的最准确答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM