diff --git a/content/en/docs/devops-user-guide/examples/go-project-pipeline.md b/content/en/docs/devops-user-guide/examples/go-project-pipeline.md index 8c61cd0b1..f64fc1813 100644 --- a/content/en/docs/devops-user-guide/examples/go-project-pipeline.md +++ b/content/en/docs/devops-user-guide/examples/go-project-pipeline.md @@ -36,7 +36,7 @@ You need to create credentials in KubeSphere for the access token created so tha 1. Log in to the web console of KubeSphere as `project-regular`. Go to your DevOps project and click **Create** in **Credentials**. - ![create-dockerhub-id](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.jpg) + ![create-dockerhub-id](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.png) 2. In the dialog that appears, set a **Credential ID**, which will be used later in the Jenkinsfile, and select **Account Credentials** for **Type**. Enter your Docker Hub account name for **Username** and the access token just created for **Token/Password**. When you finish, click **OK**. @@ -58,21 +58,21 @@ With the above credentials ready, you can create a pipeline using an example Jen 1. To create a pipeline, click **Create** on the **Pipelines** page. - ![create-pipeline](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.jpg) + ![create-pipeline](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.png) 2. Set a name in the pop-up window and click **Next** directly. - ![set-pipeline-name](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.jpg) + ![set-pipeline-name](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.png) 3. In this tutorial, you can use default values for all the fields. In **Advanced Settings**, click **Create** directly. - ![create-pipeline-2](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.jpg) + ![create-pipeline-2](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.png) ## Edit the Jenkinsfile 1. In the pipeline list, click this pipeline to go to its detail page. Click **Edit Jenkinsfile** to define a Jenkinsfile and your pipeline runs based on it. - ![edit-jenkinsfile](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.jpg) + ![edit-jenkinsfile](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.png) 2. Copy and paste all the content below to the pop-up window as an example Jenkinsfile for your pipeline. You must replace the value of `DOCKERHUB_USERNAME`, `DOCKERHUB_CREDENTIAL`, `KUBECONFIG_CREDENTIAL_ID`, and `PROJECT_NAME` with yours. When you finish, click **OK**. @@ -83,22 +83,22 @@ With the above credentials ready, you can create a pipeline using an example Jen label 'maven' } } - + environment { - // the address of your harbor registry + // the address of your Docker Hub registry REGISTRY = 'docker.io' - // your docker hub username - DOCKERHUB_USERNAME = 'yuswift' - // docker image name + // your Docker Hub username + DOCKERHUB_USERNAME = 'Docker Hub Username' + // Docker image name APP_NAME = 'devops-go-sample' - // ‘dockerhubid’ is the credential id you created in KubeSphere for docker access token + // ‘dockerhubid’ is the credentials ID you created in KubeSphere with Docker Hub Access Token DOCKERHUB_CREDENTIAL = credentials('dockerhubid') - //the kubeconfig credential id you created in KubeSphere + // the kubeconfig credentials ID you created in KubeSphere KUBECONFIG_CREDENTIAL_ID = 'go' // the name of the project you created in KubeSphere, not the DevOps project name PROJECT_NAME = 'devops-go' } - + stages { stage('docker login') { steps{ @@ -107,7 +107,7 @@ With the above credentials ready, you can create a pipeline using an example Jen } } } - + stage('build & push') { steps { container ('maven') { @@ -138,18 +138,18 @@ If your pipeline runs successfully, images will be pushed to Docker Hub. If you 1. After you finish the Jenkinsfile, you can see graphical panels display on the dashboard. Click **Run** to run the pipeline. - ![run-pipeline](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.jpg) + ![run-pipeline](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.png) 2. In **Activity**, you can see the status of the pipeline. It may take a while before it successfully runs. - ![pipeline-running](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.jpg) + ![pipeline-running](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.png) ## Verify Results 1. A **Deployment** will be created in the project specified in the Jenkinsfile if the pipeline runs successfully. - ![view-deployments](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.jpg) + ![view-deployments](/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.png) 2. Check whether the image is pushed to Docker Hub as shown below: diff --git a/content/zh/docs/devops-user-guide/examples/go-project-pipeline.md b/content/zh/docs/devops-user-guide/examples/go-project-pipeline.md index 32a8bcf2b..d84258ce8 100644 --- a/content/zh/docs/devops-user-guide/examples/go-project-pipeline.md +++ b/content/zh/docs/devops-user-guide/examples/go-project-pipeline.md @@ -36,11 +36,11 @@ weight: 11410 1. 以 `project-regular` 身份登录 KubeSphere Web 控制台,转到您的 DevOps 工程,在**凭证**页面点击**创建**。 - ![创建 DockerHub ID](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub-id.PNG) + ![创建 DockerHub ID](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub_id.png) 2. 在弹出对话框中,设置**凭证 ID**,稍后会用于 Jenkinsfile 中,**类型**选择**帐户凭证**。**用户名**输入您的 Docker Hub 帐户名称,**token / 密码**中输入刚刚创建的访问令牌。操作完成后,点击**确定**。 - ![创建 Docker 凭证](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker-create.PNG) + ![创建 Docker 凭证](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker_create.png) {{< notice tip >}} @@ -72,7 +72,7 @@ weight: 11410 1. 在流水线列表中,点击该流水线进入其详情页面。点击**编辑 Jenkinsfile** 定义一个 Jenkinsfile,流水线会基于它来运行。 - ![编辑 jenkinsfile](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit-jenkinsfile.PNG) + ![编辑 jenkinsfile](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit_jenkinsfile.png) 2. 将以下所有内容复制并粘贴到弹出窗口中,用作流水线的示例 Jenkinsfile。您必须将 `DOCKERHUB_USERNAME`、`DOCKERHUB_CREDENTIAL`、`KUBECONFIG_CREDENTIAL_ID` 和 `PROJECT_NAME` 的值替换成您自己的值。操作完成后,点击**确定**。 @@ -83,22 +83,22 @@ weight: 11410 label 'maven' } } - + environment { - // the address of your harbor registry + // 您 Docker Hub 仓库的地址 REGISTRY = 'docker.io' - // your docker hub username - DOCKERHUB_USERNAME = 'yuswift' - // docker image name + // 您的 Docker Hub 用户名 + DOCKERHUB_USERNAME = 'Docker Hub Username' + // Docker 镜像名称 APP_NAME = 'devops-go-sample' - // ‘dockerhubid’ is the credential id you created in KubeSphere for docker access token + // ‘dockerhubid’ 是您在 KubeSphere 用 Docker Hub 访问令牌创建的凭证 ID DOCKERHUB_CREDENTIAL = credentials('dockerhubid') - //the kubeconfig credential id you created in KubeSphere + // 您在 KubeSphere 创建的 kubeconfig 凭证 ID KUBECONFIG_CREDENTIAL_ID = 'go' - // the name of the project you created in KubeSphere, not the DevOps project name + // 您在 KubeSphere 创建的项目名称,不是 DevOps 工程名称 PROJECT_NAME = 'devops-go' } - + stages { stage('docker login') { steps{ @@ -107,7 +107,7 @@ weight: 11410 } } } - + stage('build & push') { steps { container ('maven') { @@ -138,18 +138,18 @@ weight: 11410 1. Jenkinsfile 设置完成后,您可以在仪表板上查看图形面板。点击**运行**来运行流水线。 - ![运行流水线](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run-pipeline.PNG) + ![运行流水线](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run_pipeline.png) 2. 在**活动**选项卡中,您可以查看流水线的状态。稍等片刻,流水线便会成功运行。 - ![流水线成功运行](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline-running.PNG) + ![流水线成功运行](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline_running.png) ## 验证结果 1. 如果流水线成功运行,则会在 Jenkinsfile 中指定的项目中创建一个**部署 (Deployment)**。 - ![查看部署](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view-deployment.PNG) + ![查看部署](/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view_deployment.png) 2. 查看镜像是否已推送至 Docker Hub,如下所示: diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.jpg deleted file mode 100644 index a3e5df495..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.png new file mode 100644 index 000000000..7db501461 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-dockerhub-id.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.jpg deleted file mode 100644 index 5c297a20a..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.png new file mode 100644 index 000000000..c318709e0 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline-2.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.jpg deleted file mode 100644 index 3294b5011..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.png new file mode 100644 index 000000000..e4dc93865 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/create-pipeline.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.jpg deleted file mode 100644 index e27c7934e..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.png new file mode 100644 index 000000000..4ec504353 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/edit-jenkinsfile.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.jpg deleted file mode 100644 index 525d4df20..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.png new file mode 100644 index 000000000..730920f3e Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/pipeline-running.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.jpg deleted file mode 100644 index a0e945fc6..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.png new file mode 100644 index 000000000..8ad963dfb Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/run-pipeline.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.jpg deleted file mode 100644 index fbdc10601..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.png new file mode 100644 index 000000000..c027060b4 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/set-pipeline-name.png differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.jpg b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.jpg deleted file mode 100644 index 9d553876f..000000000 Binary files a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.jpg and /dev/null differ diff --git a/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.png b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.png new file mode 100644 index 000000000..590a08fa5 Binary files /dev/null and b/static/images/docs/devops-user-guide/examples/compile-and-deploy-a-go-project/view-deployments.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub-id.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub-id.PNG deleted file mode 100644 index f50e3a73c..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub-id.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub_id.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub_id.png new file mode 100644 index 000000000..003296a48 Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/create-dockerhub_id.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker-create.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker-create.PNG deleted file mode 100644 index d959cbace..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker-create.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker_create.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker_create.png new file mode 100644 index 000000000..102250b90 Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/credential-docker_create.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit-jenkinsfile.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit-jenkinsfile.PNG deleted file mode 100644 index 68816d910..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit-jenkinsfile.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit_jenkinsfile.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit_jenkinsfile.png new file mode 100644 index 000000000..4d8a4ae7c Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/edit_jenkinsfile.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline-running.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline-running.PNG deleted file mode 100644 index 3572d280a..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline-running.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline_running.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline_running.png new file mode 100644 index 000000000..003748254 Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/pipeline_running.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run-pipeline.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run-pipeline.PNG deleted file mode 100644 index ca7896854..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run-pipeline.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run_pipeline.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run_pipeline.png new file mode 100644 index 000000000..3d9aab33b Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/run_pipeline.png differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view-deployment.PNG b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view-deployment.PNG deleted file mode 100644 index 124fc218a..000000000 Binary files a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view-deployment.PNG and /dev/null differ diff --git a/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view_deployment.png b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view_deployment.png new file mode 100644 index 000000000..f4cf97485 Binary files /dev/null and b/static/images/docs/zh-cn/devops-user-guide/examples/build-and-deploy-a-go-project/view_deployment.png differ