Skip to content

Commit

Permalink
Merge pull request #238 from zowe/user/markackert/v3-bundle
Browse files Browse the repository at this point in the history
Add zowe-v3-lts bundling option
  • Loading branch information
t1m0thyj authored Sep 19, 2024
2 parents 2da43f1 + 8ffc0a8 commit 7ba83d2
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 76 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/manifest_updateVersions.createPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:
required: true
zowe_version:
description: "Zowe Version Tag"
default: zowe-v2-lts
default: zowe-v3-lts
required: true
type: choice
options:
- zowe-v1-lts
- zowe-v2-lts
- zowe-v3-lts

jobs:
update_versions_and_create_pr:
Expand All @@ -24,8 +25,10 @@ jobs:
run: |
if [[ "${{ github.event.inputs.zowe_version }}" == "zowe-v1-lts" ]]; then
echo "defaultBranch=v1.x/rc" >> $GITHUB_ENV
else
elif [[ "${{ github.event.inputs.zowe_version }}" == "zowe-v2-lts" ]]; then
echo "defaultBranch=v2.x/rc" >> $GITHUB_ENV
else
echo "defaultBranch=v3.x/rc" >> $GITHUB_ENV
fi
- name: Checkout zowe-install-packaging
Expand All @@ -52,12 +55,14 @@ jobs:
repoAndComponent[cli]=zowe-cli
repoAndComponent[cics-for-zowe-cli]=zowe-cli-cics-plugin
repoAndComponent[db2-for-zowe-cli]=zowe-cli-db2-plugin
repoAndComponent[ims-for-zowe-cli]=zowe-cli-ims-plugin
repoAndComponent[mq-for-zowe-cli]=zowe-cli-mq-plugin
repoAndComponent[zos-ftp-for-zowe-cli]=zowe-cli-ftp-plugin
zowe_version=${{ github.event.inputs.zowe_version }}
if [[ "$zowe_version" =~ "zowe-v[12]-lts" ]]; then
repoAndComponent[ims-for-zowe-cli]=zowe-cli-ims-plugin
fi
if [[ "$zowe_version" == "zowe-v1-lts" ]]; then
repoAndComponent[secure-credential-store-for-zowe-cli]=zowe-cli-scs-plugin
fi
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/zowe-cli-bundle-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-v1-lts:
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'v2') }}
if: ${{ github.event_name != 'pull_request' || startsWith(github.head_ref, 'v1') }}
uses: ./.github/workflows/zowe-cli-bundle.yaml
permissions:
pull-requests: write
Expand All @@ -22,7 +22,7 @@ jobs:
release-type: snapshot

build-v2-lts:
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'v1') }}
if: ${{ github.event_name != 'pull_request' || startsWith(github.head_ref, 'v2') }}
uses: ./.github/workflows/zowe-cli-bundle.yaml
permissions:
pull-requests: write
Expand All @@ -33,6 +33,18 @@ jobs:
package-tag: zowe-v2-lts
release-type: snapshot

build-v3-lts:
if: ${{ github.event_name != 'pull_request' || startsWith(github.head_ref, 'v3') }}
uses: ./.github/workflows/zowe-cli-bundle.yaml
permissions:
pull-requests: write
secrets:
JF_ARTIFACTORY_TOKEN: ${{ secrets.JF_ARTIFACTORY_TOKEN }}
with:
dry-run: ${{ github.event_name != 'schedule' }}
package-tag: zowe-v3-lts
release-type: snapshot

# build-next:
# uses: ./.github/workflows/zowe-cli-bundle.yaml
# permissions:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/zowe-cli-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ on:
inputs:
package-tag:
description: "Specify package tag to bundle"
default: zowe-v2-lts
default: zowe-v3-lts
required: true
type: choice
options:
- zowe-v1-lts
- zowe-v2-lts
- zowe-v3-lts
# - next
release-type:
description: "Specify type of deployment"
Expand Down Expand Up @@ -105,9 +106,11 @@ jobs:
mkdir -p licenses && cd licenses && cp /tmp/zowe_licenses_cli.zip zowe_licenses_cli.zip && cd ..
npm pack @zowe/cics-for-zowe-cli@${{ steps.versions.outputs.packages_cics-for-zowe-cli }}
npm pack @zowe/db2-for-zowe-cli@${{ steps.versions.outputs.packages_db2-for-zowe-cli }}
npm pack @zowe/ims-for-zowe-cli@${{ steps.versions.outputs.packages_ims-for-zowe-cli }}
npm pack @zowe/mq-for-zowe-cli@${{ steps.versions.outputs.packages_mq-for-zowe-cli }}
npm pack @zowe/zos-ftp-for-zowe-cli@${{ steps.versions.outputs.packages_zos-ftp-for-zowe-cli }}
if [[ "${{ inputs.package-tag }}" =~ "zowe-v[12]-lts" ]]; then
npm pack @zowe/ims-for-zowe-cli@${{ steps.versions.outputs.packages_ims-for-zowe-cli }}
fi
bash ../scripts/repackage_bundle.sh *.tgz
mv zowe-cli-package.zip ../zowe-cli-plugins-${{ env.BUNDLE_VERSION }}.zip
rm -rf *
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/zowe-cli-deploy-component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ on:
description: "Tags to be distributed from Artifactory (separate multiple by spaces)"
default: "latest"
required: true
force-publish:
description: "Force publishing package and ignore code freeze"
default: false
required: false
type: boolean

permissions:
issues: write
Expand Down Expand Up @@ -69,7 +64,6 @@ jobs:
id: deploy
run: node scripts/deploy-component.js ${{ env.PKG_NAME }} ${{ env.PKG_TAGS }}
env:
FORCE_PUBLISH: ${{ inputs.force-publish }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Issue
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/zowe-versions_updateVersions_createPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ on:
required: true
zowe_version:
description: "Zowe Version Tag"
default: zowe-v2-lts
default: zowe-v3-lts
required: true
type: choice
options:
- zowe-v1-lts
- zowe-v2-lts
- zowe-v3-lts

jobs:
update_versions_and_create_pr:
Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ This repository contains a GitHub workflow that runs every night to mirror @zowe

To deploy an individual package, run the workflow zowe-cli-deploy-component.yaml. Specify the package name without the scope (e.g., `core-for-zowe-sdk`) and a space-separated list of tags to publish (e.g., `latest next`).

When a Zowe release has been staged but is not yet GA, it is expected that the Zowe bundle version hosted on zowe.org and the version defined in zowe-versions.yaml@master will differ. During this period, the workflow runs in "staging mode" which means that:
* Packages with "next" tag are not published if their date is newer than the snapshot date defined in zowe-versions.yaml
* Packages with other tags are not published if their version is newer than the one defined in zowe-versions.yaml
* For the "latest" tag, it is assumed that the 1st tag listed for a package in zowe-versions.yaml is aliased with @latest

Packages defined in the "extras" section of zowe-versions.yaml will always be published and are unaffected by staging mode since they are not included in Zowe CLI bundles.

## External Packages

If you develop a Zowe CLI plug-in that meets the following criteria:
Expand All @@ -51,10 +44,10 @@ Then you can follow these steps to automate publishing your plug-in to NPM:
```yaml
extras:
sample-plugin-for-zowe-cli:
zowe-v1-lts: true
zowe-v2-lts: true
zowe-v3-lts: true
```
This enables nightly automation to publish the "latest" (included by default), "zowe-v1-lts", and "zowe-v2-lts" tags. The list of tags should match the ones you want to publish for your plug-in.
This enables nightly automation to publish the "latest" (included by default), "zowe-v2-lts", and "zowe-v3-lts" tags. The list of tags should match the ones you want to publish for your plug-in.
2. (optional) In your plug-in's repository, add the following GitHub workflow:
```yaml
name: Publish to NPM
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_typedoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [[ $1 != "next"* ]]; then
if [[ $zoweVersion != *"SNAPSHOT" ]]; then
cliBranch=v$2
else
cliBranch=$(echo "$2" | sed 's/zowe-v2-lts/master/')
cliBranch=$(echo "$2" | sed 's/zowe-v3-lts/master/')
fi
else
zoweVersion=vNext
Expand Down
2 changes: 2 additions & 0 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ async function getPackageInfo(pkg, opts="", prop="version") {
}

async function shouldSkipPublish(pkgName, pkgTag, pkgVersion) {
// We no longer skip publishing npm packages during the Zowe RC test period
return false;
if (process.env.FORCE_PUBLISH === 'true') {
return false;
}
Expand Down
121 changes: 69 additions & 52 deletions zowe-versions.yaml
Original file line number Diff line number Diff line change
@@ -1,107 +1,121 @@
# Define @zowe-scoped packages that are included in CLI bundles on zowe.org.
# These packages will be mirrored from Artifactory to npmjs.org nightly, unless
# there is a new Zowe release staged but not yet GA. If there is, we are in
# staging mode and package versions will be locked down (see README.md).
# These packages will be mirrored from Artifactory to npmjs.org nightly.
#
# The @latest tag is assumed for all packages and does not need to be listed
# here. If there are other tags listed, the 1st one must be an alias of the
# @latest tag. For example:
# here. All other tags to deploy should be listed, for example:
# sample-plugin-for-zowe-cli:
# zowe-v1-lts: 2.0.0 # Same version for @latest and @zowe-v1-lts
# next: true # Specify whether package has a @next prerelease tag
# next: true # Specify true if package has @next prerelease tag
# zowe-v1-lts: 2.0.0 # Specify version number for Zowe V1 bundle
#
# The bundle pipeline will use the versions listed here for LTS tags, and the
# latest version for @next that is before the tags.next.snapshot date defined
# below. The nightly deployment pipeline will not use these versions at all,
# except in staging mode to determine whether it should skip publishing.
# The bundle pipeline uses the versions listed here for LTS tags, and the latest
# version for @next that is before the tags.next.snapshot date defined below.
packages:
# Core CLI and SDKs
perf-timing:
zowe-v2-lts: 1.0.7
zowe-v1-lts: 1.0.7
next: false
zowe-v1-lts: 1.0.7
zowe-v2-lts: 1.0.7
imperative:
zowe-v2-lts: 5.27.0
zowe-v1-lts: 4.18.24
next: true
zowe-v1-lts: 4.18.24
zowe-v2-lts: 5.27.0
zowe-v3-lts: 8.0.0
cli-test-utils:
zowe-v2-lts: 7.29.0
next: true
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
secrets-for-zowe-sdk:
zowe-v2-lts: 7.18.6
next: true
zowe-v2-lts: 7.18.6
zowe-v3-lts: 8.0.0
core-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
next: true
zos-uss-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
next: true
provisioning-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
zowe-v3-lts: 8.0.0
zos-uss-for-zowe-sdk:
next: true
zos-console-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
next: true
zos-files-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
zowe-v3-lts: 8.0.0
provisioning-for-zowe-sdk:
next: true
zos-logs-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
next: true
zosmf-for-zowe-sdk:
zowe-v2-lts: 7.29.0
zowe-v1-lts: 6.40.28
zowe-v3-lts: 8.0.0
zos-console-for-zowe-sdk:
next: true
zos-workflows-for-zowe-sdk:
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zos-files-for-zowe-sdk:
next: true
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zos-logs-for-zowe-sdk:
next: true
zos-jobs-for-zowe-sdk:
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zosmf-for-zowe-sdk:
next: true
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zos-workflows-for-zowe-sdk:
next: true
zos-tso-for-zowe-sdk:
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zos-jobs-for-zowe-sdk:
next: true
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
zos-tso-for-zowe-sdk:
next: true
cli:
zowe-v2-lts: 7.29.1
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.0
zowe-v3-lts: 8.0.0
cli:
next: true
zowe-v1-lts: 6.40.28
zowe-v2-lts: 7.29.1
zowe-v3-lts: 8.0.0
# CLI plug-ins
cics-for-zowe-sdk:
zowe-v2-lts: 5.0.6
zowe-v1-lts: 4.0.11
next: true
cics-for-zowe-cli:
zowe-v2-lts: 5.0.6
zowe-v1-lts: 4.0.11
zowe-v2-lts: 5.0.6
zowe-v3-lts: 6.0.0
cics-for-zowe-cli:
next: true
zowe-v1-lts: 4.0.11
zowe-v2-lts: 5.0.6
zowe-v3-lts: 6.0.0
db2-for-zowe-cli:
zowe-v2-lts: 5.0.9
zowe-v1-lts: 4.1.13
next: true
zowe-v1-lts: 4.1.13
zowe-v2-lts: 5.0.9
zowe-v3-lts: 6.0.0
ims-for-zowe-cli:
zowe-v2-lts: 3.0.1
zowe-v1-lts: 2.0.5
next: true
mq-for-zowe-cli:
zowe-v1-lts: 2.0.5
zowe-v2-lts: 3.0.1
zowe-v1-lts: 2.0.4
mq-for-zowe-cli:
next: true
zowe-v1-lts: 2.0.4
zowe-v2-lts: 3.0.1
zowe-v3-lts: 4.0.0
secure-credential-store-for-zowe-cli:
zowe-v1-lts: 4.1.12
next: false
zowe-v1-lts: 4.1.12
zos-ftp-for-zowe-cli:
zowe-v2-lts: 2.1.9
zowe-v1-lts: 1.8.8
next: true
zowe-v1-lts: 1.8.8
zowe-v2-lts: 2.1.9
zowe-v3-lts: 3.0.0

# Define extra @zowe-scoped packages that are not included in the Zowe bundle.
# These packages will be mirrored from Artifactory to npmjs.org nightly.
Expand All @@ -124,6 +138,9 @@ tags:
zowe-v2-lts:
version: 2.18.0
rc: 6
zowe-v3-lts:
version: 3.0.0
rc: 1
# next:
# version: 2.0.0
# snapshot: '2022-04-15'

0 comments on commit 7ba83d2

Please sign in to comment.