Skip to content

Support pre-releases and platform-specific extensions on OpenVSX#2769

Merged
rgrunber merged 1 commit into
redhat-developer:masterfrom
rgrunber:refactor-jenkins
Nov 2, 2022
Merged

Support pre-releases and platform-specific extensions on OpenVSX#2769
rgrunber merged 1 commit into
redhat-developer:masterfrom
rgrunber:refactor-jenkins

Conversation

@rgrunber

Copy link
Copy Markdown
Member
  • Closes Add prerelease and platform-specific publishing for Open VSX #2587 (specifically obsoleting it by simplifying the Jenkinsfile)

  • Refactor the Jenkinsfile for simplicity

  • There should only be 2 calls to vsce/ovsx . One call to publish the generic version, and another to package the platform-specific versions (in a for-loop)

  • The logic to publish pre-release versions should be done transparently

  • When publishing a pre-release, all package specific vsixs should embed that data at package-time

Signed-off-by: Roland Grunberg rgrunber@redhat.com

CC @CsCherrYY for a review and some questions since I'm changing things slightly.

  • There is a line (now deleted here) in the Jenkinsfile that says // for pre-release versions we only package platform specific extensions. The current change will publish a universal vsix on the platform we don't support (same as for a regular release). Is there a reason we avoided doing this in pre-releases ? Is it ok if we do it ? The --pre-release flag just adds itself onto the regular vsce publish/vsce package calls so it becomes easier if they all do the same thing.
  • There is a line (I have kept this behaviour for now) in the Jenkins file that says // for pre-release versions, vsixs are not stashed and kept in project folder. Is this still needed ? I've kept it for now so I just ask to see if I can further simplify things.

@CsCherrYY

CsCherrYY commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

Is there a reason we avoided doing this in pre-releases?

Currently, for pre-releases, we do not package a universal vsix, since we can directly use vsce publish --pre-release to publish it, the step vsce package is not required. In another word, vsce steps:

Note: in vsce, if we want to publish a packaged vsix with --pre-release flag, the vsix should be packaged with --pre-release flag as well. See: microsoft/vscode-vsce#666, but if we directly publish without a package, there is no such limitation.

So if we're sure ovsx supports sth like ovsx publish --pre-release directly, we can keep the behavious consitent between ovsx and vsce.

@CsCherrYY

CsCherrYY commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

// for pre-release versions, vsixs are not stashed and kept in project folder. Is this still needed ?

I add this comment just to indicate that IMO the stash step is not necessary. since pre-release versions will not be uploaded to jboss and vsix files will be excluded in .vscodeignore, we can just leave in the folder and continue publish process. So when adding the pre-release steps I didn't use such stash steps to make it clear.

Update: when reviewing, I found you also removed the stash step in the commit, that's the point. :)

@CsCherrYY CsCherrYY left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes LGTM overall, just a question about stashing step.

Comment thread Jenkinsfile Outdated

// for pre-release versions, vsixs are not stashed and kept in project folder
if (publishToMarketPlace.equals('true') || publishToOVSX.equals('true')) {
unstash 'platformVsix'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the stash step is used to upload vsixs to jboss only, I'm considering if we can move this unstash step under

sh "rm -rf ${artifactDir}"
, to keep the function packageExtensions() behaves consistent between release and pre-release: in both of the two cases, we keep all platform specific vsixs in the folder.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll make the change. I thought maybe there was some reason the stash was happening for normal releases (and not pre-releases). Maybe the publish call would be affected by their presence or something like that. If not, we can definitely move it out.

@CsCherrYY CsCherrYY Nov 2, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess so, looks like a convenient way to store/recover all platfrom vsixs, since the generic vsix will be in the same folder at that time.

Anyway, I think it's clear enough now :)

- Refactor the Jenkinsfile for simplicity
- There should only be 2 calls to vsce/ovsx . One call to publish the
  generic version, and another to package the platform-specific versions
  (in a for-loop)
- The logic to publish pre-release versions should be done transparently
- When publishing a pre-release, all package specific vsixs should embed
  that data at package-time

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
@rgrunber rgrunber merged commit 7cf3c86 into redhat-developer:master Nov 2, 2022
@rgrunber rgrunber deleted the refactor-jenkins branch November 2, 2022 15:06
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