Browse Source

update

master
domsgit 5 years ago
parent
commit
402befa245
2 changed files with 2 additions and 3 deletions
  1. 2
      Jenkinsfile
  2. 3
      main.go

2
Jenkinsfile

@ -40,7 +40,7 @@ node('haimaxy-jnlp') {
//) //)
//echo "This is a deploy step to ${userInput.Env}" //echo "This is a deploy step to ${userInput.Env}"
sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s.yaml" sh "sed -i 's/<BUILD_TAG>/${build_tag}/' k8s.yaml"
sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s.yaml"
//sh "sed -i 's/<BRANCH_NAME>/${env.BRANCH_NAME}/' k8s.yaml"
} }
stage('Deploy') { stage('Deploy') {
echo "6. Deploy Stage" echo "6. Deploy Stage"

3
main.go

@ -4,10 +4,9 @@ package main
// Import os so we can read environment variables from the system // Import os so we can read environment variables from the system
import ( import (
"fmt" "fmt"
"os"
) )
func main() { func main() {
fmt.Println("Hello, Kubernetes!I'm from Jenkins CI!") fmt.Println("Hello, Kubernetes!I'm from Jenkins CI!")
fmt.Println("BRANCH_NAME:", os.Getenv("branch"))
// fmt.Println("BRANCH_NAME:", os.Getenv("branch"))
} }
Loading…
Cancel
Save