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

Fix publish target #45

Merged
merged 3 commits into from
May 24, 2022
Merged

Fix publish target #45

merged 3 commits into from
May 24, 2022

Conversation

carolynvs
Copy link
Member

@carolynvs carolynvs commented May 24, 2022

I have converted the repository from make to mage, and from azure devops pipelines to github actions. I figured as long as I was here fixing our broken build, lets just finish moving over to where we want to be.

The problem with the publish target was a few things. One there was a bug in the magefiles generatePackageFeed function, where it wasn't checking the error when calling porter to generate the atom.xml file for the feed. Porter wasn't installed, and it was quietly failing.

We are now using a fixed version of the magefiles repo, and installing porter into bin before attempting to publish.

🚨 I will update this PR once getporter/magefiles#13 is merged. Do not merge until its in.

@carolynvs carolynvs marked this pull request as ready for review May 24, 2022 14:00
@carolynvs carolynvs requested a review from VinozzZ May 24, 2022 14:00
@carolynvs
Copy link
Member Author

Oops, one more change is needed so hold off on reviewing. I need to make a personal access token and use it in the workflow since the default token doesn't have access to the packages repository where we upload the updated atom feed.

@carolynvs
Copy link
Member Author

carolynvs commented May 24, 2022

@carolynvs
Copy link
Member Author

Here is a successful run based on a tag:

https://github.com/carolynvs/azure-plugins/runs/6575444361?check_suite_focus=true

https://github.com/carolynvs/azure-plugins/releases/tag/v1.0.0-beta.2

When branches are pushed to that repo, publish is skipped (we only publish canary and tagged releases using logic built into porter).

@carolynvs carolynvs force-pushed the gh-actions branch 3 times, most recently from 3ed4cee to d5c077f Compare May 24, 2022 14:54
I have converted the repository from make to mage, and from azure devops
pipelines to github actions. I figured as long as I was here fixing our
broken build, lets just finish moving over to where we want to be.

The problem with the publish target was a few things. One there was a
bug in the magefiles generatePackageFeed function, where it wasn't
checking the error when calling porter to generate the atom.xml file for
the feed. Porter wasn't installed, and it was quietly failing.

We are now using a fixed version of the magefiles repo, and installing
porter into bin before attempting to publish.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs carolynvs marked this pull request as ready for review May 24, 2022 14:56
@carolynvs
Copy link
Member Author

Okay! This is now ready to review. I've defined a new organization secret PUBLISH_TOKEN that all the repos can use to publish binaries and the atom feed.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
magefile.go Outdated

// XBuildAll cross-compiles the plugin
func XBuildAll() {
rebuild, err := target.Path(filepath.Join(binDir, "dev/azure-linux-amd64"), srcDirs...)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use target.Dir here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thanks I must have copied this from an older magefile in the k8s plugin repo from before your fix.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
@carolynvs
Copy link
Member Author

squeezes her eyes shut and presses the green button 😆

@carolynvs carolynvs merged commit e9aeee3 into getporter:main May 24, 2022
@carolynvs carolynvs deleted the gh-actions branch May 24, 2022 15:26
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.

None yet

2 participants