stages: - compile - build # Workaround for ipv6 issues default: before_script: - alias npm="node --dns-result-order=ipv4first $(which npm)" compile: stage: compile image: node:lts-alpine script: - npm install - npm run webpack artifacts: paths: - dist/ expire_in: 1h build-docker-image: stage: build variables: COMPONENT_NAME: demonstrator VERSION_TAG: latest image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] rules: - if: '$CI_COMMIT_BRANCH == "master"' when: on_success dependencies: - compile 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}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}/${COMPONENT_NAME}:${VERSION_TAG}"