Commit c263bd54 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '2-unable-to-relocate-in-a-subdirectory' into 'master'

Resolve "Unable to relocate in a subdirectory"

Closes #2

See merge request to-be-continuous/make!14
parents 30633b3a eeb3bc88
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ The GNU Make template uses some global configuration used throughout all jobs.
| Name                  | description                            | default value     |
| --------------------- | -------------------------------------- | ----------------- |
| `MAKE_IMAGE`          | The Docker image used to run GNU Make<br/>:warning: **set the image required by your project** (see next chapter)  | `registry.hub.docker.com/alpinelinux/build-base` |
| `MAKE_PROJECT_DIR`    | The root directory of the Makefile project. | `.` |

### Which image?

+6 −0
Original line number Diff line number Diff line
@@ -13,6 +13,12 @@
      "name": "MAKE_BUILD_ARGS",
      "description": "Make [options](https://www.gnu.org/software/make/manual/html_node/Options-Summary.html) and [goals](https://www.gnu.org/software/make/manual/html_node/Goals.html) for the build & test job",
      "default": "all test"
    },
    {
      "name": "MAKE_PROJECT_DIR",
      "description": "Makefile root directory",
      "default": ".",
      "advanced": true
    }
  ]
}
+7 −3
Original line number Diff line number Diff line
@@ -64,6 +64,9 @@ variables:
  # Default arguments for 'build' command
  MAKE_BUILD_ARGS: "all test"

  # Default Makefile project root directory
  MAKE_PROJECT_DIR: .

  # default production ref name (pattern)
  PROD_REF: '/^(master|main)$/'
  # default integration ref name (pattern)
@@ -352,6 +355,7 @@ stages:
    - *make-scripts
    - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
    - maybe_install_make
    - cd $MAKE_PROJECT_DIR
  # Cache downloaded dependencies and plugins between builds.
  # To keep cache across branches add 'key: "$CI_JOB_NAME"'
  # TODO (if necessary): define cache policy here
@@ -359,7 +363,7 @@ stages:
    # cache shall be per branch per template
    key: "$CI_COMMIT_REF_SLUG-make"
    paths:
      - .cache/
      - $MAKE_PROJECT_DIR/.cache/

# build & test job
make-build:
@@ -371,5 +375,5 @@ make-build:
    name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
    expire_in: 1 day
    paths:
        - build/
        - reports/
        - $MAKE_PROJECT_DIR/build/
        - $MAKE_PROJECT_DIR/reports/