Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 If seed dir exists on the filesystem, don't clone it in the dockerfile #576

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

fabianvf
Copy link
Contributor

@fabianvf fabianvf commented Dec 12, 2023

This was the simplest way to do it I think, without requiring Makefile updates to pass along build-args and dealing with various values. If you just drop tackle2-seed into the project it won't clone it anymore.

@fabianvf fabianvf changed the title If seed dir exists on the filesystem, don't clone it in the dockerfile 🌱 If seed dir exists on the filesystem, don't clone it in the dockerfile Dec 12, 2023
@fabianvf
Copy link
Contributor Author

The failing test is from ruleset changes that have broken CI, unrelated to this PR (this PR is the first step to gating that repo so we stop getting breakages)

Copy link
Contributor

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a huge +1 I almost feel like we need to merge this red

RUN git clone --branch ${SEED_BRANCH} https://github.com/${SEED_PROJECT}
RUN if [ ! -d "/opt/app-root/src/tackle2-seed" ]; then \
git clone --branch ${SEED_BRANCH} https://github.com/${SEED_PROJECT} /opt/app-root/src/tackle2-seed; \
fi
Copy link
Contributor

@jortel jortel Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a var for the seed root directory would be better to ensure it's the same everywhere.
Like:

ARG SEED_ROOT=/opt/app-root/src/tackle2-seed
RUN if [ ! -d "${SEED_ROOT}" ]; then \
      git clone --branch ${SEED_BRANCH} https://github.com/${SEED_PROJECT} ${SEED_ROOT}; \
    fi

Then below:

COPY --from=builder ${SEED_ROOT}/resources/ /tmp/seed

Signed-off-by: Fabian von Feilitzsch <fabian@fabianism.us>
Copy link
Contributor

@jortel jortel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabianvf fabianvf merged commit b59c2c7 into konveyor:main Dec 13, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants