seaweedfs/.gitlab-ci.yml

26 lines
828 B
YAML
Raw Normal View History

2022-03-28 17:28:53 +00:00
build-binary-latest:
2022-03-28 17:25:53 +00:00
stage: build
image:
name: golang:1.18.0-alpine3.15
script:
2022-03-28 18:08:16 +00:00
- go build -o ./weed/weed ./weed
- cp ./weed/weed docker/weed
artifacts:
paths:
- ./weed/weed
2022-03-28 17:25:53 +00:00
2022-03-28 17:28:53 +00:00
build-container-latest:
2022-03-28 17:25:53 +00:00
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
2022-03-28 18:15:47 +00:00
needs: ["build-binary-latest"]
2022-03-28 17:25:53 +00:00
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}/docker"
2022-03-28 18:08:16 +00:00
--dockerfile "${CI_PROJECT_DIR}/docker/Dockerfile.local"
2022-03-28 17:43:03 +00:00
--destination "${CI_REGISTRY_IMAGE}:latest"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"