Skip to content

Commit 08e1d40

Browse files
authored
Merge branch 'v8' into hash-based-v8
2 parents 0fd6140 + 5987a93 commit 08e1d40

86 files changed

Lines changed: 4089 additions & 1319 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ After reaching out to the CLI team and the conclusion is to make a PR, please fo
3333
[Product Style Guide](https://github.com/cloudfoundry/cli/wiki/CLI-Product-Specific-Style-Guide),
3434
and [Internationalization Guide](https://github.com/cloudfoundry/cli/wiki/Internationalization-Guide).
3535
1. Fork the project repository.
36-
1. Create a feature branch from the earliest branch that's [appropriate for your change](#cli-versions) (e.g. `git checkout v7 && git checkout -b better_cli`) and make changes on this branch
36+
1. Create a feature branch from the earliest branch that's [appropriate for your change](#cli-versions) (e.g. `git checkout v8 && git checkout -b v8_better_cli`) and make changes on this branch
3737
* Follow the other sections on this page to [set up your development environment](#development-environment-setup), [build `cf`](#building-the-cf-binary) and [run the tests](#testing).
3838
* Tests are required for any changes.
39-
1. Push to your fork (e.g. `git push origin better_cli`) and [submit a pull request](https://help.github.com/articles/creating-a-pull-request)
40-
1. The cf CLI team will merge your changes from the versioned branch (e.g. v7) to master for you after the PR is merged.
39+
1. Push to your fork (e.g. `git push origin v8_better_cli`) and [submit a pull request](https://help.github.com/articles/creating-a-pull-request)
40+
1. The cf CLI team will merge your PR after review.
4141

4242
Note: All contributions must be sent using GitHub Pull Requests.
4343
We prefer a small, focused pull request with a clear message
@@ -97,12 +97,9 @@ how to cross compile binaries for other architectures.
9797
To run the unit tests:
9898
```bash
9999
cd cli
100-
make units-full # will run all unit tests
101-
make units # runs all non-cf directory unit tests
100+
make units
102101
```
103-
104-
**Note: `make units-full` is recommended over `make units` if you are unsure of
105-
how wide-reaching the intended changes are.**
102+
(For historic reasons, there are multiple synonyms in the `Makefile`.)
106103

107104
## Running the Integration tests
108105

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Enable service binding rotation feature
2+
# See https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0040-service-binding-rotation.md#cf-cli
3+
---
4+
- type: replace
5+
path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/max_service_credential_bindings_per_app_service_instance?
6+
value: 2

.github/ops-files/use-latest-capi.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
- type: remove
1010
path: /releases/name=capi/sha1?
11+
12+
- type: remove
13+
path: /releases/name=capi/stemcell?

.github/workflows/check-cves.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
if: always()
2727

2828
- name: Archive CVE scan results
29-
uses: actions/upload-artifact@v5
29+
uses: actions/upload-artifact@v7
3030
if: always()
3131
with:
3232
name: cve-scan-results-${{ github.sha }}-${{ github.run_id }}-${{ github.run_number }}

.github/workflows/create-bosh-lite.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ jobs:
122122
123123
env_name="${{ steps.setup-bbl-env.outputs.envName }}"
124124
cd $env_name/bbl-state
125-
eval "$(bbl print-env)"
125+
eval "$(bbl print-env --shell-type posix)"
126126
127-
jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${env_name}.priv
128-
129127
bosh upload-release "https://bosh.io/d/github.com/cloudfoundry/capi-release?v=$capi_release_version"
130128
- name: Deploy cf
131129
run: |
132130
env_name="${{ steps.setup-bbl-env.outputs.envName }}"
133131
cd $env_name/bbl-state
134-
eval "$(bbl print-env)"
132+
eval "$(bbl print-env --shell-type posix)"
133+
135134
bosh update-runtime-config ${GITHUB_WORKSPACE}/bosh-deployment/runtime-configs/dns.yml --name dns
136135
STEMCELL_VERSION=$(bosh interpolate ${GITHUB_WORKSPACE}/cf-deployment/cf-deployment.yml --path /stemcells/alias=default/version)
137136
bosh upload-stemcell "https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-jammy-go_agent?v=${STEMCELL_VERSION}"
@@ -152,6 +151,7 @@ jobs:
152151
-o ${GITHUB_WORKSPACE}/cli/.github/ops-files/add-uaa-client-credentials.yml \
153152
-o ${GITHUB_WORKSPACE}/cli/.github/ops-files/increase-route-registration-interval.yml \
154153
-o ${GITHUB_WORKSPACE}/cli/.github/ops-files/add-oidc-provider.yml ${additional_args} \
154+
-o ${GITHUB_WORKSPACE}/cli/.github/ops-files/increase-max-service-credential-bindings.yml \
155155
-v client-secret="${{ secrets.CLIENT_SECRET }}" \
156156
-v system_domain=${SYSTEM_DOMAIN} \
157157
> ./director.yml
@@ -162,10 +162,10 @@ jobs:
162162
if: failure()
163163
run: |
164164
env_name="${{ steps.setup-bbl-env.outputs.envName }}"
165-
if [ -d ${env_name}/bbl_state ]; then
165+
if [ -d ${env_name}/bbl-state ]; then
166166
cd ${env_name}/bbl-state
167-
eval "$(bbl print-env)"
168-
167+
eval "$(bbl print-env --shell-type posix)"
168+
169169
echo "Deleting env ${env_name}"
170170
bbl down --no-confirm --gcp-service-account-key=key.json
171171
@@ -174,4 +174,4 @@ jobs:
174174
gsutil rm -R gs://cf-cli-bosh-lites/${env_name}
175175
fi
176176
fi
177-
177+

.github/workflows/delete-bosh-lite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: delete bosh
7272
run: |
7373
cd ${ENV_NAME}/bbl-state
74-
eval "$(bbl print-env)"
74+
eval "$(bbl print-env --shell-type posix)"
7575
7676
echo "Deleting env ${ENV_NAME}"
7777
echo ${BBL_GCP_SERVICE_ACCOUNT_KEY} > key.json

.github/workflows/release-build-sign-upload.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
go env
152152
153153
- name: Go Assets Cache
154-
uses: actions/cache@v4
154+
uses: actions/cache@v5
155155
with:
156156
path: |
157157
${{ steps.go-cache-paths.outputs.go-mod }}
@@ -169,7 +169,7 @@ jobs:
169169
make out/cf-cli_linux_arm64
170170
171171
- name: Store Linux Binaries
172-
uses: actions/upload-artifact@v5
172+
uses: actions/upload-artifact@v7
173173
with:
174174
if-no-files-found: error
175175
name: cf-cli-linux-binaries
@@ -274,7 +274,7 @@ jobs:
274274
working-directory: signed-redhat-installer
275275

276276
- name: Store Signed Linux RPM Packages
277-
uses: actions/upload-artifact@v5
277+
uses: actions/upload-artifact@v7
278278
with:
279279
if-no-files-found: error
280280
name: cf-cli-linux-rpm-packages
@@ -375,7 +375,7 @@ jobs:
375375
working-directory: packaged-deb
376376

377377
- name: Store Debian Packages
378-
uses: actions/upload-artifact@v5
378+
uses: actions/upload-artifact@v7
379379
with:
380380
if-no-files-found: error
381381
name: cf-cli-linux-deb-packages
@@ -428,7 +428,7 @@ jobs:
428428
cat "$(brew --repository)/Library/Taps/pivotalsoftware/homebrew-gon/gon.rb" > .github/brew-formulae
429429
430430
- name: Configure Homebrew cache
431-
uses: actions/cache@v4
431+
uses: actions/cache@v5
432432
with:
433433
path: |
434434
~/Library/Caches/Homebrew/gon--*
@@ -448,7 +448,7 @@ jobs:
448448
go env
449449
450450
- name: Go Assets Cache
451-
uses: actions/cache@v4
451+
uses: actions/cache@v5
452452
with:
453453
path: |
454454
${{ steps.go-cache-paths.outputs.go-mod }}
@@ -465,7 +465,7 @@ jobs:
465465
make out/cf-cli_macosarm
466466
467467
- name: Store macOS Binaries
468-
uses: actions/upload-artifact@v5
468+
uses: actions/upload-artifact@v7
469469
with:
470470
if-no-files-found: error
471471
name: cf-cli-macos-binaries
@@ -604,7 +604,7 @@ jobs:
604604
"signed-macos-installer/cf${VERSION_MAJOR}-cli-installer_${VERSION_BUILD}_macosarm.pkg"
605605
606606
- name: Store macOS Signed Packages
607-
uses: actions/upload-artifact@v5
607+
uses: actions/upload-artifact@v7
608608
with:
609609
if-no-files-found: error
610610
name: cf-cli-macos-packages
@@ -690,7 +690,7 @@ jobs:
690690
New-Item -ItemType SymbolicLink -Target .\out\cf-cli_winx64.exe -Path .\out\cf-cli_winx64-link.exe
691691
692692
- name: Save signed binaries as a GitHub Action Artifact
693-
uses: actions/upload-artifact@v5
693+
uses: actions/upload-artifact@v7
694694
with:
695695
name: cf-cli-windows-binaries
696696
if-no-files-found: error
@@ -735,7 +735,7 @@ jobs:
735735
Get-ChildItem "${env:RUNNER_TEMP}"
736736
737737
- name: Save installer and dist files as a GitHub Action Artifact
738-
uses: actions/upload-artifact@v5
738+
uses: actions/upload-artifact@v7
739739
with:
740740
name: cf-cli-windows-packages
741741
if-no-files-found: error
@@ -770,7 +770,7 @@ jobs:
770770
uses: actions/checkout@v6
771771

772772
- name: Download signed artifacts
773-
uses: actions/download-artifact@v6
773+
uses: actions/download-artifact@v8
774774
with:
775775
path: signed # download all artifacts to 'signed/'
776776

@@ -856,14 +856,14 @@ jobs:
856856
signed/winx64/*zip
857857
858858
- name: Store Artifacts
859-
uses: actions/upload-artifact@v5
859+
uses: actions/upload-artifact@v7
860860
with:
861861
if-no-files-found: error
862862
name: final-artifacts
863863
path: signed/*
864864

865865
- name: Setup aws to upload installers to CLAW S3 bucket
866-
uses: aws-actions/configure-aws-credentials@v5
866+
uses: aws-actions/configure-aws-credentials@v6
867867
with:
868868
aws-access-key-id: ${{ vars.AWS_ACCESS_KEY_ID }}
869869
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -889,7 +889,7 @@ jobs:
889889
steps:
890890

891891
- name: Download Signed Linux Packages
892-
uses: actions/download-artifact@v6
892+
uses: actions/download-artifact@v8
893893
with:
894894
name: cf-cli-linux-rpm-packages
895895

@@ -916,7 +916,7 @@ jobs:
916916
steps:
917917

918918
- name: Download Signed Linux Packages
919-
uses: actions/download-artifact@v6
919+
uses: actions/download-artifact@v8
920920
with:
921921
name: cf-cli-linux-deb-packages
922922

@@ -944,7 +944,7 @@ jobs:
944944
steps:
945945

946946
- name: Download Signed macOS Packages
947-
uses: actions/download-artifact@v6
947+
uses: actions/download-artifact@v8
948948
with:
949949
name: cf-cli-macos-packages
950950

@@ -968,7 +968,7 @@ jobs:
968968
steps:
969969

970970
- name: Download Signed Windows Binaries
971-
uses: actions/download-artifact@v6
971+
uses: actions/download-artifact@v8
972972
with:
973973
name: cf-cli-windows-binaries
974974

@@ -978,7 +978,7 @@ jobs:
978978
Get-AuthenticodeSignature -Verbose -ErrorAction Stop .\cf-cli_winx64.exe
979979
980980
- name: Download Signed Windows Binaries
981-
uses: actions/download-artifact@v6
981+
uses: actions/download-artifact@v8
982982
with:
983983
name: cf-cli-windows-packages
984984

@@ -1008,7 +1008,7 @@ jobs:
10081008
- s3-upload
10091009
steps:
10101010
- name: Download signed artifacts
1011-
uses: actions/download-artifact@v6
1011+
uses: actions/download-artifact@v8
10121012
with:
10131013
name: final-artifacts
10141014
path: ${{ env.ARTIFACTS_DIR }}

.github/workflows/release-update-repos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ jobs:
385385
# ls -R
386386
#
387387
# - name: Backup current Linux RPM repodata
388-
# uses: actions/upload-artifact@v5
388+
# uses: actions/upload-artifact@v7
389389
# with:
390390
# if-no-files-found: error
391391
# name: cf-cli-linux-rpm-repodata-backup
@@ -403,7 +403,7 @@ jobs:
403403
&& pip3 install awscli
404404
405405
- name: Setup aws to upload installers to CLAW S3 bucket
406-
uses: aws-actions/configure-aws-credentials@v5
406+
uses: aws-actions/configure-aws-credentials@v6
407407
with:
408408
aws-access-key-id: ${{ vars.AWS_ACCESS_KEY_ID }}
409409
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -428,7 +428,7 @@ jobs:
428428
run: ls -R
429429

430430
- name: Store Linux RPM repodata
431-
uses: actions/upload-artifact@v5
431+
uses: actions/upload-artifact@v7
432432
with:
433433
if-no-files-found: error
434434
name: cf-cli-linux-rpm-repodata
@@ -592,13 +592,13 @@ jobs:
592592
ref: ${{ github.ref_name }}
593593

594594
- name: Login to Docker Hub
595-
uses: docker/login-action@v3
595+
uses: docker/login-action@v4
596596
with:
597597
username: ${{ secrets.DOCKERHUB_USERNAME }}
598598
password: ${{ secrets.DOCKERHUB_TOKEN }}
599599

600600
- name: Build and export to Docker locally
601-
uses: docker/build-push-action@v6
601+
uses: docker/build-push-action@v7
602602
with:
603603
context: docker
604604
load: true
@@ -636,7 +636,7 @@ jobs:
636636
rm test.sh
637637
638638
- name: Push image
639-
uses: docker/build-push-action@v6
639+
uses: docker/build-push-action@v7
640640
with:
641641
context: docker
642642
push: true

.github/workflows/tests-integration-reusable.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ on:
1818

1919
env:
2020
ENV_NAME: ${{ inputs.env-name }}
21-
NODES: 12
22-
FLAKE_ATTEMPTS: ${{ vars.TEST_FLAKE_ATTEMPTS || '4' }}
21+
NODES: 4
22+
FLAKE_ATTEMPTS: ${{ vars.TEST_FLAKE_ATTEMPTS || '5' }}
2323
BBL_CLI_VERSION: ${{ vars.BBL_CLI_VERSION }}
2424
BOSH_CLI_VERSION: ${{ vars.BOSH_CLI_VERSION }}
2525
CREDHUB_CLI_VERSION: ${{ vars.CREDHUB_CLI_VERSION }}
@@ -88,7 +88,7 @@ jobs:
8888
if: ${{ !inputs.run-with-client-creds }}
8989
run: |
9090
pushd ./${ENV_NAME}/bbl-state
91-
eval "$(bbl print-env)"
91+
eval "$(bbl print-env --shell-type posix)"
9292
popd
9393
9494
cd cli
@@ -119,7 +119,7 @@ jobs:
119119
CF_INT_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
120120
run: |
121121
pushd ./${ENV_NAME}/bbl-state
122-
eval "$(bbl print-env)"
122+
eval "$(bbl print-env --shell-type posix)"
123123
popd
124124
125125
cd cli

.github/workflows/tests-integration.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,13 @@ jobs:
120120
needs:
121121
- get-sha
122122
- set-env-name
123+
- run-integration-tests-cf-env
123124
if: ${{
124125
always() &&
125126
needs.set-env-name.result == 'success' &&
126127
(github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' ||
127-
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') }}
128+
inputs.workflow == 'run-integration-tests-cf-env-with-client-creds') &&
129+
needs.run-integration-tests-cf-env.result != 'failure' }}
128130
uses: ./.github/workflows/tests-integration-reusable.yml
129131
with:
130132
name: Integration client creds

0 commit comments

Comments
 (0)