stages: - build - package .build-base: image: docker.artifacts.apextoaster.com/apextoaster/base:1.5 tags: - platform:k8s - runner:shared .build-node: extends: - .build-base image: docker.artifacts.apextoaster.com/library/node:18 artifacts: expire_in: 1 day paths: - out/ reports: coverage_report: coverage_format: cobertura path: out/coverage/cobertura-coverage.xml junit: out/test-results.xml cache: key: files: - yarn.lock paths: - node_modules/ policy: pull-push .build-dind: extends: - .build-base image: docker.artifacts.apextoaster.com/apextoaster/docker:20.10 services: - docker.artifacts.apextoaster.com/apextoaster/docker-dind:20.10 tags: - platform:k8s - runner:shared allow_failure: false before_script: - mkdir ${HOME}/.docker - echo "${DOCKER_SECRET}" | base64 -d > ${HOME}/.docker/config.json script: - ${CI_PROJECT_DIR}/scripts/image-build.sh --push after_script: - rm -rfv ${HOME}/.docker variables: DOCKER_CERT_PATH: "/shared/docker/client" DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://localhost:2376 DOCKER_NAME: "${CI_PROJECT_PATH}" DOCKER_TLS_CERTDIR: "/shared/docker" DOCKER_TLS_VERIFY: 1 IMAGE_FILE: Containerfile IMAGE_ROOT: "${CI_PROJECT_DIR}" VERSION_TAG: "${CI_COMMIT_REF_SLUG}" build-js: extends: - .build-node stage: build script: - make ci package-oci: extends: - .build-dind stage: package needs: - build-js package-npm: extends: - .build-node stage: package needs: - build-js only: - tags script: - npm publish