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

ci: use GIT_REF for building docker image when set #1218

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

siddarthkay
Copy link
Contributor

Description

This PR updates the build stage which builds the Docker Image to use GIT_REF when its set.
This ensures that when we perform a parameterised build from Jenkins we actually get a docker image from the branch or commit we set in GIT_REF

Copy link
Collaborator

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

LGTM, does this mean specific commit build was never working?

@chaitanyaprem chaitanyaprem merged commit 1a96cd2 into master Sep 11, 2024
12 checks passed
@chaitanyaprem chaitanyaprem deleted the build-docker-image-from-git-ref branch September 11, 2024 05:18
Copy link
Contributor

@jakubgs jakubgs left a comment

Choose a reason for hiding this comment

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

This is wrong. GIT_REF is used to specify what version should be built, GIT_COMMIT is the variable set by Jenkins based on what has been actually checked out:

GIT_COMMIT - The commit hash being checked out.
https://ci.status.im/env-vars.html/

You should not use GIT_REF for at least two reasons:

  • It can be anything: branch, tag, or a commit.
  • It might not be set at all if build source version is hardcoded.

You will need to undo or revert this commit.

siddarthkay added a commit that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants