Skip to content

Minor developer-friendliness changes

Robert Speicher requested to merge rs-friendliness into master

61dcc192 - Make configure_ssh check compatible with BSD

On OSX, the BSD version of the [ program doesn't support the -v flag to check for an environment variable.

We can work around this by using -n (non-zero length string).

6b12750f - Reuse SCRIPT_DIR when sourcing configure-ssh

When run outside of Docker, we'd be unable to execute the script. Since we're already populating SCRIPT_DIR with the path of the merge-train script, we can reuse it to run configure-ssh in the same directory.

48ed010a - Optimize Docker build order

By placing the ADD call after the RUNs, we no longer invalidate the layer cache for those actions by modifying the merge-train source itself.

This speeds up image building if the only changes are in this project rather than its dependencies.

merge-train rs-friendliness % docker build -t merge-train .
Sending build context to Docker daemon  35.33kB
Step 1/8 : FROM alpine:edge
 ---> 3c791e92a856
Step 2/8 : WORKDIR /app
 ---> Using cache
 ---> 7551a8126deb
Step 3/8 : RUN mkdir -p /root/.ssh
 ---> Using cache
 ---> 8e0d5707e666
Step 4/8 : RUN chmod 700 /root/.ssh
 ---> Using cache
 ---> d74fbbf7cb2d
Step 5/8 : COPY config/known_hosts /root/.ssh/known_hosts
 ---> Using cache
 ---> e704c17bce6c
Step 6/8 : RUN apk add --update git openssh bash ruby git-lfs
 ---> Using cache
 ---> d53240ae12c8
Step 7/8 : RUN git config --global user.name 'GitLab Bot' &&     git config --global user.email gitlab-bot@gitlab.com &&     git lfs install
 ---> Using cache
 ---> 225bfc30b606
Step 8/8 : ADD . /app/
 ---> 0f0394ca22ab
Successfully built 0f0394ca22ab
Successfully tagged merge-train:latest

9dcef79e - Add a note about the realpath dependency for macOS

5d970f51 - Fix references to outdated SSH environment variables

These were refactored in 1e59bb66 but needed to be updated in the README.

3f4e2461 - Display variable status prior to execution of merge-train

>>> SOURCE_PROJECT: gitlab-org/gitlab
>>> SOURCE_BRANCH: master
>>> TARGET_PROJECT: gitlab-org/gitlab-foss
>>> TARGET_BRANCH: master
Edited by Robert Speicher

Merge request reports