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(action): Prepare containers release for v4 #3597

Merged
merged 6 commits into from Apr 2, 2024

Conversation

jfagoagas
Copy link
Member

Context

For the upcoming Prowler v4 we need to be able to handle different paths for both v3 and v4 while releasing packages or pushing latest changes.

Description

  • Remove PR automation to update version in the configuration file since it is no longer needed.
  • Handle v3 and v4 version while pushing containers.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jfagoagas jfagoagas added no-merge Please, DO NOT MERGE this PR. testing-pending backport-v3 Pending to port to Prowler v3 branch labels Mar 22, 2024
@jfagoagas jfagoagas requested a review from a team as a code owner March 22, 2024 15:58
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Mar 22, 2024
@jfagoagas jfagoagas removed no-merge Please, DO NOT MERGE this PR. testing-pending labels Apr 2, 2024
@jfagoagas jfagoagas changed the title [DO NOT MERGE] chore(action): Prepare containers release for v4 chore(action): Prepare containers release for v4 Apr 2, 2024
PROWLER_VERSION_MAJOR="${PROWLER_VERSION%%.*}"
echo "PROWLER_VERSION_MAJOR=${PROWLER_VERSION_MAJOR}" >> "${GITHUB_ENV}"

case ${PROWLER_VERSION_MAJOR} in
Copy link
Contributor

Choose a reason for hiding this comment

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

This is returning the same in both case statements

Copy link
Contributor

Choose a reason for hiding this comment

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

Or it is just a way to set the major for just the v3 and v4?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just prepared for the v4 release, as you can see the commented code will be uncommented for the v4 release:

3)
              # TODO: update it for v3 and v4
              # echo "LATEST=v3-latest" >> "${GITHUB_ENV}"
              # echo "STABLE_TAG=v3-stable" >> "${GITHUB_ENV}"
              echo "LATEST=latest" >> "${GITHUB_ENV}"
              echo "STABLE_TAG=stable" >> "${GITHUB_ENV}"
              ;;

          # TODO: uncomment for v3 and v4
          # 4)
          #     echo "LATEST=latest" >> "${GITHUB_ENV}"
          #     echo "STABLE_TAG=stable" >> "${GITHUB_ENV}"
          #     ;;

if: github.event_name == 'push'

- name: Dispatch event (latest)
if: github.event_name == 'push' && ${{ env. PROWLER_VERSION_MAJOR }} == '3'
Copy link
Contributor

Choose a reason for hiding this comment

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

This is gonna be available only for version 3?

Copy link
Member Author

Choose a reason for hiding this comment

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

At least for now, we haven't tested it with v4 yet.

@jfagoagas jfagoagas merged commit cd54919 into master Apr 2, 2024
9 checks passed
@jfagoagas jfagoagas deleted the remove-pr-from-release branch April 2, 2024 09:38
@sergargar sergargar removed the backport-v3 Pending to port to Prowler v3 branch label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants