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

chore(publish): skip image/ami creation if not on production #1700

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

smerle33
Copy link
Contributor

to avoid creating AMI or Azure IMAGE if not on production, will save time on PR checks

@smerle33 smerle33 marked this pull request as ready for review January 29, 2025 20:19
@smerle33 smerle33 requested a review from dduportal January 29, 2025 20:19
Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

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

There are 3 types of builds (check

PKR_VAR_build_type = "${env.TAG_NAME ? 'prod' : (env.BRANCH_IS_PRIMARY ? 'staging' : 'dev') }"
to see how the Terraform variable is defined):

  • prod is when the build was triggered by a git tag
  • staging is when the build is triggered on the main branch
  • dev for the others (PR, local tests, etc.).

Your change works as expected (the PR did skip successfully the AMI and Azure image creation, decrerasing the effective build time to 51 min instead of > 1h10).
BUT we want to have AMIs created on "staging" (e.g. on build of the main branch) to allow testing new AMIs

sources.pkr.hcl Outdated Show resolved Hide resolved
sources.pkr.hcl Outdated Show resolved Hide resolved
@dduportal dduportal merged commit 24d576c into jenkins-infra:main Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants