Skip to content
Snippets Groups Projects
Verified Commit b49daa68 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

(re-)add gitlab ci pipeline

parent 150ee1b7
No related branches found
No related tags found
1 merge request!1Resolve "Add (docker) build pipeline"
Pipeline #8610 failed with stages
in 9 seconds
stages:
- build-project
- build-container
variables:
KANIKO_BUILD_IMAGENAME: admin-backend
build-project:
stage: build-project
before_script: []
script:
- echo "Building app"
- yarn
# - echo "REACT_APP_API_URL=https://oas-api.initdevelopment.com/api/v1" > .env
# - echo "EXTEND_ESLINT=true" >> .env
- yarn build
- mv build web-build
- echo "Build successful"
artifacts:
expire_in: 1 hour
name: web-build
paths:
- web-build
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:
- cp deployment/Dockerfile web-build
- cp deployment/nginx.conf web-build
- cd web-build
- 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}/web-build/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_NAME}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment