diff --git a/.github/ops-files/add-oidc-provider.yml b/.github/ops-files/add-oidc-provider.yml new file mode 100644 index 00000000000..2ad7e21a443 --- /dev/null +++ b/.github/ops-files/add-oidc-provider.yml @@ -0,0 +1,155 @@ +--- +- type: replace + path: /instance_groups/name=uaa/jobs/name=uaa/properties/login/oauth?/providers? + value: + cli-oidc-provider: + type: oidc1.0 + discoveryUrl: https://uaa-oidc.service.cf.internal:8443/.well-known/openid-configuration + scopes: + - openid + linkText: My other uaa Oauth Provider + showLinkText: true + addShadowUserOnLogin: true + relyingPartyId: rp_oidc_admin + relyingPartySecret: adminsecret + skipSslValidation: true + storeCustomAttributes: true + passwordGrantEnabled: true + attributeMappings: + given_name: given_name + family_name: family_name + user_name: user_name + +- type: replace + path: /instance_groups/name=uaa:after + value: + name: uaa-oidc + instances: 1 + azs: [z1, z2, z3] + vm_type: default + stemcell: default + persistent_disk: 500 + networks: + - name: default + jobs: + - name: uaa + release: uaa + properties: + encryption: + active_key_label: 'key-1' + encryption_keys: + - label: 'key-1' + passphrase: 'MY-PASSPHRASE' + uaadb: + address: sql-db.service.cf.internal + databases: + - name: uaa_oidc + tag: uaa + db_scheme: mysql + port: 3306 + roles: + - name: uaa-oidc + password: "((uaa_oidc_database_password))" + tag: admin + uaa: + url: https://uaa-oidc.service.cf.internal:8443 + jwt: + policy: + active_key_id: key-1 + keys: + key-1: + signingKey: ((uaa-oidc-key1.private_key)) + sslCertificate: ((uaa-oidc_tls.certificate)) + sslPrivateKey: ((uaa-oidc_tls.private_key)) + ca_certs: + - ((mysql_server_certificate.ca)) + clients: + rp_oidc_admin: + authorized-grant-types: authorization_code,client_credentials,refresh_token,user_token,password,urn:ietf:params:oauth:grant-type:saml2-bearer,implicit + redirect-uri: https://uaa.service.cf.internal:8443/login/callback/cli-oidc-provider + scope: openid,uaa.admin,clients.read,clients.write,clients.secret,scim.read,scim.write,clients.admin,uaa.user,doppler.firehose + authorities: uaa.admin,clients.admin + secret: adminsecret + scim: + user: + override: true + users: + - name: admin-oidc + password: "((uaa_oidc_admin_password))" + groups: + - uaa.admin + login: + protocol: https + saml: + activeKeyId: key1 + keys: + key1: + key: ((saml_oidc-key1.private_key)) + passphrase: '' + certificate: ((saml_oidc-key1.certificate)) + +- type: replace + path: /addons/name=bosh-dns-aliases/jobs/name=bosh-dns-aliases/properties/aliases/- + value: + domain: uaa-oidc.service.cf.internal + targets: + - query: '*' + instance_group: uaa-oidc + deployment: cf + network: default + domain: bosh + +- type: replace + path: /instance_groups/name=database/jobs/name=pxc-mysql/properties/seeded_databases?/- + value: + name: uaa_oidc + username: uaa-oidc + password: "((uaa_oidc_database_password))" + +- type: replace + path: /variables?/- + value: + name: uaa_oidc_admin_password + type: password + +- type: replace + path: /variables?/- + value: + name: uaa_oidc_database_password + type: password + +- type: replace + path: /variables?/- + value: + name: uaa-oidc-key1 + type: rsa + +- type: replace + path: /variables?/- + value: + name: uaa-oidc_ca + type: certificate + options: + is_ca: true + common_name: uaa-oidc + alternative_names: ["*.uaa-oidc.service.cf.internal"] + extended_key_usage: + - server_auth + +- type: replace + path: /variables?/- + value: + name: saml_oidc-key1 + type: certificate + options: + ca: uaa-oidc_ca + common_name: saml_oidc + +- type: replace + path: /variables?/- + value: + name: uaa-oidc_tls + type: certificate + options: + ca: uaa-oidc_ca + common_name: uaa-oidc.service.cf.internal diff --git a/.github/ops-files/add-uaa-client-credentials.yml b/.github/ops-files/add-uaa-client-credentials.yml new file mode 100644 index 00000000000..68a9f060850 --- /dev/null +++ b/.github/ops-files/add-uaa-client-credentials.yml @@ -0,0 +1,11 @@ +--- +- type: replace + path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/potato-face? + value: + access-token-validity: 600 + authorized-grant-types: client_credentials + override: true + secret: ((client-secret)) + scope: openid,routing.router_groups.write,scim.read,cloud_controller.admin,uaa.user,routing.router_groups.read,cloud_controller.read,password.write,cloud_controller.write,network.admin,doppler.firehose,scim.write,uaa.admin + authorities: openid,routing.router_groups.write,scim.read,cloud_controller.admin,uaa.user,routing.router_groups.read,cloud_controller.read,password.write,cloud_controller.write,network.admin,doppler.firehose,scim.write,uaa.admin + diff --git a/.github/ops-files/diego-cell-instances.yml b/.github/ops-files/diego-cell-instances.yml new file mode 100644 index 00000000000..87d715d696c --- /dev/null +++ b/.github/ops-files/diego-cell-instances.yml @@ -0,0 +1,4 @@ +--- +- type: replace + path: /instance_groups/name=diego-cell/instances + value: 3 diff --git a/.github/ops-files/use-cflinuxfs3.yml b/.github/ops-files/use-cflinuxfs3.yml deleted file mode 100644 index 5e52e190372..00000000000 --- a/.github/ops-files/use-cflinuxfs3.yml +++ /dev/null @@ -1,105 +0,0 @@ -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/diego/droplet_destinations/cflinuxfs3? - value: /home/vcap -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/diego/lifecycle_bundles/buildpack~1cflinuxfs3? - value: buildpack_app_lifecycle/buildpack_app_lifecycle.tgz -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/stacks/name=cflinuxfs4:before - value: - description: Cloud Foundry Linux-based filesystem (Ubuntu 18.04) - name: cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/0:before - value: - name: staticfile_buildpack - package: staticfile-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/0:after - value: - name: java_buildpack - package: java-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/1:after - value: - name: ruby_buildpack - package: ruby-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/2:after - value: - name: dotnet_core_buildpack - package: dotnet-core-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/3:after - value: - name: nodejs_buildpack - package: nodejs-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/4:after - value: - name: go_buildpack - package: go-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/5:after - value: - name: python_buildpack - package: python-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/6:after - value: - name: php_buildpack - package: php-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/7:after - value: - name: nginx_buildpack - package: nginx-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/8:after - value: - name: r_buildpack - package: r-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/9:after - value: - name: binary_buildpack - package: binary-buildpack-cflinuxfs3 -- type: replace - path: /instance_groups/name=cc-worker/jobs/name=cloud_controller_worker/properties/cc/diego/droplet_destinations/cflinuxfs3? - value: /home/vcap -- type: replace - path: /instance_groups/name=cc-worker/jobs/name=cloud_controller_worker/properties/cc/diego/lifecycle_bundles/buildpack~1cflinuxfs3? - value: buildpack_app_lifecycle/buildpack_app_lifecycle.tgz -- type: replace - path: /instance_groups/name=scheduler/jobs/name=cloud_controller_clock/properties/cc/diego/droplet_destinations/cflinuxfs3? - value: /home/vcap -- type: replace - path: /instance_groups/name=scheduler/jobs/name=cloud_controller_clock/properties/cc/diego/lifecycle_bundles/buildpack~1cflinuxfs3? - value: buildpack_app_lifecycle/buildpack_app_lifecycle.tgz -- type: replace - path: /instance_groups/name=scheduler/jobs/name=cc_deployment_updater/properties/cc/diego/droplet_destinations/cflinuxfs3? - value: /home/vcap -- type: replace - path: /instance_groups/name=scheduler/jobs/name=cc_deployment_updater/properties/cc/diego/lifecycle_bundles/buildpack~1cflinuxfs3? - value: buildpack_app_lifecycle/buildpack_app_lifecycle.tgz -- type: replace - path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs3-rootfs-setup? - value: - name: cflinuxfs3-rootfs-setup - properties: - cflinuxfs3-rootfs: - trusted_certs: - - ((diego_instance_identity_ca.ca)) - - ((credhub_tls.ca)) - - ((uaa_ssl.ca)) - release: cflinuxfs3 -- type: replace - path: /instance_groups/name=diego-cell/jobs/name=rep/properties/diego/rep/preloaded_rootfses/0:before - value: cflinuxfs3:/var/vcap/packages/cflinuxfs3/rootfs.tar -- type: replace - path: /releases/name=cflinuxfs4:before - value: - name: cflinuxfs3 - sha1: 5463400cd5490e9d847326668d504a8833cf3e4e - url: https://bosh.io/d/github.com/cloudfoundry/cflinuxfs3-release?v=0.369.0 - version: 0.369.0 diff --git a/.github/ops-files/use-latest-capi.yml b/.github/ops-files/use-latest-capi.yml new file mode 100644 index 00000000000..216b9df70c0 --- /dev/null +++ b/.github/ops-files/use-latest-capi.yml @@ -0,0 +1,10 @@ +--- +- type: replace + path: /releases/name=capi/version + value: latest + +- type: remove + path: /releases/name=capi/url? + +- type: remove + path: /releases/name=capi/sha1? diff --git a/.github/workflows/tests-integration-reusable.yml b/.github/workflows/tests-integration-reusable.yml index 7e469d4b3a2..99fdf33c45f 100644 --- a/.github/workflows/tests-integration-reusable.yml +++ b/.github/workflows/tests-integration-reusable.yml @@ -10,9 +10,6 @@ name: "pvt: run integration tests" on: workflow_call: inputs: - capi-version: - required: true - type: string run-with-client-creds: required: true type: boolean @@ -45,38 +42,16 @@ jobs: with: ref: ${{inputs.gitRef}} - - name: Checkout cli-ci - uses: actions/checkout@v4 - with: - repository: cloudfoundry/cli-ci - path: cli-ci - - name: Checkout cf-acceptance-tests + if: ${{ inputs.name == 'cats' }} uses: actions/checkout@v4 with: repository: cloudfoundry/cf-acceptance-tests ref: release-candidate path: cf-acceptance-tests - - id: read-min-capi - name: Read MIN CAPI - run: | - wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ - chmod +x /usr/bin/yq - version=$(yq '.capi-version-min' build_data.yml) - echo "version=$version" >> $GITHUB_OUTPUT - - - name: Checkout cf-deployment Min CAPI - if: ${{ inputs.capi-version != 'edge' }} - uses: actions/checkout@v4 - with: - repository: cloudfoundry/cf-deployment - path: cf-deployment - ref: ${{ steps.read-min-capi.outputs.version }} - - name: Checkout cf-deployment uses: actions/checkout@v4 - if: ${{ inputs.capi-version == 'edge' }} with: repository: cloudfoundry/cf-deployment path: cf-deployment @@ -96,7 +71,7 @@ jobs: run: | shepherd login service-account ${account_token} - echo "shepherd create lease --duration 8h --pool ${pool_name} --pool-namespace ${pool_namespace} --namespace tas-devex" + echo "shepherd create lease --duration 8h --pool ${pool_name} --pool-namespace ${pool_namespace} --namespace tas-devex --description 'CLI GHA'" lease_id=$(shepherd create lease --duration 8h --pool ${pool_name} --pool-namespace ${pool_namespace} --namespace tas-devex --json | jq -r .id) # Give sometime for the lease to complete. Shepherd may take upto an 3 hours to create an env # if the pool is empty. @@ -160,9 +135,14 @@ jobs: apt-get install -y build-essential unzip - name: Upload latest CAPI release - if: ${{ inputs.capi-version == 'edge' }} + env: + capi_release_version: ${{ vars.CAPI_RELEASE_VERSION }} run: | - capi_release_version=$(curl -s https://api.github.com/repos/cloudfoundry/capi-release/releases/latest | jq -r .tag_name) + if [ -z "$capi_release_version" ] + then + capi_release_version=$(curl -s https://api.github.com/repos/cloudfoundry/capi-release/releases/latest | jq -r .tag_name) + fi + echo "Latest CAPI release is $capi_release_version" eval "$(bbl print-env --metadata-file metadata.json)" @@ -172,7 +152,6 @@ jobs: bosh upload-release "https://bosh.io/d/github.com/cloudfoundry/capi-release?v=$capi_release_version" - name: Deploy Isolation Segment and OIDC Provider - if: ${{ inputs.capi-version == 'edge' }} run: | env_name=$(jq -r .name metadata.json) jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${env_name}.priv @@ -181,36 +160,13 @@ jobs: # deploy bosh -d cf manifest > /tmp/manifest.yml bosh interpolate /tmp/manifest.yml \ - -o .github/ops-files/use-cflinuxfs3.yml \ - -o .github/ops-files/replace-redis.yml \ -o cf-deployment/operations/use-internal-lookup-for-route-services.yml \ -o cf-deployment/operations/add-persistent-isolation-segment-diego-cell.yml \ - -o cli-ci/ci/infrastructure/operations/use-latest-capi.yml \ - -o cli-ci/ci/infrastructure/operations/add-oidc-provider.yml \ - -o cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml \ - -o cli-ci/ci/infrastructure/operations/diego-cell-instances.yml \ - -v client-secret="${{ secrets.CLIENT_SECRET }}" \ - > ./director.yml - - bosh -d cf deploy director.yml -n - echo "Deployed CAPI version:" - bosh -d cf releases | grep capi - - - name: Deploy MIN CAPI with Isolation Segment and OIDC Provider - if: ${{ inputs.capi-version != 'edge' }} - run: | - env_name=$(jq -r .name metadata.json) - jq -r .bosh.jumpbox_private_key metadata.json > /tmp/${env_name}.priv - eval "$(bbl print-env --metadata-file metadata.json)" - - # deploy - bosh -d cf manifest > /tmp/manifest.yml - bosh interpolate /tmp/manifest.yml \ - -o cf-deployment/operations/test/add-persistent-isolation-segment-diego-cell.yml \ - -o cli-ci/ci/infrastructure/operations/add-oidc-provider.yml \ - -o cli-ci/ci/infrastructure/operations/add-uaa-client-credentials.yml \ - -o cli-ci/ci/infrastructure/operations/diego-cell-instances.yml \ - -o cli-ci/ci/infrastructure/operations/use-latest-ruby-buildpack.yml \ + -o .github/ops-files/replace-redis.yml \ + -o .github/ops-files/use-latest-capi.yml \ + -o .github/ops-files/add-oidc-provider.yml \ + -o .github/ops-files/add-uaa-client-credentials.yml \ + -o .github/ops-files/diego-cell-instances.yml \ -v client-secret="${{ secrets.CLIENT_SECRET }}" \ > ./director.yml diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 0e6eb294da5..4da7454fc4e 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -13,7 +13,6 @@ on: - all - run-integration-tests-cf-env - run-integration-tests-cf-env-with-client-creds - # - run-integration-tests-cf-env-with-min-capi - run-cats-cf-env push: tags: @@ -73,7 +72,6 @@ jobs: if: ${{ github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env' }} uses: ./.github/workflows/tests-integration-reusable.yml with: - capi-version: edge run-with-client-creds: false os: ubuntu-latest name: Integration @@ -88,30 +86,12 @@ jobs: if: ${{ github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env-with-client-creds' }} uses: ./.github/workflows/tests-integration-reusable.yml with: - capi-version: edge run-with-client-creds: true os: ubuntu-latest name: Integration client creds gitRef: ${{needs.get-sha.outputs.gitRef}} secrets: inherit - # run-integration-tests-cf-env-with-min-capi: - # name: MIN CAPI - # needs: - # - get-sha - # - units - # if: ${{ github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-integration-tests-cf-env-with-min-capi' }} - # uses: ./.github/workflows/tests-integration-reusable.yml - # with: - # capi-version: min - # run-with-client-creds: false - # os: ubuntu-latest - # name: Integration MIN CAPI - # pool-name: cfd_16_11_0 - # pool-namespace: tas-devex - # is-pr: ${{ github.event_name != 'workflow_dispatch' }} - # secrets: inherit - run-cats-cf-env: name: CATS needs: @@ -121,7 +101,6 @@ jobs: if: ${{ github.event_name != 'workflow_dispatch' || inputs.workflow == 'all' || inputs.workflow == 'run-cats-cf-env' }} uses: ./.github/workflows/tests-integration-reusable.yml with: - capi-version: edge run-with-client-creds: false os: ubuntu-latest name: cats diff --git a/actor/v7pushaction/handle_stack_override_test.go b/actor/v7pushaction/handle_stack_override_test.go index 8d7ebb32f93..a7dd434f7be 100644 --- a/actor/v7pushaction/handle_stack_override_test.go +++ b/actor/v7pushaction/handle_stack_override_test.go @@ -51,7 +51,7 @@ var _ = Describe("HandleStackOverride", func() { originalManifest.Applications = []manifestparser.Application{ { - Stack: "cflinuxfs3", + Stack: "cflinuxfs4", }, } }) diff --git a/api/cloudcontroller/ccv3/buildpack_test.go b/api/cloudcontroller/ccv3/buildpack_test.go index 735a99fb0f3..9ef09c56dc9 100644 --- a/api/cloudcontroller/ccv3/buildpack_test.go +++ b/api/cloudcontroller/ccv3/buildpack_test.go @@ -68,7 +68,7 @@ var _ = Describe("Buildpacks", func() { "guid": "guid2", "name": "staticfile_buildpack", "state": "AWAITING_UPLOAD", - "stack": "cflinuxfs3", + "stack": "cflinuxfs4", "position": 2, "enabled": false, "locked": true, @@ -87,7 +87,7 @@ var _ = Describe("Buildpacks", func() { "guid": "guid3", "name": "go_buildpack", "state": "AWAITING_UPLOAD", - "stack": "cflinuxfs2", + "stack": "cflinuxfs4", "position": 3, "enabled": true, "locked": false, @@ -137,7 +137,7 @@ var _ = Describe("Buildpacks", func() { Position: types.NullInt{Value: 2, IsSet: true}, Enabled: types.NullBool{Value: false, IsSet: true}, Locked: types.NullBool{Value: true, IsSet: true}, - Stack: "cflinuxfs3", + Stack: "cflinuxfs4", State: "AWAITING_UPLOAD", Metadata: &Metadata{Labels: map[string]types.NullString{}}, }, @@ -147,7 +147,7 @@ var _ = Describe("Buildpacks", func() { Position: types.NullInt{Value: 3, IsSet: true}, Enabled: types.NullBool{Value: true, IsSet: true}, Locked: types.NullBool{Value: false, IsSet: true}, - Stack: "cflinuxfs2", + Stack: "cflinuxfs4", State: "AWAITING_UPLOAD", Metadata: &Metadata{Labels: map[string]types.NullString{}}, }, diff --git a/cf/commands/buildpack/buildpacks_test.go b/cf/commands/buildpack/buildpacks_test.go index d50f0314699..2b9c00fc954 100644 --- a/cf/commands/buildpack/buildpacks_test.go +++ b/cf/commands/buildpack/buildpacks_test.go @@ -79,7 +79,7 @@ var _ = Describe("ListBuildpacks", func() { p3 := 15 t := true f := false - linux := "cflinuxfs2" + linux := "cflinuxfs4" buildpackRepo.Buildpacks = []models.Buildpack{ {Name: "Buildpack-1", Stack: linux, Position: &p1, Enabled: &t, Locked: &f}, @@ -92,9 +92,9 @@ var _ = Describe("ListBuildpacks", func() { Expect(ui.Outputs()).To(ContainSubstrings( []string{"Getting buildpacks"}, []string{"buildpack", "stack", "position", "enabled"}, - []string{"Buildpack-1", "cflinuxfs2", "5", "true", "false"}, - []string{"Buildpack-2", "cflinuxfs2", "10", "false", "true"}, - []string{"Buildpack-3", "cflinuxfs2", "15", "true", "false"}, + []string{"Buildpack-1", "cflinuxfs4", "5", "true", "false"}, + []string{"Buildpack-2", "cflinuxfs4", "10", "false", "true"}, + []string{"Buildpack-3", "cflinuxfs4", "15", "true", "false"}, )) }) diff --git a/command/v7/app_command_test.go b/command/v7/app_command_test.go index 0bdd6544a2c..c64703644a7 100644 --- a/command/v7/app_command_test.go +++ b/command/v7/app_command_test.go @@ -203,7 +203,7 @@ var _ = Describe("app Command", func() { }, }, CurrentDroplet: resources.Droplet{ - Stack: "cflinuxfs2", + Stack: "cflinuxfs4", Buildpacks: []resources.DropletBuildpack{ { Name: "ruby_buildpack", diff --git a/command/v7/label_updater_test.go b/command/v7/label_updater_test.go index 8c07196e533..94843b12d5a 100644 --- a/command/v7/label_updater_test.go +++ b/command/v7/label_updater_test.go @@ -131,7 +131,7 @@ var _ = Describe("LabelUpdater", func() { func(resourceType string) { targetResource = TargetResource{ ResourceType: resourceType, - BuildpackStack: "cflinuxfs3", + BuildpackStack: "cflinuxfs4", } err := cmd.Execute(targetResource, nil) diff --git a/command/v7/labels_command.go b/command/v7/labels_command.go index 4b371508558..1899b43f83c 100644 --- a/command/v7/labels_command.go +++ b/command/v7/labels_command.go @@ -116,7 +116,7 @@ func (cmd LabelsCommand) Examples() string { return ` cf labels app dora cf labels org business -cf labels buildpack go_buildpack --stack cflinuxfs3` +cf labels buildpack go_buildpack --stack cflinuxfs4` } func (cmd LabelsCommand) Resources() string { diff --git a/command/v7/labels_command_test.go b/command/v7/labels_command_test.go index 09dba552751..e854d678704 100644 --- a/command/v7/labels_command_test.go +++ b/command/v7/labels_command_test.go @@ -73,7 +73,7 @@ var _ = Describe("labels command", func() { "Failure when --stack is combined with anything other than 'buildpack'", func(resourceType string) { cmd.RequiredArgs.ResourceType = resourceType - cmd.BuildpackStack = "cflinuxfs3" + cmd.BuildpackStack = "cflinuxfs4" executeErr = cmd.Execute(nil) @@ -751,14 +751,14 @@ var _ = Describe("labels command", func() { ResourceType: "buildpack", ResourceName: "oshkosh", } - cmd.BuildpackStack = "cflinuxfs3" + cmd.BuildpackStack = "cflinuxfs4" }) It("retrieves the labels when resource type is buildpack", func() { Expect(executeErr).ToNot(HaveOccurred()) Expect(fakeLabelsActor.GetBuildpackLabelsCallCount()).To(Equal(1)) buildpackName, stackName := fakeLabelsActor.GetBuildpackLabelsArgsForCall(0) Expect(buildpackName).To(Equal("oshkosh")) - Expect(stackName).To(Equal("cflinuxfs3")) + Expect(stackName).To(Equal("cflinuxfs4")) }) }) }) diff --git a/command/v7/set_label_command.go b/command/v7/set_label_command.go index 05f833e058d..06522547b4f 100644 --- a/command/v7/set_label_command.go +++ b/command/v7/set_label_command.go @@ -72,7 +72,7 @@ func (cmd SetLabelCommand) Examples() string { return ` cf set-label app dora env=production cf set-label org business pci=true public-facing=false -cf set-label buildpack go_buildpack go=1.12 -s cflinuxfs3` +cf set-label buildpack go_buildpack go=1.12 -s cflinuxfs4` } func (cmd SetLabelCommand) Resources() string { diff --git a/command/v7/shared/app_summary_displayer_test.go b/command/v7/shared/app_summary_displayer_test.go index 9bf41061b14..18fd016a264 100644 --- a/command/v7/shared/app_summary_displayer_test.go +++ b/command/v7/shared/app_summary_displayer_test.go @@ -615,7 +615,7 @@ var _ = Describe("app summary displayer", func() { }, }, CurrentDroplet: resources.Droplet{ - Stack: "cflinuxfs2", + Stack: "cflinuxfs4", Buildpacks: []resources.DropletBuildpack{ { Name: "ruby_buildpack", @@ -645,7 +645,7 @@ var _ = Describe("app summary displayer", func() { }) It("displays stack and buildpacks", func() { - Expect(testUI.Out).To(Say(`stack:\s+cflinuxfs2\n`)) + Expect(testUI.Out).To(Say(`stack:\s+cflinuxfs4\n`)) Expect(testUI.Out).To(Say(`buildpacks:\s+\n`)) Expect(testUI.Out).To(Say(`name\s+version\s+detect output\s+buildpack name\n`)) Expect(testUI.Out).To(Say(`ruby_buildpack\s+0.0.1\s+some-detect-output\s+ruby_buildpack_name\n`)) diff --git a/command/v7/shared/manifest_diff_displayer_test.go b/command/v7/shared/manifest_diff_displayer_test.go index 968014b3210..e40dfa2fb4e 100644 --- a/command/v7/shared/manifest_diff_displayer_test.go +++ b/command/v7/shared/manifest_diff_displayer_test.go @@ -66,7 +66,7 @@ applications: parameters: key1: value1 key2: value2 - stack: cflinuxfs3 + stack: cflinuxfs4 metadata: annotations: contact: "bob@example.com jane@example.com" @@ -112,7 +112,7 @@ applications: parameters: key1: value1 key2: value2 - stack: cflinuxfs3 + stack: cflinuxfs4 metadata: annotations: contact: "bob@example.com jane@example.com" @@ -379,7 +379,7 @@ applications: parameters: key1: value1 key2: value2 - stack: cflinuxfs3 + stack: cflinuxfs4 metadata: annotations: contact: "bob@example.com jane@example.com" @@ -426,7 +426,7 @@ applications: parameters: key1: value1 key2: value2 - stack: cflinuxfs3 + stack: cflinuxfs4 metadata: annotations: contact: bob@example.com jane@example.com diff --git a/command/v7/unset_label_command.go b/command/v7/unset_label_command.go index 2fa752cf396..0636f7d0097 100644 --- a/command/v7/unset_label_command.go +++ b/command/v7/unset_label_command.go @@ -64,7 +64,7 @@ func (cmd UnsetLabelCommand) Examples() string { return ` cf unset-label app dora ci_signature_sha2 cf unset-label org business pci public-facing -cf unset-label buildpack go_buildpack go -s cflinuxfs3` +cf unset-label buildpack go_buildpack go -s cflinuxfs4` } func (cmd UnsetLabelCommand) Resources() string { diff --git a/doc/adr/0005-v7-push-transforms-manifest-before-applying.md b/doc/adr/0005-v7-push-transforms-manifest-before-applying.md index da5b0728659..35bd334fbb1 100644 --- a/doc/adr/0005-v7-push-transforms-manifest-before-applying.md +++ b/doc/adr/0005-v7-push-transforms-manifest-before-applying.md @@ -49,7 +49,7 @@ Updating app with these attributes... + instances: 3 memory: - stack: cflinuxfs3 + stack: cflinuxfs4 routes: dora.sheer-shark.lite.cli.fun ``` diff --git a/doc/v7-plugin-api-changes.md b/doc/v7-plugin-api-changes.md index aa3691de7a1..60a673ee9be 100644 --- a/doc/v7-plugin-api-changes.md +++ b/doc/v7-plugin-api-changes.md @@ -53,7 +53,7 @@ V6 "StagingFailedReason": "", "Stack": { "Guid": "881b268c-d234-4c08-b5c5-50099ccb02bc", - "Name": "cflinuxfs3", + "Name": "cflinuxfs4", "Description": "" }, "Instances": [ @@ -180,7 +180,7 @@ V7 "GUID": "0110f8db-f426-4aad-87d1-4106050cd129", "State": "STAGED", "CreatedAt": "2020-01-14T22:51:13Z", - "Stack": "cflinuxfs3", + "Stack": "cflinuxfs4", "Image": "", "Buildpacks": [ { @@ -439,7 +439,7 @@ V7 { "Name": "some-app", "GUID": "defbb5bb-f010-4e4c-9841-60f641dd5bd4", - "StackName": "cflinuxfs3", + "StackName": "cf4", "State": "STARTED", "LifecycleType": "buildpack", "LifecycleBuildpacks": null, diff --git a/integration/helpers/app_instance_table_test.go b/integration/helpers/app_instance_table_test.go index 7508e0c984e..752f4ccdb85 100644 --- a/integration/helpers/app_instance_table_test.go +++ b/integration/helpers/app_instance_table_test.go @@ -15,7 +15,7 @@ Showing health and status for app dora in org wut / space wut as admin... name: dora requested state: started routes: dora.bosh-lite.com -stack: cflinuxfs2 +stack: cflinuxfs4 buildpacks: ruby 1.6.44 type: web diff --git a/integration/helpers/stack.go b/integration/helpers/stack.go index 34fa24439bc..4a182700f08 100644 --- a/integration/helpers/stack.go +++ b/integration/helpers/stack.go @@ -36,17 +36,17 @@ func FetchStacks() []string { return stacks } -// PreferredStack returns the cflinuxfs3 stack name if it present, otherwise cflinuxfs2 is returned. +// PreferredStack returns the cflinuxfs4 stack name if it present, otherwise cflinuxfs3 is returned. func PreferredStack() string { stacks := FetchStacks() for _, name := range stacks { - if name == "cflinuxfs3" { + if name == "cflinuxfs4" { return name } } - return "cflinuxfs2" + return "cflinuxfs3" } // CreateStack creates a new stack with the user provided name. If a name is not provided, a random name is used diff --git a/integration/v7/isolated/labels_command_test.go b/integration/v7/isolated/labels_command_test.go index a5400152a15..c8182e00285 100644 --- a/integration/v7/isolated/labels_command_test.go +++ b/integration/v7/isolated/labels_command_test.go @@ -32,7 +32,7 @@ var _ = Describe("labels command", func() { Eventually(session).Should(Say("EXAMPLES:")) Eventually(session).Should(Say(`\s+cf labels app dora`)) Eventually(session).Should(Say(`\s+cf labels org business`)) - Eventually(session).Should(Say(`\s+cf labels buildpack go_buildpack --stack cflinuxfs3`)) + Eventually(session).Should(Say(`\s+cf labels buildpack go_buildpack --stack cflinuxfs4`)) Eventually(session).Should(Say("RESOURCES:")) Eventually(session).Should(Say(`\s+app`)) Eventually(session).Should(Say(`\s+buildpack`)) @@ -184,12 +184,12 @@ var _ = Describe("labels command", func() { When("the buildpack is bound to a stack", func() { BeforeEach(func() { - helpers.SetupBuildpackWithStack(buildpackName, "cflinuxfs3") - session := helpers.CF("set-label", "buildpack", buildpackName, "-s", "cflinuxfs3", "some-other-key=some-other-value", "some-key=some-value") + helpers.SetupBuildpackWithStack(buildpackName, "cflinuxfs4") + session := helpers.CF("set-label", "buildpack", buildpackName, "-s", "cflinuxfs4", "some-other-key=some-other-value", "some-key=some-value") Eventually(session).Should(Exit(0)) }) AfterEach(func() { - session := helpers.CF("delete-buildpack", buildpackName, "-f", "-s", "cflinuxfs3") + session := helpers.CF("delete-buildpack", buildpackName, "-f", "-s", "cflinuxfs4") Eventually(session).Should(Exit(0)) }) @@ -203,8 +203,8 @@ var _ = Describe("labels command", func() { }) It("lists the labels when the stack is specified", func() { - session := helpers.CF("labels", "buildpack", buildpackName, "-s", "cflinuxfs3") - Eventually(session).Should(Say(regexp.QuoteMeta("Getting labels for buildpack %s with stack %s as %s...\n\n"), buildpackName, "cflinuxfs3", username)) + session := helpers.CF("labels", "buildpack", buildpackName, "-s", "cflinuxfs4") + Eventually(session).Should(Say(regexp.QuoteMeta("Getting labels for buildpack %s with stack %s as %s...\n\n"), buildpackName, "cflinuxfs4", username)) Eventually(session).Should(Say(`key\s+value`)) Eventually(session).Should(Say(`some-key\s+some-value`)) Eventually(session).Should(Say(`some-other-key\s+some-other-value`)) @@ -229,16 +229,16 @@ var _ = Describe("labels command", func() { newStackName = helpers.NewStackName() helpers.CreateStack(newStackName) helpers.SetupBuildpackWithStack(buildpackName, newStackName) - helpers.SetupBuildpackWithStack(buildpackName, "cflinuxfs3") + helpers.SetupBuildpackWithStack(buildpackName, "cflinuxfs4") session := helpers.CF("set-label", "buildpack", buildpackName, "-s", newStackName, "my-stack-some-other-key=some-other-value", "some-key=some-value") Eventually(session).Should(Exit(0)) - session = helpers.CF("set-label", "buildpack", buildpackName, "--stack", "cflinuxfs3", + session = helpers.CF("set-label", "buildpack", buildpackName, "--stack", "cflinuxfs4", "cfl2=var2", "cfl1=var1") Eventually(session).Should(Exit(0)) }) AfterEach(func() { - session := helpers.CF("delete-buildpack", buildpackName, "-f", "-s", "cflinuxfs3") + session := helpers.CF("delete-buildpack", buildpackName, "-f", "-s", "cflinuxfs4") Eventually(session).Should(Exit(0)) session = helpers.CF("delete-buildpack", buildpackName, "-f", "-s", newStackName) Eventually(session).Should(Exit(0)) @@ -275,9 +275,9 @@ var _ = Describe("labels command", func() { Eventually(session).Should(Exit(0)) }) - It("lists the labels for buildpackName/cflinuxfs3", func() { - session := helpers.CF("labels", "buildpack", buildpackName, "--stack", "cflinuxfs3") - Eventually(session).Should(Say(regexp.QuoteMeta("Getting labels for buildpack %s with stack cflinuxfs3 as %s...\n\n"), buildpackName, username)) + It("lists the labels for buildpackName/cflinuxfs4", func() { + session := helpers.CF("labels", "buildpack", buildpackName, "--stack", "cflinuxfs4") + Eventually(session).Should(Say(regexp.QuoteMeta("Getting labels for buildpack %s with stack cflinuxfs4 as %s...\n\n"), buildpackName, username)) Eventually(session).Should(Say(`key\s+value`)) Eventually(session).Should(Say(`cfl1\s+var1`)) Eventually(session).Should(Say(`cfl2\s+var2`)) diff --git a/integration/v7/isolated/set_label_command_test.go b/integration/v7/isolated/set_label_command_test.go index 3b7cc72ed21..fac616d7a22 100644 --- a/integration/v7/isolated/set_label_command_test.go +++ b/integration/v7/isolated/set_label_command_test.go @@ -33,7 +33,7 @@ var _ = Describe("set-label command", func() { Eventually(session).Should(Say("EXAMPLES:")) Eventually(session).Should(Say(`\s+cf set-label app dora env=production`)) Eventually(session).Should(Say(`\s+cf set-label org business pci=true public-facing=false`)) - Eventually(session).Should(Say(`\s+cf set-label buildpack go_buildpack go=1.12 -s cflinuxfs3`)) + Eventually(session).Should(Say(`\s+cf set-label buildpack go_buildpack go=1.12 -s cflinuxfs4`)) Eventually(session).Should(Say("RESOURCES:")) Eventually(session).Should(Say(`\s+app`)) Eventually(session).Should(Say(`\s+buildpack`)) diff --git a/integration/v7/isolated/unset_label_command_test.go b/integration/v7/isolated/unset_label_command_test.go index 46434a3da7f..114e40e60ca 100644 --- a/integration/v7/isolated/unset_label_command_test.go +++ b/integration/v7/isolated/unset_label_command_test.go @@ -31,7 +31,7 @@ var _ = Describe("unset-label command", func() { Eventually(session).Should(Say("EXAMPLES:")) Eventually(session).Should(Say(`\s+cf unset-label app dora ci_signature_sha2`)) Eventually(session).Should(Say(`\s+cf unset-label org business pci public-facing`)) - Eventually(session).Should(Say(`\s+cf unset-label buildpack go_buildpack go -s cflinuxfs3`)) + Eventually(session).Should(Say(`\s+cf unset-label buildpack go_buildpack go -s cflinuxfs4`)) Eventually(session).Should(Say("RESOURCES:")) Eventually(session).Should(Say(`\s+app`)) Eventually(session).Should(Say(`\s+buildpack`)) diff --git a/util/manifestparser/application_test.go b/util/manifestparser/application_test.go index eb0474b58bf..3376f264db7 100644 --- a/util/manifestparser/application_test.go +++ b/util/manifestparser/application_test.go @@ -178,13 +178,13 @@ buildpacks: Context("when stack is provided", func() { BeforeEach(func() { rawYAML = []byte(`--- -stack: cflinuxfs3 +stack: cflinuxfs4 `) }) It("unmarshals the stack property", func() { Expect(executeErr).ToNot(HaveOccurred()) - Expect(application.Stack).To(Equal("cflinuxfs3")) + Expect(application.Stack).To(Equal("cflinuxfs4")) }) })