You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
750 B

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