Commit 1cd9374b authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch 'use-gitlab-ci' into 'master'

build dockerfile in gitlab ci

See merge request openappstack/local-path-provisioner!1
parents a0c1b711 3e5ebf65
Pipeline #9427 passed with stages
in 4 minutes
stages:
- build-project
- build-container
variables:
KANIKO_BUILD_IMAGENAME: local-path-provisioner
build-project:
stage: build-project
image:
name: golang:1.17
script:
- ./scripts/build
artifacts:
paths:
- ./bin/local-path-provisioner
expire_in: 1 week
when: always
build-container:
stage: build-container
image:
# We need a shell to provide the registry credentials, so we need to use the
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/ --dockerfile ${CI_PROJECT_DIR}/package/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_NAME}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment