Skip to content
Snippets Groups Projects
.gitlab-ci.yml 797 B
Newer Older
  • Learn to ignore specific revisions
  • Jonas Leder's avatar
    Jonas Leder committed
    .parallel:
      parallel:
        matrix:
        - GOOS: "linux"
          GOARCH:
          - amd64
          - arm64
        - GOOS: "windows"
          GOARCH:
          - amd64
          - arm64
        - GOOS: "darwin"
          GOARCH:
          - amd64
          - arm64
    
    stages:
    - build
    - deploy
    
    build-application-binary:
      stage: build
      needs: []
      parallel: !reference [ .parallel, parallel ]
    
      image: golang:1.23.6
    
    Jonas Leder's avatar
    Jonas Leder committed
      script:
      - CGO_ENABLED=0 go build -ldflags="-s -w" -o ems-esp-logger-${GOOS}-${GOARCH} ./
      - "if [ \"${GOOS}\" = \"windows\" ]; then
    
        \  mv ems-esp-logger-${GOOS}-${GOARCH} ems-esp-logger-${GOOS}-${GOARCH}.exe\ 
    
        fi\n"
      artifacts:
        paths:
        - ems-esp-logger-${GOOS}-${GOARCH}
        - ems-esp-logger-${GOOS}-${GOARCH}.exe
        expire_in: 1 week
    
    include:
    - project: 'infra/ci'
      file: '/pipelines/docker.yml'