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

Improve deploy process using custom github action #463

Merged
merged 9 commits into from
Jul 26, 2024

Conversation

amishas157
Copy link
Contributor

@amishas157 amishas157 commented Jul 26, 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.

What

This PR updates deploy github workflow such that,

  • we can deploy any branch to dev
  • we can deploy only master branch to prod

This PR also deletes the prod.yml workflow file as it is not needed anymore.

Why

The existing workflow to use two branches - release and master and then auto-creating a PR to release is not smooth. There occurs merge conflicts often.

Known limitations

None. See testing results in comments below

@amishas157
Copy link
Contributor Author

amishas157 commented Jul 26, 2024

Test 1:

  • Use this branch to deploy
    Screenshot 2024-07-26 at 9 20 42 AM

The middle column in following shows branch name
Screenshot 2024-07-26 at 9 20 14 AM
Screenshot 2024-07-26 at 9 23 06 AM

I changed image_name from stellar/stellar-etl:741ee9b to image_name": "stellar/stellar-etl:ab57fa4

Verify the results in airflow variables
Screenshot 2024-07-26 at 9 22 14 AM

@amishas157
Copy link
Contributor Author

Results of if else condition:

  1. use test-deploy-workflow branch and deploy to dev
    https://github.com/stellar/stellar-etl-airflow/actions/runs/10115434110

✅ Deploys to dev from feature branch
Screenshot 2024-07-26 at 12 56 30 PM

  1. use test-deploy-workflow branch and deploy to prod
    https://github.com/stellar/stellar-etl-airflow/actions/runs/10115435419

✅ Skips deploys to prod from feature branch
Screenshot 2024-07-26 at 12 57 21 PM

  1. use test-release-master branch and deploy to dev (note that I am using test-release-master branch in place of master master for testing, i will replace test-release-master to master before merging)

✅ Deploys to dev from master branch
https://github.com/stellar/stellar-etl-airflow/actions/runs/10115438470
Screenshot 2024-07-26 at 12 57 55 PM

  1. use test-release-master branch and deploy to prod
    https://github.com/stellar/stellar-etl-airflow/actions/runs/10115440116

✅ Deploys to prod from master branch
Screenshot 2024-07-26 at 12 58 37 PM

@amishas157 amishas157 force-pushed the test-deploy-workflow branch from 50e12a0 to 72a94df Compare July 26, 2024 18:10
- name: Display Environment Name
run: echo "Hello ${{ inputs.envName }}"

pre-commit:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not needed anymore. We would require it only for merging

@amishas157 amishas157 marked this pull request as ready for review July 26, 2024 18:20
@amishas157 amishas157 requested a review from a team as a code owner July 26, 2024 18:20
@amishas157 amishas157 changed the title update dev variabe to test Improve deploy proces Jul 26, 2024
@amishas157 amishas157 changed the title Improve deploy proces Improve deploy process using custom github action Jul 26, 2024
@amishas157 amishas157 merged commit c3170a3 into master Jul 26, 2024
2 checks passed
@amishas157 amishas157 deleted the test-deploy-workflow branch July 26, 2024 18:48
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