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

Build docker image using github actions #276

Merged
merged 7 commits into from
Aug 20, 2024
Merged

Conversation

amishas157
Copy link
Contributor

@amishas157 amishas157 commented Aug 9, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the README with the added features, breaking changes, new instructions on how to use the repository. I updated the description of the fuction with the changes that were made.

Release planning

  • I've decided if this PR requires a new major/minor/patch version accordingly to
    semver, and I've changed the name of the BRANCH to release/_ , feature/_ or patch/* .

What

This PR adds a github workflow which can be triggered manually to build and push docker image from a branch. This workflow pushes image to stellar-etl-dev dockerhub repo.

Why

Currently developer executes make-docker build command locally to build docker image for testing and pushes to personal dockerhub accounts. The github action will help to keep consistency in dev experience. We can decide later if we would like to build image on certain commit message etc

Tested using airflow branch https://github.com/stellar/stellar-etl-airflow/pull/480/files

Known limitations

[TODO or N/A]

@amishas157 amishas157 force-pushed the docker-image-using-gh branch 3 times, most recently from 925622c to acc7584 Compare August 9, 2024 21:25
update

update

update

update

override

update
@amishas157 amishas157 force-pushed the docker-image-using-gh branch from 16d2505 to 37fa6a5 Compare August 9, 2024 21:32
use the right sha?
@amishas157 amishas157 force-pushed the docker-image-using-gh branch from 9c27cda to 68fafd9 Compare August 9, 2024 21:46
@amishas157 amishas157 marked this pull request as ready for review August 20, 2024 19:59
@amishas157 amishas157 requested a review from a team as a code owner August 20, 2024 19:59
Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +7 to +8
DEFAULT_ETLHASH := stellar/stellar-etl:$(shell git rev-parse --short=9 HEAD)
ETLHASH ?= $(DEFAULT_ETLHASH)
Copy link
Contributor

Choose a reason for hiding this comment

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

curious: why this was split into two vars?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To support both versions - local build and github action build. If we use make docker-build locally, it will use ETLHASH = DEFAULT_ETLHASH. Otherwise, for github action, ETLHASH is passed as override env variable from branch

ETLHASH: stellar/stellar-etl-dev:${SHORT_SHA}

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, makes sense. Thanks 🙏

@amishas157 amishas157 merged commit eea48fb into master Aug 20, 2024
8 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.

2 participants