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.

24 lines
734 B

3 years ago
  1. build_binary_latest:
  2. stage: build
  3. image:
  4. name: golang:1.18.0-alpine3.15
  5. script:
  6. - go build -o ./weed/weed ./weed
  7. rules:
  8. - if: $CI_COMMIT_TAG
  9. build_container_latest:
  10. stage: build
  11. image:
  12. name: gcr.io/kaniko-project/executor:debug
  13. entrypoint: [""]
  14. script:
  15. - mkdir -p /kaniko/.docker
  16. - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
  17. - >-
  18. /kaniko/executor
  19. --context "${CI_PROJECT_DIR}/docker"
  20. --dockerfile "${CI_PROJECT_DIR}/docker/Dockerfile.go_build"
  21. --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
  22. rules:
  23. - if: $CI_COMMIT_TAG