kind: pipeline name: default steps: - name: Build image: golang:1.23.2 environment: GO111MODULE: on commands: - echo "Building the Go project with run_mode=test" - go build -o myapp -ldflags "-X main.RunMode=test" - ls -lh - ./myapp - name: Deploy to Docker Container image: docker commands: - echo "Stopping and removing the old container if it exists" - docker stop myapp_container || true - docker rm myapp_container || true - echo "Deploying the application to a new Docker container" - docker build -t myapp:test . - docker run -d -p 11000:11000 --name myapp_container myapp:test