当前位置: 首页 > news >正文

域名跟空间都有了怎么做网站网站直播间怎么做

域名跟空间都有了怎么做网站,网站直播间怎么做,设计经典网站,企业网站营销的实现方式解读在Jenkins 中先创建一个任务名称 然后进行下一步#xff0c;放一个项目 填写一些参数 参数1#xff1a; 参数2#xff1a; 参数3#xff1a;参数4#xff1a; 点击保存就行了 配置脚本 // git def git_url http://gitlab.xxxx.git def git_auth_id GITEE_RIVER…在Jenkins 中先创建一个任务名称 然后进行下一步放一个项目 填写一些参数 参数1 参数2 参数3参数4 点击保存就行了 配置脚本 // git def git_url http://gitlab.xxxx.git def git_auth_id GITEE_RIVERBIED// harbor def harbor_host 10.0.165.17:5000 def harbor_project test def harbor_crt_id HARBOR_CRT_ID// k8s shf def k8s_crt_id KUBE_CONFIG_FILE_ID def k8s_namespace test-web// common def api_name test-web def docker_file_path def docker_image ${harbor_host}/${harbor_project}/${api_name}:${SERVICE_VERSION}-${ENVIRONMENT.toLowerCase()} def service_node_port def current_timespan System.currentTimeMillis().toString()pipeline {agent anytools {nodejs nodejs14.15.1}stages {stage(参数初始化代码拉取) {steps {script {api_name test-webdocker_file_path Dockerfiledocker_image ${harbor_host}/${harbor_project}/${api_name}-${ENVIRONMENT.toLowerCase()}:${SERVICE_VERSION}_${current_timespan}service_node_port 30992}dir(${ENVIRONMENT.toLowerCase()}) {// 如果是公开仓库可以直接使用 git url: ${git_url} 拉取代码git branch: BRANCH, credentialsId: ${git_auth_id}, url: ${git_url}}}}stage(依赖安装) {steps {dir(${ENVIRONMENT.toLowerCase()}) {sh (script: npm install --registryhttps://registry.npm.taobao.org)}}}stage(代码编译) {steps {dir(${ENVIRONMENT.toLowerCase()}) {sh (script: npm run build)}}}stage(镜像构建) {steps {dir(${ENVIRONMENT.toLowerCase()}) {sh (script: oldImage\$(docker images ${harbor_host}/${harbor_project}/${api_name}:${SERVICE_VERSION} | grep ${api_name} | awk \{ print \$1:\$2 }\)if [ -z \$oldImage ]; thenecho 正常构建镜像elseecho 删除存在镜像docker rmi \$oldImagefi)sh pwd// 生成镜像sh docker build -t ${docker_image} -f ${docker_file_path} .// 查看镜像sh docker images ${harbor_host}/${harbor_project}/${api_name}}}}stage(镜像上传) {steps {withCredentials([usernamePassword(credentialsId: ${harbor_crt_id}, passwordVariable: harbor_password, usernameVariable: harbor_user_name)]) {sh (script: # 登录镜像仓库HARBOR_PASSWORD${harbor_password} echo \$HARBOR_PASSWORD | docker login ${harbor_host} -u ${harbor_user_name} --password-stdin# 推送镜像docker push ${docker_image}# 登出docker logout ${harbor_host}# 删除镜像docker rmi ${docker_image})}}}stage(发布到K8S) {steps {dir(${ENVIRONMENT.toLowerCase()}) {sh api_name${api_name}deploy_api_name\${api_name}export REGISTRY_HOST_IMAGE${docker_image}export SERVICE_NAME\${deploy_api_name}export SERVICE_VERSION\${SERVICE_VERSION}export SERVICE_DEPLOYNAME_NAME\${deploy_api_name}-deploymentexport ASPNETCORE_ENVIRONMENT${ENVIRONMENT}export SERVICE_SERVICE_NAME\${deploy_api_name}-serviceexport SERVICE_SERVICE_PORT_NAME\${deploy_api_name}-portexport SERVICE_SERVICE_SELECT_NAME\${deploy_api_name}export SERVICE_SERVICE_NODE_PORT${service_node_port}export SERVICE_REPLICAS${REPLICAS}export K8S_DEPLOY_NAMESPACE${k8s_namespace}envsubst deploy/k8s-master/template/api-deployment.yaml deploy/k8s-master/template/api-real-deployment.yamlecho deployment发布内容cat deploy/k8s-master/template/api-real-deployment.yamlenvsubst deploy/k8s-master/template/api-service.yaml deploy/k8s-master/template/api-real-service.yamlecho service发布内容cat deploy/k8s-master/template/api-real-service.yamlwithKubeConfig([credentialsId: ${k8s_crt_id}]) {sh kubectl apply -f deploy/k8s-master/template/api-real-deployment.yamlsh kubectl apply -f deploy/k8s-master/template/api-real-service.yaml}}}}} } 在harbor网站里创建一个项目对应harbor_project 与脚本相互对应 如果不创建镜像创建不成功 在下面这个网站里创建一个k8s_namespace 与上面的脚本相互对应 如果不创建发布到k8s会报错 然后还有一个Dockerfile文件 FROM nginx COPY dist/ /var/test/html/ COPY dockerConf/default.conf /etc/nginx/conf.d/ EXPOSE 80 EXPOSE 443 然后还要在dockerConf文件夹下创建一个default.conf文件 server {listen 80;server_name ;gzip on;gzip_min_length 1k;gzip_buffers 4 16k;gzip_http_version 1.1;gzip_comp_level 6;gzip_types text/plain application/javascript application/x-javascript text/css application/css application/xml application/xmlrss text/javascript application/x-httpd-php imagzip_disable MSIE [1-6]\.;gzip_vary on;access_log /var/log/nginx/access.log;location / { root /var/test/html/; index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s\$1 last; break; } } } 各种配置完之后运行一下 接下来成功会变成这样如果失败了会在具体的哪一步报错根据错误信息去修改有时候网速慢会在下载依赖的时候就会报错 这就成了
http://www.dnsts.com.cn/news/172574.html

相关文章:

  • 淘宝客返利网站开发山东网站建设模板制作
  • 网站毕业设计任务书银川软件开发公司
  • HTML网站建设课程网站建设项目背景
  • 网站站内推广计划书素材天下免费素材网
  • 台前网站建设费用wordpress启动慢
  • 如何判断网站是用织梦做的专门做家具网站
  • 渌口区市政建设局网站怎么查看自己网站有没有做301
  • 德阳网站开发wordpress设计模式
  • 河南网站建设价位北流市建设局网站
  • 做自己的网站给人的启发免费网站如何做推广
  • 网站的布局方式有哪些互联网公司花名大全男
  • 电商网站建设推荐阿里低代码开发平台
  • 信誉好的菏泽网站建设做视频链接网站
  • 做计算机网站有哪些内容电子商务网站建设试题及答案
  • 湖北城乡住房建设厅网站上海网站推广策划
  • 汶上1500元网站建设高端品牌女装连衣裙
  • 网站的建设ppt模板如何用ps做网站标识
  • 有关于网站建设类似的文章前端招聘网站
  • 用asp.net做的网站贴吧美的技术网站
  • 运营电商是做什么的seo是什么意思中文翻译
  • 皮革 东莞网站建设电子商务大专出来都去干嘛了
  • 网站建设公司广告词宣传片拍摄流程
  • 有关网站开发的创意手机百度怎么翻译网页
  • 上海知名网站设计seo关键词优化要多少钱
  • 唐山网站建设|唐山网站制作|公司建站666起|唐山红城网络h5入口
  • 五台县建设局网站魔鬼做交易网站
  • 上海的网站设计公司价格三亚有线电视微信公众号
  • 网站维护建设需要什么花费最佳线上网站建设费用
  • 天门网站建设设计网站如何清除百度收录
  • 建设部网站八大员查询百度 网站 移动端