mirror of
https://github.com/kubesphere/website.git
synced 2025-12-30 00:52:47 +00:00
fix: modify documents which missing the container configuration during the deploy phase in Jenkinsfile.
This commit is contained in:
parent
5c0fc85059
commit
ab62f7bda3
|
|
@ -132,15 +132,17 @@ In this example, all workloads are deployed in `kubesphere-sample-dev`. You must
|
|||
}
|
||||
|
||||
stage('deploy to dev') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
steps {
|
||||
container ('maven') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,36 +183,42 @@ You must create the projects as shown in the table below in advance. Make sure y
|
|||
}
|
||||
stage('deploy to dev') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.DEV_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/dev-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.DEV_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/dev-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('deploy to staging') {
|
||||
steps {
|
||||
input(id: 'deploy-to-staging', message: 'deploy to staging?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.TEST_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
input(id: 'deploy-to-staging', message: 'deploy to staging?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.TEST_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('deploy to production') {
|
||||
steps {
|
||||
input(id: 'deploy-to-production', message: 'deploy to production?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.PROD_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
input(id: 'deploy-to-production', message: 'deploy to production?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.PROD_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,12 +95,14 @@ With the above credentials ready, you can create a pipeline using an example Jen
|
|||
}
|
||||
stage ('deploy app') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/deploy.yaml | kubectl apply -f -'
|
||||
container ('go') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/deploy.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,12 +106,14 @@ With the above credentials ready, you can use the user `project-regular` to crea
|
|||
|
||||
stage('deploy app to multi cluster') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/multi-cluster-deploy.yaml | kubectl apply -f -'
|
||||
container('go') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/multi-cluster-deploy.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,15 +132,17 @@ kubectl get cm -n kubesphere-devops-system ks-devops-agent -o yaml
|
|||
}
|
||||
|
||||
stage('deploy to dev') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
steps {
|
||||
container ('maven') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,36 +181,42 @@ weight: 11440
|
|||
}
|
||||
stage('deploy to dev') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.DEV_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/dev-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.DEV_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/dev-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('deploy to staging') {
|
||||
steps {
|
||||
input(id: 'deploy-to-staging', message: 'deploy to staging?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.TEST_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
input(id: 'deploy-to-staging', message: 'deploy to staging?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.TEST_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('deploy to production') {
|
||||
steps {
|
||||
input(id: 'deploy-to-production', message: 'deploy to production?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.PROD_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
container('maven') {
|
||||
input(id: 'deploy-to-production', message: 'deploy to production?')
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.PROD_KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < deploy/prod-all-in-one/devops-sample.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,12 +96,14 @@ weight: 11410
|
|||
|
||||
stage ('deploy app') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/deploy.yaml | kubectl apply -f -'
|
||||
container ('go') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/deploy.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,12 +106,14 @@ weight: 11420
|
|||
|
||||
stage('deploy app to multi cluster') {
|
||||
steps {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/multi-cluster-deploy.yaml | kubectl apply -f -'
|
||||
container('go') {
|
||||
withCredentials([
|
||||
kubeconfigFile(
|
||||
credentialsId: env.KUBECONFIG_CREDENTIAL_ID,
|
||||
variable: 'KUBECONFIG')
|
||||
]) {
|
||||
sh 'envsubst < devops-go-sample/manifest/multi-cluster-deploy.yaml | kubectl apply -f -'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue