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.

26 lines
857 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. build-binary-latest:
  2. stage: build
  3. image:
  4. name: golang:1.18.0-alpine3.15
  5. script:
  6. - apk add git build-base
  7. - go build -o ./weed/weed ./weed
  8. - cp ./weed/weed docker/weed
  9. artifacts:
  10. paths:
  11. - ./weed/weed
  12. build-container-latest:
  13. stage: build
  14. image:
  15. name: gcr.io/kaniko-project/executor:debug
  16. entrypoint: [""]
  17. needs: ["build-binary-latest"]
  18. script:
  19. - mkdir -p /kaniko/.docker
  20. - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
  21. - >-
  22. /kaniko/executor
  23. --context "${CI_PROJECT_DIR}/docker"
  24. --dockerfile "${CI_PROJECT_DIR}/docker/Dockerfile.local"
  25. --destination "${CI_REGISTRY_IMAGE}:latest"
  26. --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"