Skip to content

Create Github action for MCAD Image build and push #461

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

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

Srihari1192
Copy link
Contributor

fixes #453

@Srihari1192
Copy link
Contributor Author

Srihari1192 commented Jul 7, 2023

  • Updated the Makefile to skip release version update for release tag as passing it as environment variables via Make command from GH action
  • Remove the Push images condition from travis.yaml file to skip the image push from Travis CI

Need to test this changes yet in my fork repository and in upstream Travis CI build changes

@Srihari1192 Srihari1192 force-pushed the automate-release_453 branch from e0fc438 to ce50ce9 Compare July 7, 2023 08:36
@Srihari1192 Srihari1192 marked this pull request as ready for review July 7, 2023 08:44
@Srihari1192
Copy link
Contributor Author

@z103cb
Copy link
Contributor

z103cb commented Jul 7, 2023

Tested this workflow Image Build and push in fork branch against private repository https://github.com/Srihari1192/multi-cluster-app-dispatcher/actions/runs/5484265285/jobs/9991591550 and quay repo https://quay.io/repository/svenkata1/test-mcad?tab=tags

Can you explain what / why we see these messages in the build image step? That Fatal no names found seems suspect.

_BRANCH TAG=$TAG
fatal: No names found, cannot describe anything.
"---"
"MAKE GLOBAL VARIABLES:"
"  "BIN_DIR="_output/bin"
"  "GIT_BRANCH="v0.0.8"
"  "RELEASE_VER=""
"  "TAG="release-v0.0.8"
"  "GO_BUILD_ARGS=""
"---"
# Check for invalid tag name

@Srihari1192
Copy link
Contributor Author

Tested this workflow Image Build and push in fork branch against private repository https://github.com/Srihari1192/multi-cluster-app-dispatcher/actions/runs/5484265285/jobs/9991591550 and quay repo https://quay.io/repository/svenkata1/test-mcad?tab=tags

Can you explain what / why we see these messages in the build image step? That Fatal no names found seems suspect.

_BRANCH TAG=$TAG
fatal: No names found, cannot describe anything.
"---"
"MAKE GLOBAL VARIABLES:"
"  "BIN_DIR="_output/bin"
"  "GIT_BRANCH="v0.0.8"
"  "RELEASE_VER=""
"  "TAG="release-v0.0.8"
"  "GO_BUILD_ARGS=""
"---"
# Check for invalid tag name

Not sure why getting this error.. Let me investigate

@Srihari1192
Copy link
Contributor Author

Tested this workflow Image Build and push in fork branch against private repository https://github.com/Srihari1192/multi-cluster-app-dispatcher/actions/runs/5484265285/jobs/9991591550 and quay repo https://quay.io/repository/svenkata1/test-mcad?tab=tags

Can you explain what / why we see these messages in the build image step? That Fatal no names found seems suspect.

_BRANCH TAG=$TAG
fatal: No names found, cannot describe anything.
"---"
"MAKE GLOBAL VARIABLES:"
"  "BIN_DIR="_output/bin"
"  "GIT_BRANCH="v0.0.8"
"  "RELEASE_VER=""
"  "TAG="release-v0.0.8"
"  "GO_BUILD_ARGS=""
"---"
# Check for invalid tag name

@z103cb
The error is encountered from this line https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/ce50ce92d9553906be07c8214a533af5f00b6bb6/Makefile#L5C67-L5C67.
Probably not able to fetch current branch or tag and encountered error as fatal: No names found, cannot describe anything. I tried testing by inserting git fetch origin before build and push the image didnt see this error.
Not sure this is the best approach to fix

@sutaakar
Copy link
Contributor

@Srihari1192 have you tried fetching whole history in checkout action?

      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

@Srihari1192
Copy link
Contributor Author

Srihari1192 commented Jul 11, 2023

@Srihari1192 have you tried fetching whole history in checkout action?

      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

Tested with above approach https://github.com/Srihari1192/multi-cluster-app-dispatcher/actions/runs/5517237751/jobs/10059583134 looks good .. will update the PR with this changes

@Srihari1192 Srihari1192 force-pushed the automate-release_453 branch from ce50ce9 to 236fa9b Compare July 11, 2023 08:21
@Srihari1192 Srihari1192 changed the title Create Github action for Image build and push Create Github action for MCAD Image build and push Jul 11, 2023
@Srihari1192 Srihari1192 force-pushed the automate-release_453 branch from 236fa9b to def8a60 Compare July 12, 2023 05:07
@Srihari1192 Srihari1192 requested a review from sutaakar July 12, 2023 05:30
sutaakar
sutaakar previously approved these changes Jul 12, 2023
z103cb
z103cb previously approved these changes Jul 12, 2023
@z103cb
Copy link
Contributor

z103cb commented Jul 12, 2023

I would merge this PR regardless of the PR Build status.

@Srihari1192
Copy link
Contributor Author

@z103cb @sutaakar Travis CI build is triggered here with this PR changes https://app.travis-ci.com/github/project-codeflare/multi-cluster-app-dispatcher/jobs/605629207
Looks e2e tests not started here not sure why its failing.. I have made changes in travis.yml to skip push images for not a pull request, not sure because of this

@z103cb
Copy link
Contributor

z103cb commented Jul 12, 2023

Take a look at this error message:

Failed to pull quay.io/project-codeflare/mcad-controller:fake-main-v1.31.0

It seems that in this build the image was not created.

@Srihari1192 Srihari1192 requested a review from asm582 July 12, 2023 13:01
asm582
asm582 previously approved these changes Jul 12, 2023
@asm582
Copy link
Member

asm582 commented Jul 12, 2023

Thanks, build fails with a pending test which is a known issue, LGTM

@asm582 asm582 dismissed stale reviews from z103cb, sutaakar, and themself via a41b9de July 12, 2023 13:36
@Srihari1192
Copy link
Contributor Author

Images built and e2e tests run successfully here https://app.travis-ci.com/github/project-codeflare/multi-cluster-app-dispatcher/builds/264486761. I think few failures are unrelated.

z103cb
z103cb previously approved these changes Jul 14, 2023
test changes

Create Github action for Image build and push
@z103cb
Copy link
Contributor

z103cb commented Jul 17, 2023

The CI Build failure is not an issue. @Srihari1192 and @sutaakar if you are OK with the change, I can merge it.

Copy link
Contributor

@sutaakar sutaakar left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Srihari1192
Copy link
Contributor Author

@z103cb yes we can merge it

@z103cb z103cb merged commit d31d044 into project-codeflare:main Jul 17, 2023
@Srihari1192 Srihari1192 deleted the automate-release_453 branch July 17, 2023 09:25
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.

Create Github actions for MCAD image builds
4 participants