You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
971 B

  1. ---
  2. .build-container:
  3. cache:
  4. key: $CI_COMMIT_REF_SLUG
  5. paths:
  6. - image-cache
  7. tags:
  8. - ffci
  9. stage: build
  10. image:
  11. name: gcr.io/kaniko-project/executor:debug
  12. entrypoint: ['']
  13. variables:
  14. TAG: $CI_COMMIT_SHORT_SHA
  15. PROJECT_DIR: $CI_PROJECT_DIR
  16. DOCKERFILE: Dockerfile
  17. GODEBUG: "http2client=0"
  18. before_script:
  19. - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n ${CI_REGISTRY_USER}:${CI_REGISTRY_PASSWORD} | base64)\"}}}" > /kaniko/.docker/config.json
  20. script:
  21. - /kaniko/executor --cache=true
  22. --cache-dir=image-cache
  23. --context $PROJECT_DIR
  24. --dockerfile $PROJECT_DIR/$DOCKERFILE
  25. --label 'git-branch'=$CI_COMMIT_REF_SLUG
  26. --label 'git-tag=$CI_COMMIT_TAG'
  27. --destination $PIPELINE_IMAGE
  28. pipeline-image:
  29. extends: .build-container
  30. variables:
  31. DOCKERFILE: pipeline.Dockerfile