11name : CI
22
33on :
4- push :
4+ push :
55 branches :
66 - ' **'
77 - ' !dependabot/**'
@@ -33,51 +33,43 @@ jobs:
3333 run : |
3434 TANZU_VERSION=$(cat TANZU_VERSION)
3535 mkdir -p ${TANZU_HOME}
36- curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-framework /releases/download/${TANZU_VERSION}/tanzu-framework -linux-amd64.tar.gz
36+ curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-cli /releases/download/${TANZU_VERSION}/tanzu-cli -linux-amd64.tar.gz
3737 tar -xzf tanzu-framework.tar.gz -C ${TANZU_HOME}
38- sudo mv ${TANZU_HOME}/cli/core/ ${TANZU_VERSION}/tanzu-core -linux_amd64 /usr/local/bin/tanzu
38+ sudo mv ${TANZU_HOME}/${TANZU_VERSION}/tanzu-cli -linux_amd64 /usr/local/bin/tanzu
3939 chmod +x /usr/local/bin/tanzu
40+ tanzu ceip-participation set false
41+ tanzu config eula accept
4042 tanzu init
41- tanzu plugin repo add -b tanzu-cli-admin-plugins -n admin -p artifacts-admin
42- curl -Lo admin-plugins.tar.gz https://github.com/vmware-tanzu/tanzu-framework/releases/download/${TANZU_VERSION}/tanzu-framework-plugins-admin-linux-amd64.tar.gz
43- tar -xzf admin-plugins.tar.gz -C ${TANZU_HOME}
44- tanzu plugin install builder --local ${TANZU_HOME}/admin-plugins
45- tanzu plugin install test --local ${TANZU_HOME}/admin-plugins
43+ tanzu version
44+ tanzu plugin install builder
4645 tanzu plugin list
4746 - name : Scan Inclusive Terminology
4847 uses : get-woke/woke-action@v0
49- with :
48+ with :
5049 fail-on-error : true
5150 woke-args : -c https://via.vmw.com/its-woke-rules
5251 - name : Test
5352 run : make test
5453 - name : Codecov
5554 uses : codecov/codecov-action@v3.1.4
5655 - name : Build Version
57- run : echo "BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
56+ run : echo "PLUGIN_BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
5857 if : startsWith(github.ref, 'refs/tags/')
5958 - name : Build
60- run : make build
61- - uses : actions/upload-artifact@v3
62- with :
63- name : tanzu-apps-plugin-build.tar.gz
64- path : tanzu-apps-plugin-build.tar.gz
65- retention-days : 1
66- - name : Publish
67- run : make publish
59+ run : make plugin-build
6860 - uses : actions/upload-artifact@v3
6961 with :
7062 name : tanzu-apps-plugin.tar.gz
71- path : tanzu-apps-plugin*.tar.gz
63+ path : ./artifacts/ tanzu-apps-plugin*.tar.gz
7264 retention-days : 1
7365 - name : Install
7466 run : |
75- if [[ -z ${BUILD_VERSION } ]]; then
76- BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
77- BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$BUILD_SHA_SHORT
67+ if [[ -z ${PLUGIN_BUILD_VERSION } ]]; then
68+ PLUGIN_BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
69+ PLUGIN_BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$PLUGIN_BUILD_SHA_SHORT
7870 fi
79- echo $BUILD_VERSION
80- tanzu plugin install apps --version $BUILD_VERSION --local ./artifacts/published /linux- amd64
71+ echo $PLUGIN_BUILD_VERSION
72+ tanzu plugin install apps --version $PLUGIN_BUILD_VERSION --local ./artifacts/plugins /linux/ amd64
8173 - name : Verify docs
8274 run : |
8375 rm -rf docs/command-reference
@@ -98,42 +90,33 @@ jobs:
9890 - name : Install tanzu cli
9991 run : |
10092 $TANZU_VERSION = type .\TANZU_VERSION
101- mkdir "C:\Program Files\tanzu"
93+ mkdir "C:\Program Files\tanzu"
10294 $Env:PATH += ";C:\Program Files\tanzu"
10395 $TANZU_HOME = "C:\Program Files\tanzu"
10496 $Env:TANZU_CLI_NO_INIT = "true"
105- curl -Lo tanzu-framework-windows-amd64.zip https://github.com/vmware-tanzu/tanzu-framework /releases/download/$TANZU_VERSION/tanzu-framework -windows-amd64.zip
97+ curl -Lo tanzu-framework-windows-amd64.zip https://github.com/vmware-tanzu/tanzu-cli /releases/download/$TANZU_VERSION/tanzu-cli -windows-amd64.zip
10698 tar -xf tanzu-framework-windows-amd64.zip
107- cp "cli\core\$TANZU_VERSION\tanzu-core-windows_amd64.exe" "C:\Program Files\tanzu\tanzu.exe"
99+ cp "$TANZU_VERSION\tanzu-cli-windows_amd64.exe" "C:\Program Files\tanzu\tanzu.exe"
100+ tanzu ceip-participation set false
101+ tanzu config eula accept
108102 tanzu init
109- tanzu plugin list
110-
111- tanzu version
112- tanzu plugin repo add -b tanzu-cli-admin-plugins -n admin -p artifacts-admin
113- curl -Lo admin-plugins.zip https://github.com/vmware-tanzu/tanzu-framework/releases/download/$TANZU_VERSION/tanzu-framework-plugins-admin-windows-amd64.zip
114- tar -xf admin-plugins.zip -C $TANZU_HOME
115- tanzu plugin install builder --local $TANZU_HOME/admin-plugins
116- tanzu plugin install test --local $TANZU_HOME/admin-plugins
103+ tanzu plugin install builder
117104 tanzu plugin list
118105 - name : Test
119106 run : |
120- $Env:PATH += ";C:\Program Files\tanzu"
107+ $Env:PATH += ";C:\Program Files\tanzu"
121108 make test
122109 - name : Build
123110 run : |
124111 $Env:PATH += ";C:\Program Files\tanzu"
125- make build
126- - name : Publish
127- run : |
128- $Env:PATH += ";C:\Program Files\tanzu"
129- make publish
112+ make plugin-build
130113 - name : Install
131114 run : |
132115 $Env:PATH += ";C:\Program Files\tanzu"
133- $BUILD_SHA_SHORT =git rev-parse --short HEAD
116+ $PLUGIN_BUILD_SHA_SHORT =git rev-parse --short HEAD
134117 $APP_PLUGIN_VERSION=type .\APPS_PLUGIN_VERSION
135- $BUILD_VERSION =$APP_PLUGIN_VERSION+'-dev-'+$BUILD_SHA_SHORT
136- tanzu plugin install apps --version $BUILD_VERSION --local ./artifacts/published /windows- amd64
118+ $PLUGIN_BUILD_VERSION =$APP_PLUGIN_VERSION+'-dev-'+$PLUGIN_BUILD_SHA_SHORT
119+ tanzu plugin install apps --version $PLUGIN_BUILD_VERSION --local ./artifacts/plugins /windows/ amd64
137120
138121 unit-macos :
139122 env :
@@ -150,35 +133,30 @@ jobs:
150133 TANZU_VERSION=$(cat TANZU_VERSION)
151134 TANZU_HOME=$HOME/tanzu
152135 mkdir -p $HOME/tanzu
153- curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-framework /releases/download/${TANZU_VERSION}/tanzu-framework -darwin-amd64.tar.gz
136+ curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-cli /releases/download/${TANZU_VERSION}/tanzu-cli -darwin-amd64.tar.gz
154137 tar -xzf tanzu-framework.tar.gz -C ${TANZU_HOME}
155- sudo mv ${TANZU_HOME}/cli/core/ ${TANZU_VERSION}/tanzu-core -darwin_amd64 /usr/local/bin/tanzu
138+ sudo mv ${TANZU_HOME}/${TANZU_VERSION}/tanzu-cli -darwin_amd64 /usr/local/bin/tanzu
156139 chmod +x /usr/local/bin/tanzu
140+ tanzu ceip-participation set false
141+ tanzu config eula accept
157142 tanzu init
158- tanzu plugin repo add -b tanzu-cli-admin-plugins -n admin -p artifacts-admin
159- curl -Lo admin-plugins.tar.gz https://github.com/vmware-tanzu/tanzu-framework/releases/download/${TANZU_VERSION}/tanzu-framework-plugins-admin-darwin-amd64.tar.gz
160- tar -xzf admin-plugins.tar.gz -C ${TANZU_HOME}
161- tanzu plugin install builder --local ${TANZU_HOME}/admin-plugins
162- tanzu builder version
163- tanzu plugin install test --local ${TANZU_HOME}/admin-plugins
143+ tanzu plugin install builder
164144 tanzu plugin list
165145 - name : Test
166146 run : make test
167147 - name : Build Version
168- run : echo "BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
148+ run : echo "PLUGIN_BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
169149 if : startsWith(github.ref, 'refs/tags/')
170150 - name : Build
171- run : make build
172- - name : Publish
173- run : make publish
151+ run : make plugin-build
174152 - name : Install
175153 run : |
176- if [[ -z ${BUILD_VERSION } ]]; then
177- BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
178- BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$BUILD_SHA_SHORT
154+ if [[ -z ${PLUGIN_BUILD_VERSION } ]]; then
155+ PLUGIN_BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
156+ PLUGIN_BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$PLUGIN_BUILD_SHA_SHORT
179157 fi
180- echo $BUILD_VERSION
181- tanzu plugin install apps --version $BUILD_VERSION --local ./artifacts/published /darwin- amd64
158+ echo $PLUGIN_BUILD_VERSION
159+ tanzu plugin install apps --version $PLUGIN_BUILD_VERSION --local ./artifacts/plugins /darwin/ amd64
182160
183161 acceptance :
184162 needs : [unit-ubuntu, unit-windows, unit-macos]
@@ -215,20 +193,21 @@ jobs:
215193 run : |
216194 TANZU_VERSION=$(cat TANZU_VERSION)
217195 mkdir -p ${TANZU_HOME}
218- curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-framework/releases/download/${TANZU_VERSION}/tanzu-framework-linux-amd64.tar.gz
219- tar -xzf tanzu-framework.tar.gz -C ${TANZU_HOME}
220- sudo mv ${TANZU_HOME}/cli/core/${TANZU_VERSION}/tanzu-core-linux_amd64 /usr/local/bin/tanzu
221- chmod +x /usr/local/bin/tanzu
222- env
196+ curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-cli/releases/download/${TANZU_VERSION}/tanzu-cli-linux-amd64.tar.gz
197+ tar -xzf tanzu-framework.tar.gz -C ${TANZU_HOME}
198+ sudo mv ${TANZU_HOME}/${TANZU_VERSION}/tanzu-cli-linux_amd64 /usr/local/bin/tanzu
199+ chmod +x /usr/local/bin/tanzu
200+ tanzu ceip-participation set false
201+ tanzu config eula accept
223202 tanzu init
224203 - name : Build dev version
225204 run : |
226- BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
227- echo "BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$BUILD_SHA_SHORT " >> $GITHUB_ENV
228- echo $BUILD_VERSION
205+ PLUGIN_BUILD_SHA_SHORT =$(git rev-parse --short HEAD)
206+ echo "PLUGIN_BUILD_VERSION =$(cat APPS_PLUGIN_VERSION)-dev-$PLUGIN_BUILD_SHA_SHORT " >> $GITHUB_ENV
207+ echo $PLUGIN_BUILD_VERSION
229208 if : startsWith(github.ref, 'refs/tags/') != true
230209 - name : Build tag version
231- run : echo "BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
210+ run : echo "PLUGIN_BUILD_VERSION =${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
232211 if : startsWith(github.ref, 'refs/tags/')
233212 - name : Install apps plugin
234213 run : |
@@ -238,7 +217,7 @@ jobs:
238217 set -u
239218
240219 tar -xvf tanzu-apps-plugin.tar.gz
241- tanzu plugin install apps --local ./${OS_ARCH} --version ${BUILD_VERSION :-v0.0.0-dev}
220+ tanzu plugin install apps --local ./linux/amd64 --version ${PLUGIN_BUILD_VERSION :-v0.0.0-dev}
242221 - name : Generate certs
243222 run : |
244223 set -o errexit
@@ -281,7 +260,7 @@ jobs:
281260 docker run \
282261 --entrypoint htpasswd \
283262 httpd:2 -Bbn ${REGISTRY_USERNAME} ${REGISTRY_PASSWORD} > ${REGISTRY_HTPWD}/htpasswd
284-
263+
285264 # Run a registry.
286265 docker run -d \
287266 --restart=always \
@@ -401,7 +380,7 @@ jobs:
401380 with :
402381 tag_name : ${{ github.ref }}
403382 release_name : Release ${{ steps.get_version.outputs.VERSION }}
404- draft : true
383+ draft : true
405384 - name : Create release info files
406385 run : |
407386 echo "${{ steps.get_version.outputs.VERSION }}" > RELEASE_INFO_VERSION
@@ -439,64 +418,3 @@ jobs:
439418 asset_path : tanzu-apps-plugin${{ matrix.os-arch }}.tar.gz
440419 asset_name : tanzu-apps-plugin${{ matrix.os-arch }}-${{ env.RELEASE_VERSION }}.tar.gz
441420 asset_content_type : application/gzip
442-
443- publish-oci-artifact :
444- env :
445- TANZU_CLI_NO_INIT : true
446- TANZU_HOME : $HOME/tanzu
447- ARTIFACTS_DIR : ./artifacts
448- needs :
449- - release
450- if : startsWith(github.ref, 'refs/tags/')
451- runs-on : ubuntu-latest
452- steps :
453- - uses : actions/checkout@v3
454- - uses : vmware-tanzu/carvel-setup-action@v1
455- with :
456- token : ${{ secrets.GITHUB_TOKEN }}
457- - name : Install tanzu cli
458- run : |
459- TANZU_VERSION=$(cat TANZU_VERSION)
460- mkdir -p ${TANZU_HOME}
461- curl -Lo tanzu-framework.tar.gz https://github.com/vmware-tanzu/tanzu-framework/releases/download/${TANZU_VERSION}/tanzu-framework-linux-amd64.tar.gz
462- tar -xzf tanzu-framework.tar.gz -C ${TANZU_HOME}
463- sudo mv ${TANZU_HOME}/cli/core/${TANZU_VERSION}/tanzu-core-linux_amd64 /usr/local/bin/tanzu
464- chmod +x /usr/local/bin/tanzu
465- tanzu init
466- tanzu plugin repo add -b tanzu-cli-admin-plugins -n admin -p artifacts-admin
467- curl -Lo admin-plugins.tar.gz https://github.com/vmware-tanzu/tanzu-framework/releases/download/${TANZU_VERSION}/tanzu-framework-plugins-admin-linux-amd64.tar.gz
468- tar -xzf admin-plugins.tar.gz -C ${TANZU_HOME}
469- tanzu plugin install builder --local ${TANZU_HOME}/admin-plugins
470- tanzu plugin list
471- - name : Login to GitHub Container Registry
472- uses : docker/login-action@v2
473- with :
474- registry : ghcr.io
475- username : ${{ github.actor }}
476- password : ${{ secrets.GITHUB_TOKEN }}
477- - name : Set repos
478- run : |
479- echo "DISTRIBUTION_REPO=ghcr.io/${{ github.repository }}/distribution" >> $GITHUB_ENV
480- echo "DISCOVERY_REPO=ghcr.io/${{ github.repository }}/discovery" >> $GITHUB_ENV
481- echo $DISTRIBUTION_REPO
482- echo $DISCOVERY_REPO
483- - name : Build Version
484- run : |
485- echo "BUILD_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
486- - name : Download build artifacts
487- uses : actions/download-artifact@v3
488- with :
489- name : tanzu-apps-plugin-build.tar.gz
490- - name : Get build artifact
491- run : |
492- set -o errexit
493- set -o nounset
494- set -o pipefail
495-
496- if [ ! -d ${ARTIFACTS_DIR} ]; then
497- mkdir -p ${ARTIFACTS_DIR}
498- fi
499-
500- tar -xvf tanzu-apps-plugin-build.tar.gz -C ${ARTIFACTS_DIR}
501- - name : Publish OCI
502- run : make publish-oci
0 commit comments