├── .github └── workflows │ ├── build-buildpacks-ci-image.yml │ ├── build-cflinuxfs3-dev-image.yml │ ├── build-test-on-jammy-image.yml │ ├── get-all-php-releases.yml │ └── get-specific-php-version-releases.yml ├── .gitignore ├── .rubocop.yml ├── .ruby-version ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── NOTICE ├── README.md ├── Rakefile ├── bin ├── update-pipelines └── update-pipelines-erb ├── config ├── buildpack │ ├── apt.yml │ ├── binary.yml │ ├── dotnet-core.yml │ ├── go.yml │ ├── hwc.yml │ ├── nginx.yml │ ├── nodejs.yml │ ├── php.yml │ ├── python.yml │ ├── r.yml │ ├── ruby.yml │ └── staticfile.yml └── google-chrome-apt-key.pub ├── deployments ├── concourse-gcp │ ├── bosh-init │ │ └── bosh.yml.erb │ ├── cloud.yml │ └── manifest.yml.erb ├── edge-shared │ ├── num-cells.yml │ ├── uaa-lockout.yml │ ├── use-latest-linux-stemcell.yml │ └── use-latest-windows-stemcell.yml ├── operations │ ├── add-windows-binary-buildpacks.yml │ ├── cflinuxfs3-rootfs-certs-as-list.yml │ ├── cflinuxfs3.yml │ ├── do-not-pre-install-buildpacks.yml │ ├── install-cflinuxfs4-buildpacks-only.yml │ ├── no-canaries.yml │ ├── set-nats-instance-group.yml │ ├── substitute-with-cflinuxfs4-trusted-certs.yml │ ├── use-garden-runc-1-20.7.yml │ ├── use-latest-garden-windows.yml │ └── use-xenial-stemcell.yml └── patches │ ├── create-director-override.sh │ └── large-director.yml ├── dockerfiles ├── README.md ├── cflinuxfs3-dev.Dockerfile ├── core-deps-ci.Dockerfile ├── cron-resource │ ├── Dockerfile │ ├── README.md │ ├── check │ └── in ├── depwatcher │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── docs │ │ ├── Depwatcher.html │ │ ├── Depwatcher │ │ │ ├── AppDynamicsAgent.html │ │ │ ├── AppDynamicsAgent │ │ │ │ └── Release.html │ │ │ ├── Base.html │ │ │ ├── Base │ │ │ │ └── Internal.html │ │ │ ├── CRAN.html │ │ │ ├── CRAN │ │ │ │ └── Release.html │ │ │ ├── CaApmAgent.html │ │ │ ├── CaApmAgent │ │ │ │ └── Release.html │ │ │ ├── DotnetAspNetCore.html │ │ │ ├── DotnetAspNetCore │ │ │ │ └── External.html │ │ │ ├── DotnetRuntime.html │ │ │ ├── DotnetRuntime │ │ │ │ └── External.html │ │ │ ├── DotnetSdk.html │ │ │ ├── DotnetSdk │ │ │ │ ├── DotnetRelease.html │ │ │ │ └── External.html │ │ │ ├── Entries.html │ │ │ ├── Entry.html │ │ │ ├── GithubReleases.html │ │ │ ├── GithubReleases │ │ │ │ ├── GithubAsset.html │ │ │ │ ├── GithubRelease.html │ │ │ │ └── Release.html │ │ │ ├── GithubTags.html │ │ │ ├── GithubTags │ │ │ │ ├── Commit.html │ │ │ │ ├── External.html │ │ │ │ └── Tag.html │ │ │ ├── Go.html │ │ │ ├── Go │ │ │ │ └── Release.html │ │ │ ├── HTTPClient.html │ │ │ ├── HTTPClientImpl.html │ │ │ ├── HTTPClientInsecure.html │ │ │ ├── Httpd.html │ │ │ ├── Httpd │ │ │ │ └── Release.html │ │ │ ├── JRuby.html │ │ │ ├── JRuby │ │ │ │ └── Release.html │ │ │ ├── Miniconda.html │ │ │ ├── Miniconda │ │ │ │ └── Release.html │ │ │ ├── Nginx.html │ │ │ ├── Nginx │ │ │ │ └── Release.html │ │ │ ├── Node.html │ │ │ ├── Node │ │ │ │ ├── Dist.html │ │ │ │ ├── External.html │ │ │ │ ├── Release.html │ │ │ │ └── Version.html │ │ │ ├── Npm.html │ │ │ ├── Npm │ │ │ │ ├── Dist.html │ │ │ │ ├── External.html │ │ │ │ ├── Release.html │ │ │ │ └── Version.html │ │ │ ├── Openresty.html │ │ │ ├── Openresty │ │ │ │ └── Release.html │ │ │ ├── Php.html │ │ │ ├── Php │ │ │ │ └── Release.html │ │ │ ├── Pypi.html │ │ │ ├── Pypi │ │ │ │ ├── External.html │ │ │ │ ├── ExternalRelease.html │ │ │ │ └── Release.html │ │ │ ├── Python.html │ │ │ ├── Python │ │ │ │ └── Release.html │ │ │ ├── R.html │ │ │ ├── R │ │ │ │ └── Release.html │ │ │ ├── Ruby.html │ │ │ ├── Ruby │ │ │ │ └── Release.html │ │ │ ├── Rubygems.html │ │ │ ├── Rubygems │ │ │ │ ├── External.html │ │ │ │ ├── MultiExternal.html │ │ │ │ └── Release.html │ │ │ ├── RubygemsCli.html │ │ │ ├── RubygemsCli │ │ │ │ └── Release.html │ │ │ └── Version.html │ │ ├── SemanticVersion.html │ │ ├── SemanticVersionFilter.html │ │ ├── css │ │ │ └── style.css │ │ ├── index.html │ │ ├── index.json │ │ ├── js │ │ │ └── doc.js │ │ └── search-index.js │ ├── releases.xml │ ├── shard.yml │ ├── spec │ │ ├── depwatcher │ │ │ ├── app_dynamics_agent_spec.cr │ │ │ ├── ca_apm_agent_spec.cr │ │ │ ├── cran_spec.cr │ │ │ ├── dotnet_spec.cr │ │ │ ├── github_releases_spec.cr │ │ │ ├── github_tags_spec.cr │ │ │ ├── go_spec.cr │ │ │ ├── httpclient_mock.cr │ │ │ ├── httpd_spec.cr │ │ │ ├── icu_spec.cr │ │ │ ├── jruby_spec.cr │ │ │ ├── miniconda_spec.cr │ │ │ ├── nginx_spec.cr │ │ │ ├── node_lts_spec.cr │ │ │ ├── node_spec.cr │ │ │ ├── npm_spec.cr │ │ │ ├── openresty_spec.cr │ │ │ ├── php_spec.cr │ │ │ ├── pypi_spec.cr │ │ │ ├── python_spec.cr │ │ │ ├── r_spec.cr │ │ │ ├── ruby_spec.cr │ │ │ ├── rubygems_cli_spec.cr │ │ │ ├── rubygems_spec.cr │ │ │ └── semver_spec.cr │ │ └── fixtures │ │ │ ├── Index of _dist_httpd.html │ │ │ ├── abn_search.json │ │ │ ├── abn_search_0.0.5.json │ │ │ ├── apm_agents.html │ │ │ ├── appd_agent.yml │ │ │ ├── dotnet-2.1_releases.json │ │ │ ├── dotnet-3.0_releases.json │ │ │ ├── dotnet-3.1_releases.json │ │ │ ├── dotnet-releases-index-with-preview.json │ │ │ ├── dotnet-releases-index.json │ │ │ ├── forecast.html │ │ │ ├── gh_composer.json │ │ │ ├── gh_icu.json │ │ │ ├── gh_yarn.json │ │ │ ├── github_nginx.json │ │ │ ├── github_openresty.json │ │ │ ├── github_ruby.json │ │ │ ├── github_tags.json │ │ │ ├── golang.html │ │ │ ├── httpd.sha256 │ │ │ ├── httpd2.html │ │ │ ├── httpd_tags.json │ │ │ ├── jruby.html │ │ │ ├── miniconda.html │ │ │ ├── nginx.html │ │ │ ├── node_dist.html │ │ │ ├── node_lts_releases.json │ │ │ ├── node_shasum256.txt │ │ │ ├── node_v6.1.0.html │ │ │ ├── npm_yarn.json │ │ │ ├── php_downloads.php │ │ │ ├── php_releases.php │ │ │ ├── pip.json │ │ │ ├── plumber.html │ │ │ ├── python-355.html │ │ │ ├── python.html │ │ │ ├── rlang.html │ │ │ ├── rserve.html │ │ │ ├── ruby.html │ │ │ ├── ruby_github_releases.yml │ │ │ ├── ruby_index.txt │ │ │ ├── rubygems.html │ │ │ ├── setuptools.json │ │ │ └── shiny.html │ ├── src │ │ ├── check.cr │ │ ├── depwatcher │ │ │ ├── app_dynamics_agent.cr │ │ │ ├── base.cr │ │ │ ├── ca_apm_agent.cr │ │ │ ├── cran.cr │ │ │ ├── dotnet.cr │ │ │ ├── github_releases.cr │ │ │ ├── github_tags.cr │ │ │ ├── go.cr │ │ │ ├── httpd.cr │ │ │ ├── icu.cr │ │ │ ├── jruby.cr │ │ │ ├── miniconda.cr │ │ │ ├── nginx.cr │ │ │ ├── node.cr │ │ │ ├── node_lts.cr │ │ │ ├── npm.cr │ │ │ ├── openresty.cr │ │ │ ├── php.cr │ │ │ ├── pypi.cr │ │ │ ├── python.cr │ │ │ ├── r.cr │ │ │ ├── ruby.cr │ │ │ ├── rubygems.cr │ │ │ ├── rubygems_cli.cr │ │ │ ├── semver.cr │ │ │ └── version.cr │ │ └── in.cr │ ├── support │ │ └── list-deps.cr │ ├── test.cr │ └── test.sh ├── docker.Dockerfile ├── gcloud.Dockerfile ├── go.Dockerfile ├── minimal.Dockerfile └── test-on-jammy.Dockerfile ├── go.mod ├── go.sum ├── lib ├── aws_assume_role.sh ├── buildpack-binary-checksum-verifier.rb ├── buildpack-dependency.rb ├── buildpacks-ci-configuration.rb ├── buildpacks-ci-pipeline-update-command.rb ├── buildpacks-ci-pipeline-updater.rb ├── commit.rb ├── cve-history.rb ├── git-client.rb ├── release-notes-creator.rb ├── rootfs-cve-feed.rb ├── rootfs-cve-notifier.rb └── usn-release-notes.rb ├── php-releases ├── php-3.json ├── php-4.json ├── php-5.json ├── php-7.json ├── php-8.json └── releases.json ├── pipelines ├── brats.yml.erb ├── buildpack-verification.yml.erb ├── cf-release │ ├── cf-release-config.yml │ └── cf-release.yml ├── cflinuxfs4.yml ├── config │ └── dependency-builds.yml ├── dependency-builds.yml.erb ├── resources.yml └── templates │ └── buildpack.yml.erb ├── public-config.yml ├── scripts ├── bump ├── cf-target ├── check-latest-gem-support.sh ├── deploy-nimbus-worker │ ├── concourse.service.private │ ├── concourse.service.public │ ├── deploy-nimbus-worker.sh │ ├── redo-worker-credential-setup.sh │ └── renew-leases.sh ├── fly-login.sh ├── generate-release-notes-cf-stacks.rb ├── generate-release-notes-cf-stacks.sh ├── get-env-gcp │ ├── task.sh │ └── task.yml ├── php-modules │ ├── .bundle │ │ └── config │ ├── .gitignore │ ├── Gemfile │ ├── Gemfile.lock │ ├── README.md │ ├── bump-versions.rb │ ├── bump-versions.sh │ ├── update-hashes.rb │ ├── update-hashes.sh │ └── update.rb ├── release-notes-for-stacks-and-buildpacks ├── start-docker └── unit-test.sh ├── tasks ├── add-gcp-parent-dns-record │ ├── run.sh │ └── task.yml ├── build-binary-new-cflinuxfs4 │ ├── README.md │ ├── artifact_output.rb │ ├── binary_builder_wrapper.rb │ ├── build.rb │ ├── build.sh │ ├── build.yml │ ├── build_input.rb │ ├── build_output.rb │ ├── builder.rb │ ├── dep_metadata_output.rb │ ├── php_extensions │ │ ├── extensions_helper.rb │ │ ├── php8-base-extensions.yml │ │ ├── php81-extensions-patch.yml │ │ ├── php82-extensions-patch.yml │ │ └── php83-extensions-patch.yml │ └── source_input.rb ├── build-binary-new │ ├── README.md │ ├── artifact_output.rb │ ├── binary_builder_wrapper.rb │ ├── build.rb │ ├── build.yml │ ├── build_input.rb │ ├── build_output.rb │ ├── builder.rb │ ├── dep_metadata_output.rb │ ├── merge-extensions.rb │ ├── php8-base-extensions.yml │ ├── php81-extensions-patch.yml │ ├── php82-extensions-patch.yml │ ├── php83-extensions-patch.yml │ └── source_input.rb ├── build-image │ └── task.yml ├── buildpack-to-master │ ├── buildpack-to-master.rb │ ├── run.rb │ └── task.yml ├── cf-release │ ├── create-buildpack-dev-release │ │ ├── run │ │ └── task.yml │ ├── create-buildpack-release-ops-file │ │ ├── run │ │ └── task.yml │ ├── create-cats-integration-config │ │ ├── run │ │ └── task.yml │ ├── finalize-buildpack-release │ │ ├── run │ │ └── task.yml │ ├── update-buildpack-release-trigger │ │ ├── run │ │ └── task.yml │ ├── upload-bosh-release │ │ ├── run │ │ └── task.yml │ └── write-buildpack-release-trigger-file │ │ ├── run │ │ └── task.yml ├── cf │ ├── create-space │ │ ├── task.sh │ │ └── task.yml │ └── redeploy │ │ ├── operations │ │ ├── add-cflinuxfs3-to-current.yml │ │ ├── cflinuxfs3-rootfs-certs.yml │ │ └── scale-api-and-diego-cells.yml │ │ ├── task.sh │ │ └── task.yml ├── check-for-binary-builder-integration-spec-presence │ ├── run.rb │ └── task.yml ├── check-for-latest-php-module-versions │ └── common.rb ├── check-for-new-rootfs-cves-cflinuxfs4 │ ├── run.rb │ └── task.yml ├── check-for-new-rootfs-cves │ ├── run.rb │ └── task.yml ├── check-for-rootfs-race-condition │ ├── run.sh │ └── task.yml ├── check-php-modules-in-manifest │ └── task.yml ├── check-tag-not-already-added │ ├── run.sh │ └── task.yml ├── configure-pas │ ├── run.sh │ └── task.yml ├── create-bosh-release │ ├── buildpack-bosh-release-updater.rb │ ├── run.rb │ └── task.yml ├── create-bump-buildpacks-opsfile │ ├── run.rb │ └── task.yml ├── create-capi-release-with-rootfs │ ├── run.rb │ └── task.yml ├── create-cf-space-toolsmiths │ ├── run.sh │ └── task.yml ├── create-deployment-source-config │ ├── run.rb │ └── task.yml ├── create-new-version-line-story │ ├── create-new-version-line-story.rb │ ├── create-new-version-line-story.yml │ ├── create_node_lts.rb │ ├── create_node_lts.yml │ └── dispatch.rb ├── create-rootfs-bosh-release-commit │ └── task.yml ├── create-rootfs-bosh-release-github-release-notes │ ├── run.rb │ └── task.yml ├── delete-cf-space │ ├── run.sh │ └── task.yml ├── detect-and-upload │ ├── buildpack-tagger.rb │ ├── run.rb │ └── task.yml ├── finalize-buildpack │ ├── buildpack-finalizer.rb │ ├── run.rb │ └── task.yml ├── generate-buildpacks-json │ ├── run.sh │ └── task.yml ├── generate-dependency-deprecation-github-issue │ ├── go.mod │ ├── go.sum │ ├── main.go │ └── task.yml ├── generate-rootfs-receipt-diff │ ├── run.rb │ └── task.yml ├── generate-rootfs-release-notes │ ├── run.rb │ └── task.yml ├── get-buildpack-github-release-notes │ ├── run.sh │ └── task.yml ├── get-cf-creds │ ├── run.sh │ └── task.yml ├── make-rootfs │ ├── run.sh │ └── task.yml ├── overwrite-rootfs-release │ ├── run.sh │ └── task.yml ├── remove-gcp-parent-dns-record │ ├── run.sh │ └── task.yml ├── rename-rootfs-for-docker │ └── task.yml ├── repackage-dependency │ ├── run.sh │ └── task.yml ├── rootfs │ ├── create-bosh-release-commit │ │ └── task.yml │ ├── create-bosh-release-github-release-notes │ │ ├── run.rb │ │ └── task.yml │ ├── create-release │ │ ├── run.sh │ │ └── task.yml │ ├── rename-for-docker │ │ ├── run.sh │ │ └── task.yml │ ├── run-rootfs-smoke-test │ │ ├── run.sh │ │ └── task.yml │ ├── update-filename │ │ ├── run.sh │ │ └── task.yml │ └── update-receipt │ │ ├── run.sh │ │ └── task.yml ├── run-bp-brats-jammy │ ├── run.sh │ └── task.yml ├── run-bp-brats │ ├── run.sh │ └── task.yml ├── run-buildpack-integration-specs │ ├── run.sh │ └── task.yml ├── run-buildpack-unit-specs │ ├── run.sh │ └── task.yml ├── run-rootfs-smoke-test │ ├── run.sh │ └── task.yml ├── set-status-success │ ├── run.rb │ └── task.yml ├── set-test-configuration │ ├── main.go │ ├── run.sh │ └── task.yml ├── update-buildpack-dependency │ ├── dependencies.rb │ ├── php_manifest.rb │ ├── run.rb │ └── task.yml ├── update-compile-extensions │ ├── run.sh │ └── task.yml ├── update-gem-in-gemfile │ ├── run.sh │ └── task.yml ├── update-libbuildpack │ ├── run.sh │ └── task.yml ├── update-rootfs-filename │ ├── run.sh │ └── task.yml ├── update-rootfs-receipt │ ├── run.sh │ └── task.yml ├── upload-bosh-release │ ├── run.sh │ └── task.yml ├── use-new-buildpack-bosh-releases │ ├── run.sh │ └── task.yml ├── verify-buildpack-binaries │ ├── run.rb │ └── task.yml └── write-cats-config │ ├── run.rb │ └── task.yml ├── util ├── docker.sh └── print.sh └── vendor ├── code.cloudfoundry.org └── lager │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── json_redacter.go │ ├── logger.go │ ├── models.go │ ├── package.go │ ├── reconfigurable_sink.go │ ├── redacting_sink.go │ └── writer_sink.go ├── github.com ├── BurntSushi │ └── toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── COMPATIBLE │ │ ├── COPYING │ │ ├── Makefile │ │ ├── README.md │ │ ├── decode.go │ │ ├── decode_meta.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encoding_types.go │ │ ├── encoding_types_1.1.go │ │ ├── lex.go │ │ ├── parse.go │ │ ├── session.vim │ │ ├── type_check.go │ │ └── type_fields.go ├── Masterminds │ └── semver │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE.txt │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── collection.go │ │ ├── constraints.go │ │ ├── doc.go │ │ ├── version.go │ │ └── version_fuzz.go ├── blang │ └── semver │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── json.go │ │ ├── package.json │ │ ├── range.go │ │ ├── semver.go │ │ ├── sort.go │ │ └── sql.go ├── buildpack │ └── libbuildpack │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── application │ │ └── application.go │ │ ├── internal │ │ ├── arguments.go │ │ ├── directory_contents.go │ │ ├── file_exists.go │ │ ├── have_content.go │ │ ├── protect_env.go │ │ ├── replace_args.go │ │ ├── replace_console.go │ │ ├── replace_env.go │ │ ├── replace_working_directory.go │ │ ├── scratch_dir.go │ │ ├── touch_test_file.go │ │ ├── write_file.go │ │ ├── write_test_file.go │ │ └── write_toml_file.go │ │ └── logger │ │ └── logger.go ├── cloudfoundry │ ├── dagger │ │ ├── LICENSE │ │ ├── NOTICE │ │ ├── README.md │ │ ├── app.go │ │ ├── buildpack.go │ │ ├── config.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── pack.go │ │ └── utils │ │ │ └── utils.go │ ├── libcfbuildpack │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── helper │ │ │ ├── application_routes.go │ │ │ ├── copy_directory.go │ │ │ ├── copy_file.go │ │ │ ├── copy_symlink.go │ │ │ ├── extract_tar.go │ │ │ ├── extract_tar_gz.go │ │ │ ├── extract_tar_xz.go │ │ │ ├── extract_zip.go │ │ │ ├── file_exists.go │ │ │ ├── find_files.go │ │ │ ├── find_main_module.go │ │ │ ├── find_service_credentials.go │ │ │ ├── handle_tar.go │ │ │ ├── has_file.go │ │ │ ├── java_version.go │ │ │ ├── read_buildpack_yaml.go │ │ │ ├── stripped_path.go │ │ │ ├── write_file.go │ │ │ ├── write_file_from_reader.go │ │ │ └── write_symlink.go │ └── packit │ │ ├── executable.go │ │ ├── go.mod │ │ └── go.sum ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go ├── golang │ └── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ └── proto │ │ ├── clone.go │ │ ├── decode.go │ │ ├── deprecated.go │ │ ├── discard.go │ │ ├── encode.go │ │ ├── equal.go │ │ ├── extensions.go │ │ ├── lib.go │ │ ├── message_set.go │ │ ├── pointer_reflect.go │ │ ├── pointer_unsafe.go │ │ ├── properties.go │ │ ├── table_marshal.go │ │ ├── table_merge.go │ │ ├── table_unmarshal.go │ │ ├── text.go │ │ └── text_parser.go ├── google │ ├── go-github │ │ ├── AUTHORS │ │ ├── LICENSE │ │ └── github │ │ │ ├── activity.go │ │ │ ├── activity_events.go │ │ │ ├── activity_notifications.go │ │ │ ├── activity_star.go │ │ │ ├── activity_watching.go │ │ │ ├── admin.go │ │ │ ├── admin_stats.go │ │ │ ├── apps.go │ │ │ ├── apps_installation.go │ │ │ ├── apps_marketplace.go │ │ │ ├── authorizations.go │ │ │ ├── checks.go │ │ │ ├── doc.go │ │ │ ├── event_types.go │ │ │ ├── gists.go │ │ │ ├── gists_comments.go │ │ │ ├── git.go │ │ │ ├── git_blobs.go │ │ │ ├── git_commits.go │ │ │ ├── git_refs.go │ │ │ ├── git_tags.go │ │ │ ├── git_trees.go │ │ │ ├── github-accessors.go │ │ │ ├── github.go │ │ │ ├── gitignore.go │ │ │ ├── issues.go │ │ │ ├── issues_assignees.go │ │ │ ├── issues_comments.go │ │ │ ├── issues_events.go │ │ │ ├── issues_labels.go │ │ │ ├── issues_milestones.go │ │ │ ├── issues_timeline.go │ │ │ ├── licenses.go │ │ │ ├── messages.go │ │ │ ├── migrations.go │ │ │ ├── migrations_source_import.go │ │ │ ├── migrations_user.go │ │ │ ├── misc.go │ │ │ ├── orgs.go │ │ │ ├── orgs_hooks.go │ │ │ ├── orgs_members.go │ │ │ ├── orgs_outside_collaborators.go │ │ │ ├── orgs_projects.go │ │ │ ├── orgs_users_blocking.go │ │ │ ├── projects.go │ │ │ ├── pulls.go │ │ │ ├── pulls_comments.go │ │ │ ├── pulls_reviewers.go │ │ │ ├── pulls_reviews.go │ │ │ ├── reactions.go │ │ │ ├── repos.go │ │ │ ├── repos_collaborators.go │ │ │ ├── repos_comments.go │ │ │ ├── repos_commits.go │ │ │ ├── repos_community_health.go │ │ │ ├── repos_contents.go │ │ │ ├── repos_deployments.go │ │ │ ├── repos_forks.go │ │ │ ├── repos_hooks.go │ │ │ ├── repos_invitations.go │ │ │ ├── repos_keys.go │ │ │ ├── repos_merging.go │ │ │ ├── repos_pages.go │ │ │ ├── repos_prereceive_hooks.go │ │ │ ├── repos_projects.go │ │ │ ├── repos_releases.go │ │ │ ├── repos_stats.go │ │ │ ├── repos_statuses.go │ │ │ ├── repos_traffic.go │ │ │ ├── search.go │ │ │ ├── strings.go │ │ │ ├── teams.go │ │ │ ├── teams_discussion_comments.go │ │ │ ├── teams_discussions.go │ │ │ ├── teams_members.go │ │ │ ├── timestamp.go │ │ │ ├── users.go │ │ │ ├── users_administration.go │ │ │ ├── users_blocking.go │ │ │ ├── users_emails.go │ │ │ ├── users_followers.go │ │ │ ├── users_gpg_keys.go │ │ │ ├── users_keys.go │ │ │ ├── with_appengine.go │ │ │ └── without_appengine.go │ └── go-querystring │ │ ├── LICENSE │ │ └── query │ │ └── encode.go ├── mitchellh │ └── mapstructure │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── error.go │ │ ├── go.mod │ │ └── mapstructure.go ├── onsi │ └── gomega │ │ ├── LICENSE │ │ └── types │ │ └── types.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ └── stack.go ├── pmezard │ └── go-difflib │ │ ├── LICENSE │ │ └── difflib │ │ └── difflib.go ├── sclevine │ └── spec │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── options.go │ │ ├── parser.go │ │ ├── report │ │ ├── log.go │ │ └── terminal.go │ │ └── spec.go ├── stretchr │ └── testify │ │ ├── LICENSE │ │ ├── assert │ │ ├── assertion_format.go │ │ ├── assertion_format.go.tmpl │ │ ├── assertion_forward.go │ │ ├── assertion_forward.go.tmpl │ │ ├── assertion_order.go │ │ ├── assertions.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── forward_assertions.go │ │ └── http_assertions.go │ │ └── require │ │ ├── doc.go │ │ ├── forward_requirements.go │ │ ├── require.go │ │ ├── require.go.tmpl │ │ ├── require_forward.go │ │ ├── require_forward.go.tmpl │ │ └── requirements.go └── xi2 │ └── xz │ ├── AUTHORS │ ├── LICENSE │ ├── README.md │ ├── dec_bcj.go │ ├── dec_delta.go │ ├── dec_lzma2.go │ ├── dec_stream.go │ ├── dec_util.go │ ├── dec_xz.go │ ├── doc.go │ └── reader.go ├── golang.org └── x │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ └── context │ │ ├── context.go │ │ ├── ctxhttp │ │ └── ctxhttp.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ └── oauth2 │ ├── .travis.yml │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── internal │ ├── client_appengine.go │ ├── doc.go │ ├── oauth2.go │ ├── token.go │ └── transport.go │ ├── oauth2.go │ ├── token.go │ └── transport.go ├── google.golang.org └── appengine │ ├── LICENSE │ ├── internal │ ├── api.go │ ├── api_classic.go │ ├── api_common.go │ ├── app_id.go │ ├── base │ │ ├── api_base.pb.go │ │ └── api_base.proto │ ├── datastore │ │ ├── datastore_v3.pb.go │ │ └── datastore_v3.proto │ ├── identity.go │ ├── identity_classic.go │ ├── identity_flex.go │ ├── identity_vm.go │ ├── internal.go │ ├── log │ │ ├── log_service.pb.go │ │ └── log_service.proto │ ├── main.go │ ├── main_common.go │ ├── main_vm.go │ ├── metadata.go │ ├── net.go │ ├── regen.sh │ ├── remote_api │ │ ├── remote_api.pb.go │ │ └── remote_api.proto │ ├── transaction.go │ └── urlfetch │ │ ├── urlfetch_service.pb.go │ │ └── urlfetch_service.proto │ └── urlfetch │ └── urlfetch.go ├── gopkg.in └── yaml.v2 │ ├── .travis.yml │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── go.mod │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── modules.txt /.github/workflows/build-buildpacks-ci-image.yml: -------------------------------------------------------------------------------- 1 | name: Build buildpacks-ci docker image 2 | 3 | on: 4 | workflow_dispatch: { } 5 | schedule: 6 | - cron: "0 1 * * 4" 7 | push: 8 | branches: [ master ] 9 | paths: [ Dockerfile, config/**, build/** , Gemfile, Gemfile.lock ] 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | 17 | - name: Set up QEMU 18 | uses: docker/setup-qemu-action@v2 19 | 20 | - name: Set up Docker Buildx 21 | uses: docker/setup-buildx-action@v2 22 | 23 | - name: Login to DockerHub 24 | uses: docker/login-action@v2 25 | with: 26 | username: ${{ secrets.CF_BUILDPACKS_DOCKERHUB_USERNAME }} 27 | password: ${{ secrets.CF_BUILDPACKS_DOCKERHUB_TOKEN }} 28 | 29 | - name: Get current date 30 | id: get-date 31 | run: echo "::set-output name=date::$(date +'%Y.%m.%d')" 32 | 33 | - name: Build and push 34 | uses: docker/build-push-action@v3 35 | with: 36 | push: true 37 | tags: cfbuildpacks/ci:latest, cfbuildpacks/ci:${{ steps.get-date.outputs.date }} 38 | -------------------------------------------------------------------------------- /.github/workflows/build-cflinuxfs3-dev-image.yml: -------------------------------------------------------------------------------- 1 | name: Build cflinuxfs3-dev docker image 2 | 3 | on: 4 | workflow_dispatch: { } 5 | schedule: 6 | - cron: "0 1 * * 1" 7 | push: 8 | branches: [ master ] 9 | paths: [ dockerfiles/cflinuxfs3-dev.Dockerfile ] 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v3 16 | 17 | - name: Set up QEMU 18 | uses: docker/setup-qemu-action@v2 19 | 20 | - name: Set up Docker Buildx 21 | uses: docker/setup-buildx-action@v2 22 | 23 | - name: Login to DockerHub 24 | uses: docker/login-action@v2 25 | with: 26 | username: ${{ secrets.CF_BUILDPACKS_DOCKERHUB_USERNAME }} 27 | password: ${{ secrets.CF_BUILDPACKS_DOCKERHUB_TOKEN }} 28 | 29 | - name: Build and push 30 | uses: docker/build-push-action@v4 31 | with: 32 | context: . 33 | push: true 34 | tags: cfbuildpacks/cflinuxfs3-dev 35 | file: dockerfiles/cflinuxfs3-dev.Dockerfile 36 | -------------------------------------------------------------------------------- /.github/workflows/get-all-php-releases.yml: -------------------------------------------------------------------------------- 1 | name: Get PHP Releases 2 | on: 3 | workflow_dispatch: { } 4 | schedule: 5 | - cron: 0 * * * * 6 | 7 | jobs: 8 | get-new-versions: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Check out code 12 | uses: actions/checkout@v2 13 | 14 | - name: Get PHP Versions 15 | run: | 16 | curl --silent --show-error --fail https://www.php.net/releases/index.php?json --http2 | jq . > "php-releases/releases.json" 17 | 18 | - name: Commit 19 | id: commit 20 | uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main 21 | with: 22 | message: "Update PHP releases" 23 | pathspec: "php-releases/releases.json" 24 | committer_name: "Cloud Foundry Buildpacks Team Robot" 25 | committer_email: "tanzu-buildpacks.pdl@broadcom.com" 26 | 27 | - name: Push Branch 28 | if: ${{ steps.commit.outputs.commit_sha != '' }} 29 | uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main 30 | with: 31 | branch: master 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .bundle/ 3 | .binstubs/ 4 | private.yml 5 | .vagrant/ 6 | .rspec 7 | rspec.failures 8 | tags 9 | deployments/concourse-gcp/manifest.yml 10 | deployments/concourse-gcp/cloud.yml 11 | deployments/concourse-gcp/bosh-init/bosh.yml 12 | deployments/concourse-gcp-terraform/concourse.tf 13 | deployments/concourse-gcp-terraform/terraform.tfstate 14 | deployments/concourse-gcp-terraform/terraform.tfstate.backup 15 | **cves.json 16 | .vscode/ 17 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | # This is the configuration used to check the rubocop source code. 2 | 3 | AllCops: 4 | Exclude: 5 | - 'vendor/**/*' 6 | - 'spec/fixtures/**/*' 7 | - 'bin/**/*' 8 | 9 | Style/Encoding: 10 | Enabled: true 11 | 12 | Metrics/LineLength: 13 | Enabled: false 14 | 15 | require: rubocop-rspec 16 | 17 | RSpec/FilePath: 18 | Enabled: false 19 | 20 | Performance/RedundantMatch: 21 | Enabled: false 22 | 23 | Style/FrozenStringLiteralComment: 24 | Enabled: false 25 | 26 | AllCops: 27 | TargetRubyVersion: 2.3 28 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.6 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | source 'https://rubygems.org' 4 | 5 | ruby '~> 2.3' 6 | 7 | gem 'bump', '= 0.5.3' 8 | gem 'diffy' 9 | gem 'git' 10 | gem 'nokogiri' 11 | gem 'octokit' 12 | gem 'open4' 13 | gem 'open_uri_redirections' 14 | gem 'phantomjs' 15 | gem 'pry' 16 | gem 'rake' 17 | gem 'rspec' 18 | gem 'rspec-rerun' 19 | gem 'toml' 20 | gem 'tomlrb' 21 | gem 'rubyzip', require: 'zip' 22 | 23 | group :development do 24 | gem 'rubocop' 25 | gem 'rubocop-rspec' 26 | gem 'version_sorter' 27 | end 28 | 29 | group :test do 30 | gem 'webmock' 31 | end 32 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | buildpacks-ci 2 | 3 | Copyright (c) 2013-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Rakefile 2 | require 'rspec-rerun/tasks' 3 | task default: 'rspec-rerun:spec' 4 | -------------------------------------------------------------------------------- /bin/update-pipelines: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | MY_DIR="$(cd "$(dirname "$0")" && pwd)" 6 | REPO_ROOT="$(cd "${MY_DIR}/.." && pwd)" 7 | target="buildpacks" 8 | team="main" 9 | filter= 10 | 11 | login() { 12 | fly -t "$target" login -n "${team}" -b 13 | } 14 | 15 | check_login_status() { 16 | current_team="$(yq e .targets.buildpacks.team ~/.flyrc)" 17 | if [[ "${current_team}" != "${team}" ]]; then 18 | login 19 | fi 20 | 21 | fly -t "$target" status >/dev/null 2>&1 || login 22 | } 23 | 24 | set_pipelines() { 25 | for pipeline_dir in "$REPO_ROOT"/pipelines/*; do 26 | pipeline_name="$(basename "${pipeline_dir%.yml}")" 27 | if [[ $filter != "" ]] && [[ ! $pipeline_name =~ $filter ]]; then 28 | continue 29 | fi 30 | 31 | echo "Setting $pipeline_name" 32 | pipeline_config="$(ytt -f "$pipeline_dir")" 33 | fly -t "$target" set-pipeline -p "$pipeline_name" -c <(echo "$pipeline_config") 34 | done 35 | } 36 | 37 | main() { 38 | if [ "$#" -eq 1 ]; then 39 | filter="$1" 40 | fi 41 | 42 | check_login_status 43 | set_pipelines 44 | 45 | "${MY_DIR}/update-pipelines-erb" 46 | } 47 | 48 | main "$@" 49 | -------------------------------------------------------------------------------- /bin/update-pipelines-erb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | 4 | require_relative '../lib/buildpacks-ci-pipeline-updater' 5 | 6 | BuildpacksCIPipelineUpdater.new.run!(ARGV) 7 | -------------------------------------------------------------------------------- /config/buildpack/apt.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/binary.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/dotnet-core.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/go.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/hwc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/nginx.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/nodejs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/php.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/python.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/r.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry/buildpacks-ci/6ab2e9d0330aa19530ae7f16b409b87600dd3670/config/buildpack/r.yml -------------------------------------------------------------------------------- /config/buildpack/ruby.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /config/buildpack/staticfile.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /deployments/edge-shared/num-cells.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /instance_groups/name=diego-cell/instances 4 | value: 5 5 | -------------------------------------------------------------------------------- /deployments/edge-shared/uaa-lockout.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /instance_groups/name=uaa/jobs/name=uaa/properties/authentication?/- 4 | value: 5 | policy: 6 | countFailuresWithinSeconds: 1 7 | global: 8 | countFailuresWithinSeconds: 1 9 | lockoutAfterFailures: 100 10 | lockoutPeriodSeconds: 1 11 | lockoutAfterFailures: 100 12 | lockoutPeriodSeconds: 1 13 | -------------------------------------------------------------------------------- /deployments/edge-shared/use-latest-linux-stemcell.yml: -------------------------------------------------------------------------------- 1 | - path: /stemcells/alias=default/version 2 | type: replace 3 | value: latest 4 | -------------------------------------------------------------------------------- /deployments/edge-shared/use-latest-windows-stemcell.yml: -------------------------------------------------------------------------------- 1 | - path: /stemcells/alias=windows2012R2/version 2 | type: replace 3 | value: latest 4 | -------------------------------------------------------------------------------- /deployments/operations/add-windows-binary-buildpacks.yml: -------------------------------------------------------------------------------- 1 | - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/- 2 | type: replace 3 | value: 4 | name: binary_buildpack 5 | package: binary-buildpack-windows2012R2 6 | - path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks/- 7 | type: replace 8 | value: 9 | name: binary_buildpack 10 | package: binary-buildpack-windows2016 11 | -------------------------------------------------------------------------------- /deployments/operations/cflinuxfs3-rootfs-certs-as-list.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs3-rootfs-setup/properties/cflinuxfs3-rootfs/trusted_certs 4 | value: 5 | - ((application_ca.certificate)) 6 | - ((credhub_ca.certificate)) 7 | - ((uaa_ca.certificate)) -------------------------------------------------------------------------------- /deployments/operations/cflinuxfs3.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /releases/name=cflinuxfs3? 4 | value: 5 | name: cflinuxfs3 6 | version: latest 7 | - type: replace 8 | path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/stacks/- 9 | value: 10 | name: cflinuxfs3 11 | description: Cloud Foundry Linux-based filesystem (Ubuntu 18.04) 12 | - type: replace 13 | path: /instance_groups/name=diego-cell/jobs/name=rep/properties/diego/rep/preloaded_rootfses/- 14 | value: cflinuxfs3:/var/vcap/packages/cflinuxfs3/rootfs.tar 15 | -------------------------------------------------------------------------------- /deployments/operations/do-not-pre-install-buildpacks.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: remove 3 | path: /instance_groups/name=api/jobs/name=cloud_controller_ng/properties/cc/install_buildpacks 4 | -------------------------------------------------------------------------------- /deployments/operations/no-canaries.yml: -------------------------------------------------------------------------------- 1 | - path: /update/canaries 2 | type: replace 3 | value: 0 4 | - path: /update/max_in_flight 5 | type: replace 6 | value: 100 7 | -------------------------------------------------------------------------------- /deployments/operations/set-nats-instance-group.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /addons/name=metrics-discovery-registrar? 3 | value: 4 | name: metrics-discovery-registrar 5 | exclude: 6 | jobs: 7 | - name: smoke_tests 8 | release: cf-smoke-tests 9 | include: 10 | stemcell: 11 | - os: ubuntu-xenial 12 | - os: ubuntu-bionic 13 | - os: ubuntu-jammy 14 | jobs: 15 | - name: metrics-discovery-registrar 16 | properties: 17 | metrics: 18 | ca_cert: "((metrics_discovery_metrics_tls.ca))" 19 | cert: "((metrics_discovery_metrics_tls.certificate))" 20 | key: "((metrics_discovery_metrics_tls.private_key))" 21 | server_name: metrics_discovery_metrics 22 | nats_client: 23 | cert: "((nats_client_cert.certificate))" 24 | key: "((nats_client_cert.private_key))" 25 | nats_instance_group: nats 26 | release: metrics-discovery 27 | -------------------------------------------------------------------------------- /deployments/operations/substitute-with-cflinuxfs4-trusted-certs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # This removes cflinuxfs3's job and add cflinuxfs4's job 3 | # because as of date cf-deployment.yml ships with cflinuxfs3's jobs 4 | - type: remove 5 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs3-rootfs-setup 6 | - type: replace 7 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs4-rootfs-setup?/release 8 | value: cflinuxfs4 9 | - type: replace 10 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs4-rootfs-setup?/properties/cflinuxfs4-rootfs/trusted_certs 11 | value: 12 | - ((application_ca.certificate)) 13 | - ((credhub_ca.certificate)) 14 | - ((uaa_ca.certificate)) 15 | -------------------------------------------------------------------------------- /deployments/operations/use-garden-runc-1-20.7.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Remove this file once garden-runc 1.20.7 is live on cf-deployment main 3 | # Because we need https://github.com/cloudfoundry/garden-runc-release/pull/229 4 | - type: replace 5 | path: /releases/name=garden-runc 6 | value: 7 | name: garden-runc 8 | url: https://bosh.io/d/github.com/cloudfoundry/garden-runc-release?v=1.20.7 9 | sha1: 59eaee8f0d40125b08047a0905567e9b8e6d736c 10 | version: 1.20.7 11 | -------------------------------------------------------------------------------- /deployments/operations/use-latest-garden-windows.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /releases/name=garden-windows 3 | value: 4 | name: garden-windows 5 | sha1: 3ff39712bce41e34ea10cb94562121386a8c6d76 6 | url: https://github.com/cloudfoundry-incubator/garden-windows-bosh-release/releases/download/v0.10.0/garden-windows-0.10.0.tgz 7 | version: 0.10.0 8 | -------------------------------------------------------------------------------- /deployments/operations/use-xenial-stemcell.yml: -------------------------------------------------------------------------------- 1 | - path: /stemcells/alias=default 2 | type: replace 3 | value: 4 | alias: default 5 | os: ubuntu-xenial 6 | version: latest 7 | -------------------------------------------------------------------------------- /deployments/patches/create-director-override.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bosh create-env \ 3 | "${BBL_STATE_DIR}/bosh-deployment/bosh.yml" \ 4 | --state "${BBL_STATE_DIR}/vars/bosh-state.json" \ 5 | --vars-store "${BBL_STATE_DIR}/vars/director-vars-store.yml" \ 6 | --vars-file "${BBL_STATE_DIR}/vars/director-vars-file.yml" \ 7 | -o "${BBL_STATE_DIR}/bosh-deployment/gcp/cpi.yml" \ 8 | -o "${BBL_STATE_DIR}/bosh-deployment/jumpbox-user.yml" \ 9 | -o "${BBL_STATE_DIR}/bosh-deployment/uaa.yml" \ 10 | -o "${BBL_STATE_DIR}/bosh-deployment/credhub.yml" \ 11 | -o ./large-director.yml \ 12 | -o "${BBL_STATE_DIR}/bbl-ops-files/gcp/bosh-director-ephemeral-ip-ops.yml" \ 13 | --var-file gcp_credentials_json="${BBL_GCP_SERVICE_ACCOUNT_KEY_PATH}" \ 14 | -v project_id="${BBL_GCP_PROJECT_ID}" \ 15 | -v zone="${BBL_GCP_ZONE}" 16 | -------------------------------------------------------------------------------- /deployments/patches/large-director.yml: -------------------------------------------------------------------------------- 1 | - type: replace 2 | path: /resource_pools/name=vms/cloud_properties/machine_type 3 | value: n1-standard-4 4 | -------------------------------------------------------------------------------- /dockerfiles/README.md: -------------------------------------------------------------------------------- 1 | # CI Images 2 | 3 | - `test-on-jammy.Dockerfile` 4 | This image is used as a CI image for running integration, brats, and 5 | unit tests. For example, we are using this image in the PHP buildpack 6 | pipeline. 7 | -------------------------------------------------------------------------------- /dockerfiles/cflinuxfs3-dev.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cloudfoundry/cflinuxfs3 2 | 3 | # Note: If this list starts to get long, we should consider using an external file to store the list of packages to remove. 4 | 5 | # Remove packages that are installed with an ESM version that is not compatible with some compilation processes for dependencies. 6 | RUN apt update && apt remove -y \ 7 | libonig4 \ 8 | libwebp6 \ 9 | libsnmp-dev 10 | -------------------------------------------------------------------------------- /dockerfiles/cron-resource/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:slim 2 | 3 | RUN gem install parse-cron activesupport 4 | 5 | # Copy in resources 6 | ENV TMPDIR /tmp 7 | RUN mkdir -p /opt/resource/ 8 | COPY check in /opt/resource/ 9 | 10 | -------------------------------------------------------------------------------- /dockerfiles/cron-resource/README.md: -------------------------------------------------------------------------------- 1 | # Building/Pushing 2 | 3 | docker build -t cfbuildpacks/cron-resource . 4 | docker push cfbuildpacks/cron-resource 5 | -------------------------------------------------------------------------------- /dockerfiles/cron-resource/check: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'parse-cron' 4 | require 'json' 5 | require 'active_support/core_ext/time/zones' 6 | 7 | payload = JSON.parse(STDIN.read) 8 | 9 | expression = payload.dig('source', 'expression') 10 | location = payload.dig('source', 'location') || 'UTC' 11 | ENV['TZ'] = location 12 | 13 | zone = ActiveSupport::TimeZone.find_tzinfo(location) 14 | cron_parser = CronParser.new(expression) 15 | ref = cron_parser.last(zone.now) 16 | 17 | puts [ { ref: ref } ].to_json 18 | -------------------------------------------------------------------------------- /dockerfiles/cron-resource/in: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'json' 3 | 4 | payload = JSON.parse(STDIN.read) 5 | 6 | ref = payload.dig('version', 'ref') 7 | puts({ version: { ref: ref} }.to_json) 8 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/.gitignore: -------------------------------------------------------------------------------- 1 | /.shards/ 2 | /shard.lock 3 | /lib/ 4 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM crystallang/crystal:0.32.1 2 | 3 | ADD . /src 4 | WORKDIR /src 5 | RUN shards && crystal spec --no-debug 6 | RUN shards build --production 7 | 8 | FROM ubuntu:bionic 9 | 10 | RUN \ 11 | apt-get update && \ 12 | apt-get install -y apt-transport-https libxml2-dev libevent-2.1-6 libyaml-dev ca-certificates && \ 13 | apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 14 | 15 | COPY --from=0 /src/bin/check /opt/resource/check 16 | COPY --from=0 /src/bin/in /opt/resource/in 17 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/shard.yml: -------------------------------------------------------------------------------- 1 | name: depwatcher 2 | version: 0.1.0 3 | 4 | authors: 5 | - Dave Goddard 6 | 7 | targets: 8 | check: 9 | main: src/check.cr 10 | in: 11 | main: src/in.cr 12 | 13 | crystal: 0.32.1 14 | 15 | license: MIT 16 | 17 | dependencies: 18 | spec2: 19 | github: waterlink/spec2.cr 20 | version: ~> 0.11 21 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/ca_apm_agent_spec.cr: -------------------------------------------------------------------------------- 1 | require "spec2" 2 | require "./httpclient_mock" 3 | require "../../src/depwatcher/ca_apm_agent" 4 | 5 | Spec2.describe Depwatcher::CaApmAgent do 6 | let(client) { HTTPClientMock.new } 7 | subject { described_class.new.tap { |s| s.client = client } } 8 | before do 9 | client.stub_get("https://packages.broadcom.com/artifactory/apm-agents/", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/apm_agents.html"))) 10 | client.stub_get("https://packages.broadcom.com/artifactory/apm-agents/CA-APM-PHPAgent-10.6.0_linux.tar.gz", nil, HTTP::Client::Response.new(200, "hello")) 11 | end 12 | 13 | describe "#check" do 14 | it "returns real releases sorted" do 15 | expect(subject.check.map(&.ref)).to eq ["10.6.0", "10.7.0"] 16 | end 17 | end 18 | 19 | describe "#in" do 20 | it "returns real releases sorted" do 21 | obj = subject.in("10.6.0") 22 | expect(obj.ref).to eq "10.6.0" 23 | expect(obj.url).to eq "https://packages.broadcom.com/artifactory/apm-agents/CA-APM-PHPAgent-10.6.0_linux.tar.gz" 24 | expect(obj.sha256).to eq "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/httpclient_mock.cr: -------------------------------------------------------------------------------- 1 | require "../../src/depwatcher/base" 2 | 3 | class HTTPClientMock < Depwatcher::HTTPClient 4 | @stubs = Hash(Tuple(String, HTTP::Headers?), HTTP::Client::Response).new 5 | 6 | def get(url, headers : HTTP::Headers? = nil) : HTTP::Client::Response 7 | @stubs[{url, headers}] || raise "url (#{url}) with headers (#{headers}) was not stubbed" 8 | end 9 | 10 | def stub_get(url, headers, res) 11 | @stubs[{url, headers}] = res 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/npm_spec.cr: -------------------------------------------------------------------------------- 1 | require "spec2" 2 | require "./httpclient_mock" 3 | require "../../src/depwatcher/npm" 4 | 5 | Spec2.describe Depwatcher::Npm do 6 | let(client) { HTTPClientMock.new } 7 | subject { described_class.new.tap { |s| s.client = client } } 8 | before do 9 | client.stub_get("https://registry.npmjs.com/yarn/", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/npm_yarn.json"))) 10 | end 11 | 12 | describe "#check" do 13 | it "returns real releases sorted" do 14 | expect(subject.check("yarn").map(&.ref)).to eq [ 15 | "1.0.2", "1.1.0", "1.2.0", "1.2.1", "1.3.1", "1.3.2", "1.4.0", "1.5.0", "1.5.1", "1.6.0" 16 | ] 17 | end 18 | end 19 | 20 | describe "#in" do 21 | it "returns real releases sorted" do 22 | obj = subject.in("yarn", "1.2.1") 23 | expect(obj.ref).to eq "1.2.1" 24 | expect(obj.url).to eq "https://registry.npmjs.org/yarn/-/yarn-1.2.1.tgz" 25 | expect(obj.sha1).to eq "0d628dc01438881a1663a6f83cbf7ac5db7a75fc" 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/r_spec.cr: -------------------------------------------------------------------------------- 1 | require "spec2" 2 | require "./httpclient_mock" 3 | require "../../src/depwatcher/r" 4 | 5 | Spec2.describe Depwatcher::R do 6 | let(client) { HTTPClientMock.new } 7 | subject { described_class.new.tap { |s| s.client = client } } 8 | before do 9 | client.stub_get("https://cran.r-project.org/src/base/R-4/", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/rlang.html"))) 10 | client.stub_get("https://cran.r-project.org/src/base/R-3/R-3.3.2.tar.gz", nil, HTTP::Client::Response.new(200, "hello")) 11 | end 12 | 13 | describe "#check" do 14 | it "returns real releases sorted" do 15 | expect(subject.check.map(&.ref)).to eq [ 16 | "4.0.0", "4.0.1", "4.0.2", "4.0.3", "4.0.4", "4.0.5", "4.1.0" 17 | ] 18 | end 19 | end 20 | 21 | describe "#in" do 22 | it "returns real releases sorted" do 23 | obj = subject.in("3.3.2") 24 | expect(obj.ref).to eq "3.3.2" 25 | expect(obj.url).to eq "https://cran.r-project.org/src/base/R-3/R-3.3.2.tar.gz" 26 | expect(obj.sha256).to eq "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824" 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/rubygems_cli_spec.cr: -------------------------------------------------------------------------------- 1 | require "spec2" 2 | require "./httpclient_mock" 3 | require "../../src/depwatcher/rubygems_cli" 4 | 5 | Spec2.describe Depwatcher::RubygemsCli do 6 | let(client) { HTTPClientMock.new } 7 | subject { described_class.new.tap { |s| s.client = client } } 8 | before do 9 | client.stub_get("https://rubygems.org/pages/download", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/rubygems.html"))) 10 | end 11 | 12 | describe "#check" do 13 | it "returns real releases sorted" do 14 | expect(subject.check.map(&.ref)).to eq ["2.7.6"] 15 | end 16 | end 17 | 18 | describe "#in" do 19 | it "returns real releases sorted" do 20 | obj = subject.in("2.7.6") 21 | expect(obj.ref).to eq "2.7.6" 22 | expect(obj.url).to eq "https://rubygems.org/rubygems/rubygems-2.7.6.tgz" 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/depwatcher/rubygems_spec.cr: -------------------------------------------------------------------------------- 1 | require "spec2" 2 | require "./httpclient_mock" 3 | require "../../src/depwatcher/rubygems" 4 | 5 | Spec2.describe Depwatcher::Rubygems do 6 | let(client) { HTTPClientMock.new } 7 | subject { described_class.new.tap { |s| s.client = client } } 8 | before do 9 | client.stub_get("https://rubygems.org/api/v1/versions/abn_search.json", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/abn_search.json"))) 10 | client.stub_get("https://rubygems.org/api/v2/rubygems/abn_search/versions/0.0.5.json", nil, HTTP::Client::Response.new(200, File.read(__DIR__+"/../fixtures/abn_search_0.0.5.json"))) 11 | end 12 | 13 | describe "#check" do 14 | it "returns real releases sorted" do 15 | expect(subject.check("abn_search").map(&.ref)).to eq [ 16 | "0.0.1", "0.0.2", "0.0.3", "0.0.5", "0.0.6", "0.0.7", "0.0.9" 17 | ] 18 | end 19 | end 20 | 21 | describe "#in" do 22 | it "returns real releases sorted" do 23 | obj = subject.in("abn_search", "0.0.5") 24 | expect(obj.ref).to eq "0.0.5" 25 | expect(obj.sha256).to eq "17ab70feebc0a0265d102665b5dd66189eeab6d7aa3b3090cb04dfae87834c9b" 26 | end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/fixtures/appd_agent.yml: -------------------------------------------------------------------------------- 1 | 1.1.1_2: https://download.run.pivotal.io/appdynamics-php/appdynamics-1.1.1-2.tar.bz2 2 | 1.1.1_3: https://download.run.pivotal.io/appdynamics-php/appdynamics-1.1.1-3.tar.bz2 3 | 2.1.1_1: https://download.run.pivotal.io/appdynamics-php/appdynamics-2.1.1-1.tar.bz2 4 | 3.1.1_14: https://download.run.pivotal.io/appdynamics-php/appdynamics-3.1.1-14.tar.bz2 5 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/spec/fixtures/httpd.sha256: -------------------------------------------------------------------------------- 1 | 777753a5a25568a2a27428b2214980564bc1c38c1abf9ccc7630b639991f7f00 *httpd-2.4.29.tar.bz2 2 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/icu.cr: -------------------------------------------------------------------------------- 1 | require "./github_releases.cr" 2 | 3 | module Depwatcher 4 | class Icu < GithubReleases 5 | class GithubRelease 6 | JSON.mapping( 7 | tag_name: String, 8 | draft: Bool, 9 | prerelease: Bool, 10 | assets: Array(GithubAsset), 11 | ) 12 | 13 | def ref 14 | version = tag_name.gsub(/^release-/, "").gsub(/-/, ".") 15 | if version =~ /^\d+\.\d+$/ 16 | version += ".0" 17 | end 18 | version 19 | end 20 | end 21 | 22 | def check() : Array(Internal) 23 | repo = "unicode-org/icu" 24 | allow_prerelease = false 25 | super(repo, allow_prerelease) 26 | end 27 | 28 | 29 | def in(ref : String, dir : String) : Release 30 | repo = "unicode-org/icu" 31 | ext = "-src.tgz" 32 | super(repo, ext, ref, dir) 33 | end 34 | 35 | private def releases(repo : String) : Array(GithubRelease) 36 | res = client.get("https://api.github.com/repos/#{repo}/releases").body 37 | Array(GithubRelease).from_json(res) 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/nginx.cr: -------------------------------------------------------------------------------- 1 | require "./base" 2 | require "./github_tags" 3 | require "xml" 4 | 5 | module Depwatcher 6 | class Nginx < Base 7 | class Release 8 | JSON.mapping( 9 | ref: String, 10 | url: String, 11 | pgp: String, 12 | sha256: String 13 | ) 14 | def initialize(@ref : String, @url : String, @pgp : String, @sha256 : String) 15 | end 16 | end 17 | 18 | def check() : Array(Internal) 19 | name = "nginx/nginx" 20 | regexp = "^release\-\\d+\.\\d+\.\\d+$" 21 | GithubTags.new(client).matched_tags(name, regexp).map do |r| 22 | Internal.new(r.name.gsub(/^release\-/, "")) 23 | end.sort_by { |i| Semver.new(i.ref) } 24 | end 25 | 26 | def in(ref : String) : Release 27 | url = "http://nginx.org/download/nginx-#{ref}.tar.gz" 28 | Release.new(ref, url, "http://nginx.org/download/nginx-#{ref}.tar.gz.asc", get_sha256(url)) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/openresty.cr: -------------------------------------------------------------------------------- 1 | require "./base" 2 | require "./github_releases" 3 | require "xml" 4 | 5 | module Depwatcher 6 | class Openresty < Base 7 | class Release 8 | JSON.mapping( 9 | ref: String, 10 | url: String, 11 | pgp: String, 12 | sha256: String 13 | ) 14 | def initialize(@ref : String, @url : String, @pgp : String, @sha256 : String) 15 | end 16 | end 17 | 18 | def check() : Array(Internal) 19 | name = "openresty/openresty" 20 | regexp = "\\d+\.\\d+\.\\d+\.\\d+$" 21 | GithubReleases.new(client).matched_releases(name, regexp).map do |r| 22 | Internal.new(r.ref.gsub(/^v/, "")) 23 | end.sort_by { |i| Semver.new(i.ref) } 24 | end 25 | 26 | def in(ref : String) : Release 27 | url = "http://openresty.org/download/openresty-#{ref}.tar.gz" 28 | Release.new(ref, url, "http://openresty.org/download/openresty-#{ref}.tar.gz.asc", get_sha256(url)) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/r.cr: -------------------------------------------------------------------------------- 1 | require "./base" 2 | require "./semver" 3 | require "xml" 4 | 5 | module Depwatcher 6 | class R < Base 7 | class Release 8 | JSON.mapping( 9 | ref: String, 10 | url: String, 11 | sha256: String 12 | ) 13 | def initialize(@ref : String, @url : String, @sha256 : String) 14 | end 15 | end 16 | 17 | def check() : Array(Internal) 18 | response = client.get("https://cran.r-project.org/src/base/R-4/").body 19 | doc = XML.parse_html(response) 20 | lis = doc.xpath("//td/a") 21 | raise "Could not parse r svn website" unless lis.is_a?(XML::NodeSet) 22 | 23 | lis.map do |a| 24 | href = a["href"].to_s 25 | m = href.match(/^R\-([\d\.]+)\.tar.gz/) 26 | version = m[1] if m 27 | Internal.new(version) if version 28 | end.compact.sort_by { |i| Semver.new(i.ref) }.last(10) 29 | end 30 | 31 | def in(ref : String) : Release 32 | major = ref.split(".")[0] 33 | url = "https://cran.r-project.org/src/base/R-#{major}/R-#{ref}.tar.gz" 34 | Release.new(ref, url, get_sha256(url)) 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/rubygems_cli.cr: -------------------------------------------------------------------------------- 1 | require "./base" 2 | require "xml" 3 | 4 | module Depwatcher 5 | class RubygemsCli < Base 6 | class Release 7 | JSON.mapping( 8 | ref: String, 9 | url: String, 10 | ) 11 | def initialize(@ref : String, @url : String) 12 | end 13 | end 14 | 15 | def check() : Array(Internal) 16 | response = client.get("https://rubygems.org/pages/download").body 17 | doc = XML.parse_html(response) 18 | links = doc.xpath("//div[@id='formats']//a[text()='tgz']") 19 | raise "Could not parse rubygems download website" unless links.is_a?(XML::NodeSet) 20 | links.map do |a| 21 | v = a["href"].gsub(/.*\/rubygems\-(.*)\.tgz$/, "\\1") 22 | Internal.new(v) 23 | end 24 | end 25 | 26 | def in(ref : String) : Release 27 | return Release.new(ref, "https://rubygems.org/rubygems/rubygems-#{ref}.tgz") 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/src/depwatcher/version.cr: -------------------------------------------------------------------------------- 1 | module Depwatcher 2 | VERSION = "0.2.0" 3 | end 4 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/support/list-deps.cr: -------------------------------------------------------------------------------- 1 | unless ARGV.size > 0 2 | puts " Missing executable file argument" 3 | puts " Usage (in a Dockerfile)" 4 | puts " RUN crystal run ./path/to/list-deps.cr -- ./bin/executable" 5 | exit 1 6 | end 7 | 8 | executable = File.expand_path(ARGV[0]) 9 | 10 | unless File.exists?(executable) 11 | puts " Unable to find #{executable}" 12 | exit 1 13 | end 14 | 15 | puts " Extracting libraries for #{executable} ..." 16 | 17 | deps = [] of String 18 | output = `ldd #{executable}`.scan(/(\/.*)\s\(/) do |m| 19 | library = m[1] 20 | deps << library 21 | 22 | real_lib = File.real_path(library) 23 | deps << real_lib if real_lib != library 24 | end 25 | 26 | puts " Generating Dockerfile" 27 | puts 28 | puts "=" * 30 29 | puts "FROM scratch" 30 | deps.each do |dep| 31 | puts "COPY --from=0 #{dep} #{dep}" 32 | end 33 | puts "COPY --from=0 #{executable} /#{File.basename(executable)}" 34 | puts "ENTRYPOINT [\"/#{File.basename(executable)}\"]" 35 | puts "=" * 30 36 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/test.cr: -------------------------------------------------------------------------------- 1 | require "http/client" 2 | require "xml" 3 | 4 | response = HTTP::Client.get("https://www.ruby-lang.org/en/downloads/").body 5 | doc = XML.parse_html(response.body) 6 | lis = doc.xpath("//li/a[starts-with(text(),'Ruby ')]") 7 | raise "Could not parse ruby website" unless lis.is_a?(XML::NodeSet) 8 | 9 | lis = lis.map do |a| 10 | parent = a.parent 11 | Tuple.new(a.text.gsub(/^Ruby /, ""), a["href"], parent.is_a?(XML::Node) ? parent.text : "") 12 | end 13 | lis = lis.map do |(version, url, text)| 14 | m = /sha256: ([0-9a-f]+)/.match(text) 15 | sha = m[1] if m 16 | [ version, url, m[1] ] if m 17 | end 18 | lis.compact! 19 | 20 | puts lis 21 | -------------------------------------------------------------------------------- /dockerfiles/depwatcher/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # shellcheck disable=SC2046 4 | docker run -it -v $(pwd):/app -w /app crystallang/crystal:0.32.1 bash -c 'shards install && crystal spec --no-debug' 5 | -------------------------------------------------------------------------------- /dockerfiles/docker.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cfbuildpacks/feature-eng-ci:minimal 2 | 3 | RUN apt-get -qqy update \ 4 | && apt-get -qqy install \ 5 | apt-transport-https \ 6 | ca-certificates \ 7 | gnupg-agent \ 8 | software-properties-common \ 9 | && apt-get -qqy clean \ 10 | && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ 11 | && add-apt-repository \ 12 | "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ 13 | && apt-get -qqy install \ 14 | docker-ce \ 15 | docker-ce-cli \ 16 | containerd.io \ 17 | iproute2 \ 18 | && apt-get -qqy clean 19 | -------------------------------------------------------------------------------- /dockerfiles/gcloud.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cfbuildpacks/feature-eng-ci:minimal 2 | 3 | # Add the Cloud SDK distribution URI as a package source 4 | RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ 5 | && curl --silent https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \ 6 | && apt-get -qqy update \ 7 | && apt-get -qqy install \ 8 | google-cloud-sdk \ 9 | && apt-get clean 10 | -------------------------------------------------------------------------------- /dockerfiles/go.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cfbuildpacks/feature-eng-ci:minimal 2 | 3 | RUN \ 4 | apt-get -qqy update \ 5 | && apt-get -qqy install --fix-missing \ 6 | runit \ 7 | && apt-get -qqy clean 8 | 9 | RUN mkdir -p /home/testuser \ 10 | && groupadd -r testuser -g 433 \ 11 | && useradd -u 431 -r -g testuser \ 12 | -d /home/testuser \ 13 | -s /usr/sbin/nologin \ 14 | -c "Docker image test user" \ 15 | testuser 16 | 17 | ARG GO_VERSION=1.20 18 | RUN curl "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \ 19 | --silent \ 20 | --location \ 21 | --output "/usr/local/go${GO_VERSION}.tar.gz" \ 22 | && tar xzf "/usr/local/go${GO_VERSION}.tar.gz" -C /usr/local \ 23 | && rm "/usr/local/go${GO_VERSION}.tar.gz" 24 | 25 | ENV PATH="/usr/local/go/bin:${PATH}" 26 | -------------------------------------------------------------------------------- /dockerfiles/minimal.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:bionic 2 | 3 | RUN \ 4 | apt-get update && \ 5 | apt-get -qqy install --fix-missing \ 6 | build-essential \ 7 | curl \ 8 | gnupg \ 9 | vim \ 10 | git \ 11 | && \ 12 | apt-get clean 13 | 14 | # install jq 15 | ARG JQ_VERSION=1.6 16 | RUN curl "https://github.com/stedolan/jq/releases/download/jq-$JQ_VERSION/jq-linux64" \ 17 | --silent \ 18 | --location \ 19 | --output /usr/local/bin/jq \ 20 | && chmod +x /usr/local/bin/jq 21 | -------------------------------------------------------------------------------- /lib/buildpack-dependency.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | require 'open-uri' 3 | require 'yaml' 4 | 5 | class BuildpackDependency 6 | BUILDPACKS = %i(apt binary dotnet-core go hwc nodejs php python ruby staticfile).freeze 7 | 8 | def self.for(dependency) 9 | buildpack_manifests.map do |name, manifest| 10 | if manifest['dependencies'].detect { |d| d['name'] == dependency.to_s } 11 | name 12 | end 13 | end.compact 14 | end 15 | 16 | private 17 | 18 | def self.buildpack_manifests 19 | @buildpack_manifests ||= BUILDPACKS.map do |name| 20 | [name, YAML.load(open("https://raw.githubusercontent.com/cloudfoundry/#{name}-buildpack/develop/manifest.yml"))] 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /lib/buildpacks-ci-configuration.rb: -------------------------------------------------------------------------------- 1 | class BuildpacksCIConfiguration 2 | def organization 3 | YAML.load_file('public-config.yml')['buildpacks-github-org'] 4 | end 5 | 6 | def run_oracle_php_tests? 7 | YAML.load_file('public-config.yml')['run-oracle-php-tests'] 8 | end 9 | 10 | def concourse_target_name 11 | ENV.fetch('CONCOURSE_TARGET_NAME', 'buildpacks') 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/cve-history.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | require 'yaml' 3 | require_relative 'git-client' 4 | 5 | class CVEHistory 6 | attr_accessor :cves_dir 7 | 8 | def self.read_yaml_cves(cves_dir, yaml_filename) 9 | file_path = File.join(cves_dir, yaml_filename) 10 | 11 | if File.exist? file_path 12 | YAML.load_file("#{cves_dir}/#{yaml_filename}") || [] 13 | else 14 | File.open(file_path, 'w') { |handle| handle.write([].to_yaml) } 15 | [] 16 | end 17 | end 18 | 19 | def self.write_yaml_cves(cve_list, cves_dir, yaml_filename) 20 | raise 'received invalid CVE list to write' unless cve_list.is_a?(Array) 21 | raise "file '#{cves_dir}/#{yaml_filename}' not found" unless File.exist?(File.join(cves_dir, yaml_filename)) 22 | File.open(File.join(cves_dir, yaml_filename), 'w') { |handle| handle.write(cve_list.to_yaml) } 23 | 24 | Dir.chdir(cves_dir) do 25 | GitClient.add_everything 26 | GitClient.safe_commit("CVE update for #{yaml_filename}") 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /php-releases/php-3.json: -------------------------------------------------------------------------------- 1 | { 2 | "3.0.x (latest)": { 3 | "date": "20 Oct 2000", 4 | "source": [ 5 | { 6 | "filename": "php-3.0.18.tar.gz", 7 | "name": "PHP 3.0.18 Source Code", 8 | "md5": "b4b8f7f1151ce66d5f3910a066651133" 9 | } 10 | ], 11 | "windows": [ 12 | { 13 | "filename": "php-3.0.17-win32.zip", 14 | "name": "PHP 3.0.17 Windows binary", 15 | "md5": "29029ac1c3c2075dce38bbd804c42f72" 16 | } 17 | ], 18 | "museum": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /scripts/bump: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | 4 | require 'tempfile' 5 | require_relative '../lib/commit' 6 | 7 | old_version = File.open('VERSION', 'r') { |f| f.readline.chomp } 8 | 9 | version_parts = old_version.match(/(\d+\.\d+\.)(\d+)/) 10 | new_version = version_parts[1] + (version_parts[2].to_i + 1).to_s 11 | 12 | File.open('VERSION', 'w') { |f| f.write new_version } 13 | 14 | new_changelog = Tempfile.new('CHANGELOG') 15 | begin 16 | heading = "v#{new_version} #{Time.now.strftime('%b %d, %Y')}\n" 17 | new_changelog.write heading 18 | new_changelog.write '=' * heading.length 19 | new_changelog.write "\n\n" 20 | 21 | commits = Commit.recent(old_version) rescue nil 22 | if commits 23 | commits.each do |commit| 24 | new_changelog.write commit.to_s 25 | new_changelog.write "\n\n" 26 | end 27 | else 28 | log = `git log v#{old_version}..HEAD` 29 | new_changelog.write log 30 | end 31 | 32 | new_changelog.write "\n" 33 | 34 | File.open('CHANGELOG', 'a+').each { |line| new_changelog.write line } 35 | ensure 36 | new_changelog.close 37 | end 38 | 39 | `cp #{new_changelog.path} CHANGELOG` 40 | 41 | puts "Bumped to #{`cat VERSION`}" 42 | -------------------------------------------------------------------------------- /scripts/deploy-nimbus-worker/concourse.service.private: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Concourse Worker 3 | [Service] 4 | ExecStart=/usr/local/bin/concourse worker \ 5 | --tag nimbus-worker \ 6 | --tag buildpacks-private-ci-shared-vsphere \ 7 | --tag "environments.toolsmiths.cf-app.com-shared-vsphere-worker" \ 8 | --work-dir /opt/concourse/worker \ 9 | --tsa-host buildpacks-private.ci.cf-app.com:2222 \ 10 | --tsa-public-key /home/worker/host.pub \ 11 | --tsa-worker-private-key /home/worker/worker.pem \ 12 | --garden-config /home/worker/config.ini \ 13 | --name nimbus-worker-datetime 14 | Restart=on-abort 15 | Type=idle 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /scripts/deploy-nimbus-worker/concourse.service.public: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Concourse Worker 3 | [Service] 4 | ExecStart=/usr/local/bin/concourse worker \ 5 | --tag nimbus-worker \ 6 | --tag buildpacks-eng-vsphere \ 7 | --tag buildpacks-eng-shared-vsphere \ 8 | --tag "environments.toolsmiths.cf-app.com-shared-vsphere-worker" \ 9 | --work-dir /opt/concourse/worker \ 10 | --tsa-host buildpacks.ci.cf-app.com:2222 \ 11 | --tsa-public-key /home/worker/host.pub \ 12 | --tsa-worker-private-key /home/worker/worker.pem \ 13 | --garden-config /home/worker/config.ini \ 14 | --name nimbus-worker-datetime 15 | Restart=on-abort 16 | Type=idle 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /scripts/fly-login.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | if ! fly -t buildpacks status; then 8 | if [[ $# != 2 ]] || [[ "$1" == "" ]] || [[ "$2" == "" ]]; then 9 | fly -t buildpacks login -c https://buildpacks.ci.cf-app.com -b 10 | else 11 | fly -t buildpacks login -c https://buildpacks.ci.cf-app.com -u "$1" -p "$2" 12 | fi 13 | fi 14 | 15 | fly -t buildpacks sync 16 | -------------------------------------------------------------------------------- /scripts/get-env-gcp/task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | set -o pipefail 5 | 6 | function main(){ 7 | local env_name 8 | 9 | if [[ -z "${ENV_NAME}" ]]; then 10 | env_name=$(curl -s -XPOST "https://environments.toolsmiths.cf-app.com/pooled_gcp_engineering_environments/claim?api_token=${TOOLSMITHS_API_TOKEN}&pool_name=cf-deployment" | jq -r .name) 11 | else 12 | env_name="${ENV_NAME}" 13 | fi 14 | 15 | curl -s -XGET \ 16 | "https://environments.toolsmiths.cf-app.com/pooled_gcp_engineering_environments/claim?api_token=${TOOLSMITHS_API_TOKEN}&environment_name=$env_name" \ 17 | > "metadata/$env_name.json" 18 | 19 | echo "${env_name}" > metadata/name 20 | } 21 | 22 | main 23 | -------------------------------------------------------------------------------- /scripts/get-env-gcp/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: cfbuildpacks/feature-eng-ci 8 | tag: cf 9 | 10 | inputs: 11 | - name: script 12 | 13 | outputs: 14 | - name: metadata 15 | 16 | params: 17 | TOOLSMITHS_API_TOKEN: 18 | ENV_NAME: 19 | 20 | run: 21 | path: script/task.sh 22 | -------------------------------------------------------------------------------- /scripts/php-modules/.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_PATH: "vendor/bundle" 3 | -------------------------------------------------------------------------------- /scripts/php-modules/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | !.bundle/ 3 | -------------------------------------------------------------------------------- /scripts/php-modules/Gemfile: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | source 'https://rubygems.org' 3 | 4 | gem 'mini_portile', git: 'https://github.com/cf-buildpacks-eng/mini_portile' 5 | gem 'open-uri' 6 | gem 'nokogiri' 7 | gem 'pry' 8 | -------------------------------------------------------------------------------- /scripts/php-modules/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/cf-buildpacks-eng/mini_portile 3 | revision: fddb4245149a746794dfc183653c5e664814d1c1 4 | specs: 5 | mini_portile (0.7.0.rc4) 6 | 7 | GEM 8 | remote: https://rubygems.org/ 9 | specs: 10 | coderay (1.1.3) 11 | method_source (1.0.0) 12 | mini_portile2 (2.6.1) 13 | nokogiri (1.12.5) 14 | mini_portile2 (~> 2.6.1) 15 | racc (~> 1.4) 16 | open-uri (0.1.0) 17 | pry (0.14.1) 18 | coderay (~> 1.1) 19 | method_source (~> 1.0) 20 | racc (1.5.2) 21 | 22 | PLATFORMS 23 | ruby 24 | 25 | DEPENDENCIES 26 | mini_portile! 27 | nokogiri 28 | open-uri 29 | pry 30 | 31 | BUNDLED WITH 32 | 2.2.29 33 | -------------------------------------------------------------------------------- /scripts/php-modules/bump-versions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cd "$(dirname "$0")" 6 | 7 | bundle install 8 | bundle exec ruby bump-versions.rb 9 | -------------------------------------------------------------------------------- /scripts/php-modules/update-hashes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | cd "$(dirname "$0")" 6 | 7 | bundle install 8 | bundle exec ruby update-hashes.rb 9 | -------------------------------------------------------------------------------- /scripts/php-modules/update.rb: -------------------------------------------------------------------------------- 1 | require 'yaml' 2 | 3 | def process_extension_file(cache, data, ext_file, dependency_type, f) 4 | (data.dig(*dependency_type) || []).each do |dependency| 5 | unless (dependency['name'] == 'oci8' && ext_file.include?('php8-base-extensions.yml')) || dependency['name'] == 'rabbitmq' 6 | f.call(dependency, cache) 7 | end 8 | end 9 | end 10 | 11 | def update_modules(&f) 12 | cache = {} 13 | %w[php8-base-extensions.yml php81-extensions-patch.yml php82-extensions-patch.yml php83-extensions-patch.yml].each do |ext_file| 14 | path = File.expand_path("../../tasks/build-binary-new/#{ext_file}") 15 | 16 | puts "==> Processing: #{path}" 17 | data = YAML.load_file(path) 18 | 19 | extensions = ['extensions'] 20 | native_modules = ['native_modules'] 21 | 22 | if File.basename(path).include? 'patch' 23 | extensions = extensions.append('additions') 24 | native_modules = native_modules.append('additions') 25 | end 26 | 27 | process_extension_file(cache, data, ext_file, extensions, f) 28 | process_extension_file(cache, data, ext_file, native_modules, f) 29 | 30 | File.write(path, data.to_yaml) 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /scripts/unit-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | cd "$( dirname "${BASH_SOURCE[0]}" )/.." 5 | 6 | bundle exec rspec --tag ~fly 7 | pushd dockerfiles/depwatcher 8 | shards 9 | crystal spec --no-debug 10 | popd 11 | 12 | go test -v ./... 13 | 14 | # Clean up directories 15 | rm -rf source-*-latest 16 | -------------------------------------------------------------------------------- /tasks/add-gcp-parent-dns-record/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "$GCP_SERVICE_ACCOUNT_KEY" > /tmp/gcp_key 4 | 5 | set -o errexit 6 | set -o nounset 7 | set -o pipefail 8 | set -o xtrace 9 | 10 | ENV_NAME=${ENV_NAME:-} 11 | ZONE_NAME="${ENV_NAME}"-zone 12 | DNS_NAME="${ENV_NAME}.buildpacks-gcp.ci.cf-app.com." 13 | 14 | gcloud auth activate-service-account --key-file /tmp/gcp_key 15 | 16 | gcloud config set project cf-buildpacks 17 | 18 | 19 | if [ "${DNS_NAME}" != "$(gcloud dns record-sets list --zone=buildpacks --type=NS --name="${DNS_NAME}" --format="value(name)")" ] ; then 20 | NAMESERVERS=$(gcloud dns managed-zones describe "${ZONE_NAME}" --format='value[delimiter=" 21 | "](nameServers)') 22 | 23 | gcloud dns record-sets transaction start --zone=buildpacks 24 | 25 | # shellcheck disable=SC2086 26 | gcloud dns record-sets transaction add ${NAMESERVERS} --name "${DNS_NAME}" --ttl=300 --type=NS --zone=buildpacks 27 | 28 | gcloud dns record-sets transaction execute --zone=buildpacks 29 | fi 30 | 31 | -------------------------------------------------------------------------------- /tasks/add-gcp-parent-dns-record/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: 7 | repository: cfbuildpacks/ci 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | 11 | inputs: 12 | - name: buildpacks-ci 13 | 14 | run: 15 | path: buildpacks-ci/tasks/add-gcp-parent-dns-record/run.sh 16 | 17 | params: 18 | ENV_NAME: 19 | GCP_SERVICE_ACCOUNT_KEY: 20 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/README.md: -------------------------------------------------------------------------------- 1 | # Build-binary-new 2 | 3 | ## Summary 4 | 5 | This directory is the task needed for the 6 | [dependency-builds](https://github.com/cloudfoundry/buildpacks-ci/blob/master/pipelines/config/dependency-builds.yml) 7 | pipeline. The code here contains all of the dependency-specific logic that is 8 | needed to compile dependencies. 9 | 10 | ## Usage 11 | 12 | The dependency-builds pipeline utilizes this code through the [build.yml 13 | file](https://github.com/cloudfoundry/buildpacks-ci/blob/master/tasks/build-binary-new/build.yml). 14 | 15 | Dependency-specific code lives inside of the [builder.rb 16 | file](https://github.com/cloudfoundry/buildpacks-ci/blob/master/tasks/build-binary-new/builder.rb). 17 | It functions as a giant switch statement, with a case for each dependency. This 18 | file needs to get updated when a new dependency is added. 19 | 20 | In some of the case, the compilation code calls out to 21 | [binary-builder](https://github.com/cloudfoundry/binary-builder). 22 | 23 | ## Other files of interest 24 | 25 | This directory contains a number of other files as well: 26 | 27 | * PHP extension yamls: each version line of PHP has it's own list of related 28 | extensions that we compile 29 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/artifact_output.rb: -------------------------------------------------------------------------------- 1 | require 'digest' 2 | 3 | class ArtifactOutput 4 | attr_reader :base_dir 5 | 6 | def initialize(base_dir = 'artifacts') 7 | @base_dir = base_dir 8 | end 9 | 10 | def move_dependency(name, old_file_path, filename_prefix) 11 | content = File.open(old_file_path).read 12 | sha = Digest::SHA2.new(256).hexdigest(content) 13 | filename = "#{filename_prefix}_#{sha[0..7]}.#{ext(old_file_path)}" 14 | FileUtils.mv(old_file_path, File.join(@base_dir, filename)) 15 | { 16 | sha256: sha, 17 | url: "https://buildpacks.cloudfoundry.org/dependencies/#{name}/#{filename}" 18 | } 19 | end 20 | 21 | private 22 | 23 | def ext(old_file_path) 24 | extension = File.basename(old_file_path)[/\.((sh|txt|phar|zip|tar\.gz|tar\.xz|tar\.bz2|tgz))$/, 1] 25 | extension = 'tgz' if extension == 'tar.gz' 26 | extension 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/binary_builder_wrapper.rb: -------------------------------------------------------------------------------- 1 | class BinaryBuilderWrapper 2 | attr_reader :base_dir 3 | 4 | def initialize(runner, base_dir = File.join('binary-builder', 'cflinuxfs4')) 5 | @runner = runner 6 | @base_dir = base_dir 7 | end 8 | 9 | def build(source_input, extension_file = nil) 10 | digest_arg = if source_input.md5? 11 | "--md5=#{source_input.md5}" 12 | else 13 | "--sha256=#{source_input.sha256}" 14 | end 15 | 16 | version_prefix = (%w[dep glide godep].include? source_input.name) ? 'v' : '' 17 | 18 | Dir.chdir(@base_dir) do 19 | if extension_file && extension_file != '' 20 | @runner.run('./bin/binary-builder', "--name=#{source_input.name}", "--version=#{version_prefix}#{source_input.version}", digest_arg, extension_file) 21 | else 22 | @runner.run('./bin/binary-builder', "--name=#{source_input.name}", "--version=#{version_prefix}#{source_input.version}", digest_arg) 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -euo pipefail 3 | 4 | if ! command -v ruby &> /dev/null; then 5 | echo "[task] Installing ruby..." 6 | apt update 7 | apt install -y ruby 8 | fi 9 | 10 | echo "[task] Running builder.rb..." 11 | ruby buildpacks-ci/tasks/build-binary-new-cflinuxfs4/build.rb 12 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cloudfoundry/cflinuxfs4 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: binary-builder 11 | - name: buildpacks-ci 12 | - name: source 13 | - name: builds 14 | optional: true 15 | - name: source-forecast-latest 16 | optional: true 17 | - name: source-rserve-latest 18 | optional: true 19 | - name: source-plumber-latest 20 | optional: true 21 | - name: source-shiny-latest 22 | optional: true 23 | outputs: 24 | - name: artifacts 25 | - name: builds-artifacts 26 | - name: dep-metadata 27 | run: 28 | path: buildpacks-ci/tasks/build-binary-new-cflinuxfs4/build.sh 29 | params: 30 | STACK: 31 | SKIP_COMMIT: 32 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/build_input.rb: -------------------------------------------------------------------------------- 1 | class BuildInput 2 | attr_reader :url 3 | 4 | def initialize(url = nil) 5 | @url = url 6 | end 7 | 8 | def self.from_file(build_file) 9 | data = JSON.parse(File.open(build_file).read) 10 | BuildInput.new( 11 | data['url'] 12 | ) 13 | end 14 | 15 | def copy_to_build_output 16 | system('rsync -a builds/ builds-artifacts/') or raise('Could not copy builds to builds artifacts') 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/build_output.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'fileutils' 3 | 4 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 5 | require_relative "#{buildpacks_ci_dir}/lib/git-client" 6 | 7 | class BuildOutput 8 | attr_reader :git_client, :base_dir 9 | 10 | def initialize(name, git_client = GitClient, base_dir = 'builds-artifacts') 11 | @name = name 12 | @git_client = git_client 13 | @base_dir = File.join(base_dir, 'binary-builds-new', name) 14 | FileUtils.mkdir_p(@base_dir) 15 | end 16 | 17 | def add_output(file, data) 18 | Dir.chdir(@base_dir) do 19 | File.write(file, data.to_json) 20 | @git_client.add_file(file) 21 | end 22 | end 23 | 24 | def commit_outputs(msg) 25 | Dir.chdir(@base_dir) do 26 | @git_client.set_global_config('user.email', 'cf-buildpacks-eng@pivotal.io') 27 | @git_client.set_global_config('user.name', 'CF Buildpacks Team CI Server') 28 | @git_client.safe_commit(msg) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/dep_metadata_output.rb: -------------------------------------------------------------------------------- 1 | require 'digest' 2 | 3 | class DepMetadataOutput 4 | attr_reader :base_dir 5 | 6 | def initialize(base_dir = 'dep-metadata') 7 | @base_dir = base_dir 8 | end 9 | 10 | def write_metadata(dep_filename, data) 11 | dep_basename = File.basename(dep_filename) 12 | metadata_filename = "#{dep_basename}_metadata.json" 13 | File.write(File.join(@base_dir, metadata_filename), data.to_json) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/php_extensions/php81-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | additions: 5 | - name: oci8 6 | version: 3.2.1 7 | md5: 309190ef3ede2779a617c9375d32ea7a 8 | klass: OraclePeclRecipe 9 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/php_extensions/php82-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | - name: yaf 5 | version: 3.3.5 6 | md5: 128ecf6c84dd71d59c12d826cc51f0c4 7 | klass: PeclRecipe 8 | additions: 9 | - name: oci8 10 | version: 3.3.0 11 | md5: bbbbb26f1791d1f27ffc05289abee2f3 12 | klass: OraclePeclRecipe 13 | -------------------------------------------------------------------------------- /tasks/build-binary-new-cflinuxfs4/php_extensions/php83-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | - name: yaf 5 | version: 3.3.5 6 | md5: 128ecf6c84dd71d59c12d826cc51f0c4 7 | klass: PeclRecipe 8 | additions: 9 | -------------------------------------------------------------------------------- /tasks/build-binary-new/README.md: -------------------------------------------------------------------------------- 1 | # Build-binary-new 2 | 3 | ## Summary 4 | 5 | This directory is the task needed for the 6 | [dependency-builds](https://github.com/cloudfoundry/buildpacks-ci/blob/master/pipelines/config/dependency-builds.yml) 7 | pipeline. The code here contains all of the dependency-specific logic that is 8 | needed to compile dependencies. 9 | 10 | ## Usage 11 | 12 | The dependency-builds pipeline utilizes this code through the [build.yml 13 | file](https://github.com/cloudfoundry/buildpacks-ci/blob/master/tasks/build-binary-new/build.yml). 14 | 15 | Dependency-specific code lives inside of the [builder.rb 16 | file](https://github.com/cloudfoundry/buildpacks-ci/blob/master/tasks/build-binary-new/builder.rb). 17 | It functions as a giant switch statement, with a case for each dependency. This 18 | file needs to get updated when a new dependency is added. 19 | 20 | In some of the case, the compilation code calls out to 21 | [binary-builder](https://github.com/cloudfoundry/binary-builder). 22 | 23 | ## Other files of interest 24 | 25 | This directory contains a number of other files as well: 26 | 27 | * PHP extension yamls: each version line of PHP has it's own list of related 28 | extensions that we compile 29 | 30 | -------------------------------------------------------------------------------- /tasks/build-binary-new/artifact_output.rb: -------------------------------------------------------------------------------- 1 | require 'digest' 2 | 3 | class ArtifactOutput 4 | attr_reader :base_dir 5 | 6 | def initialize(base_dir = 'artifacts') 7 | @base_dir = base_dir 8 | end 9 | 10 | def move_dependency(name, old_file_path, filename_prefix) 11 | sha = Digest::SHA256.hexdigest(open(old_file_path).read) 12 | filename = "#{filename_prefix}_#{sha[0..7]}.#{ext(old_file_path)}" 13 | FileUtils.mv(old_file_path, File.join(@base_dir, filename)) 14 | { 15 | sha256: sha, 16 | url: "https://buildpacks.cloudfoundry.org/dependencies/#{name}/#{filename}" 17 | } 18 | end 19 | 20 | private 21 | 22 | def ext(old_file_path) 23 | extension = File.basename(old_file_path)[/\.((sh|txt|phar|zip|tar\.gz|tar\.xz|tar\.bz2|tgz))$/, 1] 24 | extension = "tgz" if extension == "tar.gz" 25 | extension 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /tasks/build-binary-new/binary_builder_wrapper.rb: -------------------------------------------------------------------------------- 1 | class BinaryBuilderWrapper 2 | attr_reader :base_dir 3 | 4 | def initialize(runner, base_dir = 'binary-builder') 5 | @runner = runner 6 | @base_dir = base_dir 7 | end 8 | 9 | def build(source_input, extension_file = nil) 10 | digest_arg = if source_input.md5? 11 | "--md5=#{source_input.md5}" 12 | else 13 | "--sha256=#{source_input.sha256}" 14 | end 15 | 16 | version_prefix = (%w[dep glide godep].include? source_input.name) ? 'v' : '' 17 | 18 | Dir.chdir(@base_dir) do 19 | if extension_file && extension_file != '' 20 | @runner.run('./bin/binary-builder', "--name=#{source_input.name}", "--version=#{version_prefix}#{source_input.version}", digest_arg, extension_file) 21 | else 22 | @runner.run('./bin/binary-builder', "--name=#{source_input.name}", "--version=#{version_prefix}#{source_input.version}", digest_arg) 23 | end 24 | end 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /tasks/build-binary-new/build.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative 'builder' 3 | require_relative 'binary_builder_wrapper' 4 | require_relative 'source_input' 5 | require_relative 'build_input' 6 | require_relative 'build_output' 7 | require_relative 'artifact_output' 8 | require_relative 'dep_metadata_output' 9 | 10 | include Runner 11 | include Sha 12 | include DependencyBuild 13 | 14 | def main 15 | binary_builder = BinaryBuilderWrapper.new(Runner) 16 | source_input = SourceInput.from_file('source/data.json') 17 | stack = ENV['STACK'] 18 | skip_commit = ENV['SKIP_COMMIT'] == 'true' 19 | build_input = skip_commit ? BuildInput.new(nil, nil) : BuildInput.from_file("source/data.json") 20 | build_output = BuildOutput.new(source_input.name) 21 | artifact_output = ArtifactOutput.new(File.join(Dir.pwd, 'artifacts')) 22 | dep_metadata_output = DepMetadataOutput.new(File.join(Dir.pwd, 'dep-metadata')) 23 | out_data = Builder.new.execute( 24 | binary_builder, 25 | stack, 26 | source_input, 27 | build_input, 28 | build_output, 29 | artifact_output, 30 | dep_metadata_output, 31 | __dir__, 32 | skip_commit 33 | ) 34 | p out_data 35 | end 36 | 37 | main 38 | -------------------------------------------------------------------------------- /tasks/build-binary-new/build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cloudfoundry/cflinuxfs3 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: binary-builder 11 | - name: buildpacks-ci 12 | - name: source 13 | - name: builds 14 | optional: true 15 | - name: source-forecast-latest 16 | optional: true 17 | - name: source-rserve-latest 18 | optional: true 19 | - name: source-plumber-latest 20 | optional: true 21 | - name: source-shiny-latest 22 | optional: true 23 | outputs: 24 | - name: artifacts 25 | - name: builds-artifacts 26 | - name: dep-metadata 27 | run: 28 | path: bash 29 | args: 30 | - -cl 31 | - buildpacks-ci/tasks/build-binary-new/build.rb 32 | params: 33 | STACK: 34 | SKIP_COMMIT: 35 | -------------------------------------------------------------------------------- /tasks/build-binary-new/build_input.rb: -------------------------------------------------------------------------------- 1 | class BuildInput 2 | attr_reader :url 3 | 4 | def initialize(url=nil) 5 | @url = url 6 | end 7 | 8 | def self.from_file(build_file) 9 | data = JSON.parse(open(build_file).read) 10 | BuildInput.new( 11 | data.dig('url') 12 | ) 13 | end 14 | 15 | def copy_to_build_output 16 | system('rsync -a builds/ builds-artifacts/') or raise('Could not copy builds to builds artifacts') 17 | end 18 | end -------------------------------------------------------------------------------- /tasks/build-binary-new/build_output.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'fileutils' 3 | 4 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 5 | require_relative "#{buildpacks_ci_dir}/lib/git-client" 6 | 7 | class BuildOutput 8 | attr_reader :git_client, :base_dir 9 | 10 | def initialize(name, git_client = GitClient, base_dir = 'builds-artifacts') 11 | @name = name 12 | @git_client = git_client 13 | @base_dir = File.join(base_dir, 'binary-builds-new', name) 14 | FileUtils.mkdir_p(@base_dir) 15 | end 16 | 17 | def add_output(file, data) 18 | Dir.chdir(@base_dir) do 19 | File.write(file, data.to_json) 20 | @git_client.add_file(file) 21 | end 22 | end 23 | 24 | def commit_outputs(msg) 25 | Dir.chdir(@base_dir) do 26 | @git_client.set_global_config('user.email', 'cf-buildpacks-eng@pivotal.io') 27 | @git_client.set_global_config('user.name', 'CF Buildpacks Team CI Server') 28 | @git_client.safe_commit(msg) 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /tasks/build-binary-new/dep_metadata_output.rb: -------------------------------------------------------------------------------- 1 | require 'digest' 2 | 3 | class DepMetadataOutput 4 | attr_reader :base_dir 5 | 6 | def initialize(base_dir = 'dep-metadata') 7 | @base_dir = base_dir 8 | end 9 | 10 | def write_metadata(dep_filename, data) 11 | dep_basename = File.basename(dep_filename) 12 | metadata_filename = "#{dep_basename}_metadata.json" 13 | File.write(File.join(@base_dir, metadata_filename), data.to_json) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /tasks/build-binary-new/php81-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | additions: 5 | - name: oci8 6 | version: 3.2.1 7 | md5: 309190ef3ede2779a617c9375d32ea7a 8 | klass: OraclePeclRecipe 9 | -------------------------------------------------------------------------------- /tasks/build-binary-new/php82-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | - name: yaf 5 | version: 3.3.5 6 | md5: 128ecf6c84dd71d59c12d826cc51f0c4 7 | klass: PeclRecipe 8 | additions: 9 | - name: oci8 10 | version: 3.3.0 11 | md5: bbbbb26f1791d1f27ffc05289abee2f3 12 | klass: OraclePeclRecipe 13 | -------------------------------------------------------------------------------- /tasks/build-binary-new/php83-extensions-patch.yml: -------------------------------------------------------------------------------- 1 | --- 2 | extensions: 3 | exclusions: 4 | - name: yaf 5 | version: 3.3.5 6 | md5: 128ecf6c84dd71d59c12d826cc51f0c4 7 | klass: PeclRecipe 8 | additions: 9 | -------------------------------------------------------------------------------- /tasks/build-image/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: vito/oci-build-task 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | 11 | inputs: 12 | - name: source 13 | 14 | outputs: 15 | - name: image 16 | 17 | params: 18 | CONTEXT: 19 | DOCKERFILE: 20 | 21 | run: 22 | path: build 23 | -------------------------------------------------------------------------------- /tasks/buildpack-to-master/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative './buildpack-to-master.rb' 3 | 4 | GITHUB_ACCESS_TOKEN = ENV.fetch('GITHUB_ACCESS_TOKEN') or raise 'Must supply env GITHUB_ACCESS_TOKEN' 5 | GITHUB_REPO = ENV.fetch('GITHUB_REPO') or raise 'Must supply env GITHUB_REPO' 6 | GITHUB_STATUS_CONTEXT = ENV.fetch('GITHUB_STATUS_CONTEXT') or raise 'Must supply env GITHUB_STATUS_CONTEXT' 7 | PIPELINE_URI = ENV.fetch('PIPELINE_URI') or raise 'Must supply env PIPELINE_URI' 8 | 9 | ## Optional (with default) 10 | GITHUB_STATUS_DESCRIPTION = ENV.fetch('GITHUB_STATUS_DESCRIPTION', 'Buildpacks CI build success') 11 | 12 | BuildpackToMaster.new(GITHUB_ACCESS_TOKEN, GITHUB_REPO, GITHUB_STATUS_CONTEXT, GITHUB_STATUS_DESCRIPTION, PIPELINE_URI).run 13 | -------------------------------------------------------------------------------- /tasks/buildpack-to-master/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: repo 12 | 13 | run: 14 | path: bash 15 | args: 16 | - -cl 17 | - buildpacks-ci/tasks/buildpack-to-master/run.rb 18 | 19 | params: 20 | GITHUB_ACCESS_TOKEN: 21 | GITHUB_REPO: 22 | GITHUB_STATUS_CONTEXT: 23 | GITHUB_STATUS_DESCRIPTION: 24 | -------------------------------------------------------------------------------- /tasks/cf-release/create-buildpack-dev-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: coredeps/core-deps-ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: release 12 | - name: buildpack-stack0 13 | optional: true 14 | - name: buildpack-stack1 15 | optional: true 16 | - name: buildpack-stack2 17 | optional: true 18 | - name: buildpack-stack3 19 | optional: true 20 | - name: buildpack-stack4 21 | optional: true 22 | outputs: 23 | - name: release 24 | - name: release-tarball 25 | params: 26 | AWS_ACCESS_KEY_ID: 27 | AWS_SECRET_ACCESS_KEY: 28 | AWS_ASSUME_ROLE_ARN: 29 | run: 30 | path: buildpacks-ci/tasks/cf-release/create-buildpack-dev-release/run 31 | -------------------------------------------------------------------------------- /tasks/cf-release/create-buildpack-release-ops-file/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | buildpack_name="$(tar -xf buildpack-release-tarball/*.tgz -O release.MF | yj -yj | jq -r .name)" 6 | version="$(tar -xf buildpack-release-tarball/*.tgz -O release.MF | yj -yj | jq -r .version)" 7 | 8 | cat >>"ops-file/bump-${buildpack_name}.yml" <<-EOF 9 | - path: /releases/name=${buildpack_name} 10 | type: replace 11 | value: 12 | name: "${buildpack_name}" 13 | version: "${version}" 14 | EOF 15 | -------------------------------------------------------------------------------- /tasks/cf-release/create-buildpack-release-ops-file/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: coredeps/core-deps-ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack-release-tarball 12 | outputs: 13 | - name: ops-file 14 | run: 15 | path: buildpacks-ci/tasks/cf-release/create-buildpack-release-ops-file/run 16 | -------------------------------------------------------------------------------- /tasks/cf-release/create-cats-integration-config/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | tag: latest 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | inputs: 11 | - name: buildpacks-ci 12 | - name: cf-deployment-concourse-tasks 13 | - name: toolsmiths-env 14 | outputs: 15 | - name: cats-integration-config 16 | run: 17 | path: buildpacks-ci/tasks/cf-release/create-cats-integration-config/run 18 | -------------------------------------------------------------------------------- /tasks/cf-release/finalize-buildpack-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: coredeps/core-deps-ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: release 12 | - name: buildpack-release-tarball 13 | outputs: 14 | - name: release 15 | - name: release-tarball 16 | - name: version 17 | params: 18 | AWS_ACCESS_KEY_ID: 19 | AWS_SECRET_ACCESS_KEY: 20 | AWS_ASSUME_ROLE_ARN: 21 | run: 22 | path: buildpacks-ci/tasks/cf-release/finalize-buildpack-release/run 23 | -------------------------------------------------------------------------------- /tasks/cf-release/update-buildpack-release-trigger/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | source buildpacks-ci/lib/aws_assume_role.sh 6 | 7 | buildpack_name="$(tar -xf buildpack-release-tarball/*.tgz -O release.MF | yj -yj | jq -r .name)" 8 | old_version="$(cat "buildpack-release-trigger/${buildpack_name}")" 9 | new_version="$(tar -xf buildpack-release-tarball/*.tgz -O release.MF | yj -yj | jq -r .version | cut -d'-' -f1)" 10 | 11 | if [[ "${old_version}" != "${new_version}" ]]; then 12 | echo "Updating trigger to ${new_version}" 13 | echo -n "${new_version}" | aws s3 cp - "s3://${BUCKET}/${buildpack_name}" 14 | else 15 | echo "Version ${new_version} is already released" 16 | fi 17 | -------------------------------------------------------------------------------- /tasks/cf-release/update-buildpack-release-trigger/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: coredeps/core-deps-ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack-release-tarball 12 | - name: buildpack-release-trigger 13 | params: 14 | AWS_ACCESS_KEY_ID: 15 | AWS_SECRET_ACCESS_KEY: 16 | AWS_ASSUME_ROLE_ARN: 17 | BUCKET: 18 | run: 19 | path: buildpacks-ci/tasks/cf-release/update-buildpack-release-trigger/run 20 | -------------------------------------------------------------------------------- /tasks/cf-release/upload-bosh-release/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | source cf-deployment-concourse-tasks/shared-functions 6 | setup_bosh_env_vars 7 | 8 | bosh -n upload-release release-tarball/*.tgz 9 | -------------------------------------------------------------------------------- /tasks/cf-release/upload-bosh-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | tag: latest 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | inputs: 11 | - name: buildpacks-ci 12 | - name: cf-deployment-concourse-tasks 13 | - name: bbl-state 14 | optional: true 15 | - name: toolsmiths-env 16 | optional: true 17 | - name: release-tarball 18 | run: 19 | path: buildpacks-ci/tasks/cf-release/upload-bosh-release/run 20 | 21 | params: 22 | BBL_STATE_DIR: bbl-state 23 | -------------------------------------------------------------------------------- /tasks/cf-release/write-buildpack-release-trigger-file/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | echo "Last released on $(date)" > buildpack-release-trigger-file/file 6 | -------------------------------------------------------------------------------- /tasks/cf-release/write-buildpack-release-trigger-file/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: coredeps/core-deps-ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | run: 12 | path: buildpacks-ci/tasks/cf-release/write-buildpack-release-trigger-file/run 13 | outputs: 14 | - name: buildpack-release-trigger-file 15 | -------------------------------------------------------------------------------- /tasks/cf/create-space/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: cfbuildpacks/ci 8 | tag: latest 9 | username: ((coredeps-dockerhub-user.username)) 10 | password: ((coredeps-dockerhub-user.password)) 11 | 12 | inputs: 13 | - name: ci 14 | - name: lock 15 | 16 | outputs: 17 | - name: space 18 | 19 | run: 20 | path: ci/tasks/cf/create-space/task.sh 21 | 22 | params: 23 | DOMAIN: 24 | ORG: 25 | -------------------------------------------------------------------------------- /tasks/cf/redeploy/operations/cflinuxfs3-rootfs-certs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs3-rootfs-setup?/release 4 | value: cflinuxfs3 5 | - type: replace 6 | path: /instance_groups/name=diego-cell/jobs/name=cflinuxfs3-rootfs-setup?/properties/cflinuxfs3-rootfs/trusted_certs 7 | value: 8 | - ((diego_instance_identity_ca.ca)) 9 | - ((credhub_tls.ca)) 10 | - ((uaa_ssl.ca)) 11 | -------------------------------------------------------------------------------- /tasks/cf/redeploy/operations/scale-api-and-diego-cells.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - type: replace 3 | path: /instance_groups/name=api/instances 4 | value: 3 5 | 6 | - type: replace 7 | path: /instance_groups/name=diego-cell/instances 8 | value: 3 9 | -------------------------------------------------------------------------------- /tasks/cf/redeploy/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: registry-image 6 | source: 7 | repository: cfbuildpacks/ci 8 | tag: latest 9 | username: ((coredeps-dockerhub-user.username)) 10 | password: ((coredeps-dockerhub-user.password)) 11 | 12 | inputs: 13 | - name: ci 14 | - name: cf-deployment 15 | - name: lock 16 | 17 | run: 18 | path: ci/tasks/cf/redeploy/task.sh 19 | 20 | params: 21 | DEPLOY_WINDOWS_CELL: 22 | SCALE_DIEGO_CELLS: 23 | ADD_CFLINUXFS3_STACK: 24 | -------------------------------------------------------------------------------- /tasks/check-for-binary-builder-integration-spec-presence/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | Dir.chdir('binary-builder') do 4 | specs_on_filesystem = Dir['spec/integration/*_spec.rb'].map{|file| File.basename(file) } 5 | specs_in_pipeline_yaml = ENV.fetch('SPEC_NAMES').split(',').map { |name| "#{name}_spec.rb" } 6 | 7 | difference_between_lists = specs_on_filesystem - specs_in_pipeline_yaml 8 | 9 | if difference_between_lists.empty? 10 | puts 'All expected integration specs will run' 11 | exit 0 12 | else 13 | puts 'There were integration specs in binary-builder/spec/integration that' 14 | puts 'were not found in the list of specs to run (integration_spec_names)' 15 | puts 'in the binary-builder.yml pipeline. You need to add those names to' 16 | puts 'the pipeline before this task will pass' 17 | puts 18 | puts 'The missing specs are:' 19 | puts ' ' + difference_between_lists.join(", ") 20 | 21 | exit 1 22 | end 23 | end 24 | 25 | -------------------------------------------------------------------------------- /tasks/check-for-binary-builder-integration-spec-presence/task.yml: -------------------------------------------------------------------------------- 1 | platform: linux 2 | image_resource: 3 | type: docker-image 4 | source: 5 | repository: cfbuildpacks/ci 6 | username: ((coredeps-dockerhub-user.username)) 7 | password: ((coredeps-dockerhub-user.password)) 8 | inputs: 9 | - name: binary-builder 10 | - name: buildpacks-ci 11 | params: 12 | SPEC_NAMES: 13 | run: 14 | path: bash 15 | args: 16 | - '-cl' 17 | - 'buildpacks-ci/tasks/check-for-binary-builder-integration-spec-presence/run.rb' 18 | -------------------------------------------------------------------------------- /tasks/check-for-new-rootfs-cves-cflinuxfs4/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | 4 | stack = 'cflinuxfs4' 5 | 6 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 7 | stacks_dir = File.expand_path(File.join(buildpacks_ci_dir, '..', stack.gsub(/m$/, ''))) 8 | cves_dir = File.expand_path(File.join(buildpacks_ci_dir, '..', 'output-new-cves', 'new-cve-notifications')) 9 | 10 | require "#{buildpacks_ci_dir}/lib/rootfs-cve-notifier" 11 | 12 | cve_notifier = RootFSCVENotifier.new(cves_dir, stacks_dir) 13 | 14 | cve_notifier.run!(stack, 'Ubuntu 22.04', 'ubuntu22.04', []) 15 | -------------------------------------------------------------------------------- /tasks/check-for-new-rootfs-cves-cflinuxfs4/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: new-cves 11 | - name: buildpacks-ci 12 | - name: cflinuxfs4 13 | outputs: 14 | - name: output-new-cves 15 | run: 16 | path: bash 17 | args: 18 | - -c 19 | - | 20 | set -e 21 | rsync -a new-cves/ output-new-cves 22 | 23 | cd buildpacks-ci && bundle exec ./tasks/check-for-new-rootfs-cves-cflinuxfs4/run.rb 24 | -------------------------------------------------------------------------------- /tasks/check-for-new-rootfs-cves/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | 4 | stack = 'cflinuxfs3' 5 | 6 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 7 | stacks_dir = File.expand_path(File.join(buildpacks_ci_dir, '..', stack.gsub(/m$/, ''))) 8 | cves_dir = File.expand_path(File.join(buildpacks_ci_dir, '..', 'output-new-cves', 'new-cve-notifications')) 9 | 10 | require "#{buildpacks_ci_dir}/lib/rootfs-cve-notifier" 11 | 12 | cve_notifier = RootFSCVENotifier.new(cves_dir, stacks_dir) 13 | 14 | cve_notifier.run!(stack, 'Ubuntu 18.04', 'ubuntu18.04', []) 15 | -------------------------------------------------------------------------------- /tasks/check-for-new-rootfs-cves/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: new-cves 11 | - name: buildpacks-ci 12 | - name: cflinuxfs3 13 | outputs: 14 | - name: output-new-cves 15 | run: 16 | path: bash 17 | args: 18 | - -c 19 | - | 20 | set -e 21 | rsync -a new-cves/ output-new-cves 22 | 23 | cd buildpacks-ci && bundle exec ./tasks/check-for-new-rootfs-cves/run.rb 24 | -------------------------------------------------------------------------------- /tasks/check-for-rootfs-race-condition/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | set -x 7 | 8 | version="$(cat version/version)" 9 | latest_version="$(cat latest-version/version)" 10 | 11 | if [[ "$version" != "$latest_version" ]]; then 12 | echo "There is another version of the rootfs in the pipeline" 13 | exit 1 14 | fi 15 | -------------------------------------------------------------------------------- /tasks/check-for-rootfs-race-condition/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: version 12 | - name: latest-version 13 | run: 14 | path: buildpacks-ci/tasks/check-for-rootfs-race-condition/run.sh 15 | -------------------------------------------------------------------------------- /tasks/check-php-modules-in-manifest/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpack 11 | - name: buildpacks-ci 12 | run: 13 | path: bash 14 | args: 15 | - -c 16 | - "cd buildpack && ./scripts/check-sub-dependencies-in-manifest" 17 | -------------------------------------------------------------------------------- /tasks/check-tag-not-already-added/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | VERSION="" 8 | if [[ -d "version" ]]; then 9 | VERSION=$(cat version/version) 10 | else 11 | VERSION=$(cat buildpack/VERSION) 12 | fi 13 | 14 | cd buildpack 15 | git tag "v${VERSION}" 16 | -------------------------------------------------------------------------------- /tasks/check-tag-not-already-added/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: version 13 | optional: true 14 | run: 15 | path: buildpacks-ci/tasks/check-tag-not-already-added/run.sh 16 | -------------------------------------------------------------------------------- /tasks/configure-pas/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: 7 | repository: cfbuildpacks/ci 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | 11 | inputs: 12 | - name: buildpacks-ci 13 | - name: environment 14 | 15 | run: 16 | path: buildpacks-ci/tasks/configure-pas/run.sh 17 | 18 | params: 19 | COMPUTE_INSTANCE_COUNT: 1 20 | 21 | -------------------------------------------------------------------------------- /tasks/create-bosh-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: release 12 | - name: buildpack-zip-stack0 13 | optional: true 14 | - name: buildpack-zip-stack1 15 | optional: true 16 | - name: buildpack-zip-stack2 17 | optional: true 18 | - name: buildpack-zip-stack3 19 | optional: true 20 | - name: buildpack-zip-stack4 21 | optional: true 22 | outputs: 23 | - name: release-artifacts 24 | - name: release-tarball 25 | - name: version 26 | params: 27 | LANGUAGE: 28 | RELEASE_NAME: 29 | RELEASE_DIR: 30 | ACCESS_KEY_ID: 31 | SECRET_ACCESS_KEY: 32 | AWS_ASSUME_ROLE_ARN: 33 | run: 34 | path: buildpacks-ci/tasks/create-bosh-release/run.rb 35 | -------------------------------------------------------------------------------- /tasks/create-capi-release-with-rootfs/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: stack-s3 12 | - name: capi-release 13 | outputs: 14 | - name: capi-release-artifacts 15 | run: 16 | path: bash 17 | args: 18 | - -c 19 | - | 20 | cd buildpacks-ci 21 | bundle exec ./tasks/create-capi-release-with-rootfs/run.rb 22 | params: 23 | STACK: 24 | -------------------------------------------------------------------------------- /tasks/create-cf-space-toolsmiths/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: environment 12 | outputs: 13 | - name: cf-space 14 | 15 | run: 16 | path: buildpacks-ci/tasks/create-cf-space-toolsmiths/run.sh 17 | params: 18 | ORG: 19 | -------------------------------------------------------------------------------- /tasks/create-deployment-source-config/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'yaml' 4 | 5 | #See https://github.com/cloudfoundry/bosh-deployment-resource#dynamic-source-configuration 6 | 7 | target_config = {} 8 | 9 | Dir.chdir("bbl-state/#{ENV['ENV_NAME']}") do 10 | target_config = { 11 | "target"=> `bbl director-address`.strip, 12 | "client"=> `bbl director-username`.strip, 13 | "client_secret"=> `bbl director-password`.strip, 14 | "ca_cert"=> `bbl director-ca-cert`.strip, 15 | "jumpbox_url"=> `bbl jumpbox-address`.strip + ':22', 16 | "jumpbox_ssh_key"=>YAML.load(open('vars/jumpbox-vars-store.yml').read).dig('jumpbox_ssh','private_key') 17 | } 18 | end 19 | 20 | File.write("deployment-source-config/source_file.yml", YAML.dump(target_config)) 21 | -------------------------------------------------------------------------------- /tasks/create-deployment-source-config/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cloudfoundry/cf-deployment-concourse-tasks 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: bbl-state 11 | - name: buildpacks-ci 12 | 13 | outputs: 14 | - name: deployment-source-config 15 | 16 | run: 17 | path: bash 18 | args: 19 | - -cl 20 | - buildpacks-ci/tasks/create-deployment-source-config/run.rb 21 | 22 | params: 23 | ENV_NAME: 24 | -------------------------------------------------------------------------------- /tasks/create-new-version-line-story/create-new-version-line-story.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | inputs: 8 | - name: buildpacks-ci 9 | - name: source 10 | outputs: 11 | - name: builds-artifacts 12 | run: 13 | path: bash 14 | args: 15 | - -cl 16 | - buildpacks-ci/tasks/create-new-version-line-story/create-new-version-line-story.rb 17 | params: 18 | BUILDPACKS: 19 | EXISTING_VERSION_LINES: 20 | GITHUB_TOKEN: 21 | -------------------------------------------------------------------------------- /tasks/create-new-version-line-story/create_node_lts.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'fileutils' 3 | require 'json' 4 | require 'yaml' 5 | require_relative './dispatch.rb' 6 | 7 | BUILDPACKS = ENV['BUILDPACKS'] 8 | .split(' ') 9 | .compact 10 | .map {|bp| "#{bp}-buildpack" } 11 | 12 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 13 | require_relative "#{buildpacks_ci_dir}/lib/git-client" 14 | 15 | data = JSON.parse(open('source/data.json').read) 16 | name = data.dig('source', 'name') 17 | version = data.dig('version', 'ref') 18 | 19 | if File.file?('all-monitored-deps/data.json') 20 | all_monitored_deps = JSON.parse(open('all-monitored-deps/data.json').read) 21 | data['packages'] = all_monitored_deps 22 | end 23 | 24 | puts "Sending dispatch to create github issue..." 25 | send_dispatch(name, version, data, ENV['GITHUB_TOKEN']) 26 | -------------------------------------------------------------------------------- /tasks/create-new-version-line-story/create_node_lts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: source 12 | - name: all-monitored-deps 13 | optional: true 14 | outputs: 15 | - name: builds-artifacts 16 | run: 17 | path: bash 18 | args: 19 | - -cl 20 | - buildpacks-ci/tasks/create-new-version-line-story/create_node_lts.rb 21 | params: 22 | BUILDPACKS: 23 | GITHUB_TOKEN: 24 | -------------------------------------------------------------------------------- /tasks/create-new-version-line-story/dispatch.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'net/http' 4 | require 'uri' 5 | require 'json' 6 | 7 | def send_dispatch(name, version, jsonData, token) 8 | jsonStr = JSON.generate(jsonData).gsub('"', '\"') 9 | uri = URI.parse("https://api.github.com/repos/cloudfoundry/buildpacks-github-config/dispatches") 10 | request = Net::HTTP::Post.new(uri) 11 | request["Authorization"] = "token #{token}" 12 | request.body = "{ 13 | \"event_type\": \"new-version-line\", 14 | \"client_payload\":{ 15 | \"Name\": \"#{name}\", 16 | \"Version\": \"#{version}\", 17 | \"DependencyJSON\": \"#{jsonStr}\" 18 | } 19 | }" 20 | req_options = { 21 | use_ssl: uri.scheme == "https", 22 | } 23 | 24 | response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http| 25 | http.request(request) 26 | end 27 | response.value() 28 | end 29 | -------------------------------------------------------------------------------- /tasks/create-rootfs-bosh-release-commit/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: release-artifacts 11 | outputs: 12 | - name: release-commit 13 | run: 14 | path: bash 15 | args: 16 | - "-c" 17 | - 'cd release-artifacts && git rev-list HEAD -n1 > ../release-commit/sha' 18 | -------------------------------------------------------------------------------- /tasks/create-rootfs-bosh-release-github-release-notes/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | stack = ENV['STACK'] 4 | org = ENV['ORG'].empty? ? 'cloudfoundry' : ENV['ORG'] 5 | 6 | 7 | repo = "#{org}/#{stack}" 8 | 9 | body_file = 'release-body/body' 10 | version = `cat version/number` 11 | github_url = "https://github.com/#{repo}/releases/tag/#{version}" 12 | 13 | message = "This release ships with #{stack} version #{version}. For more information, see the [release notes](#{github_url})" 14 | 15 | File.write(body_file, message) 16 | -------------------------------------------------------------------------------- /tasks/create-rootfs-bosh-release-github-release-notes/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: version 12 | outputs: 13 | - name: release-body 14 | run: 15 | path: bash 16 | args: 17 | - "-cl" 18 | - "buildpacks-ci/tasks/create-rootfs-bosh-release-github-release-notes/run.rb" 19 | params: 20 | STACK: 21 | ORG: 22 | -------------------------------------------------------------------------------- /tasks/delete-cf-space/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | "./cf-space/login" 8 | 9 | set -x 10 | 11 | SPACE=$(cat cf-space/name) 12 | cf delete-space -f "$SPACE" || true 13 | -------------------------------------------------------------------------------- /tasks/delete-cf-space/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: cf-space 12 | run: 13 | path: buildpacks-ci/tasks/delete-cf-space/run.sh 14 | -------------------------------------------------------------------------------- /tasks/detect-and-upload/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require_relative 'buildpack-tagger' 4 | 5 | Dir.chdir('..') do 6 | buildpack_dir = File.join(Dir.pwd, 'buildpack') 7 | buildpack_name = ENV.fetch('BUILDPACK_NAME') 8 | git_repo_org = ENV.fetch('GIT_REPO_ORG') 9 | 10 | tagger = BuildpackTagger.new(buildpack_dir, buildpack_name, git_repo_org) 11 | tagger.run! 12 | end 13 | -------------------------------------------------------------------------------- /tasks/detect-and-upload/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: pivotal-buildpack 11 | optional: true 12 | - name: pivotal-buildpack-cached 13 | optional: true 14 | - name: buildpacks-ci 15 | - name: buildpack 16 | outputs: 17 | - name: buildpack-artifacts 18 | run: 19 | path: bash 20 | args: 21 | - -cl 22 | - | 23 | set -e 24 | pushd buildpacks-ci 25 | tasks/detect-and-upload/run.rb 26 | popd 27 | params: 28 | RUBYGEM_MIRROR: 29 | CF_STACK: 30 | BUILDPACK_NAME: 31 | GIT_REPO_ORG: 32 | GITHUB_TOKEN: 33 | -------------------------------------------------------------------------------- /tasks/finalize-buildpack/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # encoding: utf-8 3 | require_relative 'buildpack-finalizer' 4 | 5 | artifact_dir = File.join(Dir.pwd, 'buildpack-artifacts') 6 | version = File.read('buildpack/VERSION').strip 7 | 8 | buildpack_repo_dir = 'buildpack' 9 | uncached_buildpack_dirs = Dir.glob('uncached-buildpack-for-stack*') 10 | 11 | ENV['GOBIN']="#{File.expand_path(buildpack_repo_dir)}/.bin" 12 | ENV['PATH']="#{ENV['GOBIN']}:#{ENV['PATH']}" 13 | 14 | BuildpackFinalizer.new(artifact_dir, version, buildpack_repo_dir, uncached_buildpack_dirs).run 15 | -------------------------------------------------------------------------------- /tasks/finalize-buildpack/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: uncached-buildpack-for-stack0 13 | - name: uncached-buildpack-for-stack1 14 | optional: true 15 | - name: uncached-buildpack-for-stack2 16 | optional: true 17 | - name: uncached-buildpack-for-stack3 18 | optional: true 19 | - name: uncached-buildpack-for-stack4 20 | optional: true 21 | caches: 22 | - path: buildpack/vendor 23 | outputs: 24 | - name: buildpack-artifacts 25 | run: 26 | path: bash 27 | args: 28 | - -cl 29 | - buildpacks-ci/tasks/finalize-buildpack/run.rb 30 | -------------------------------------------------------------------------------- /tasks/generate-buildpacks-json/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit 3 | set -o nounset 4 | set -o pipefail 5 | set -x 6 | 7 | export BUILDDIR=$PWD 8 | cd buildpacks-site/downloader 9 | export BUNDLE_GEMFILE=$PWD/Gemfile 10 | bundle install --deployment 11 | bundle cache 12 | bundle exec dl.rb "${BUILDDIR}/buildpacks-json/buildpacks.json" 13 | -------------------------------------------------------------------------------- /tasks/generate-buildpacks-json/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpacks-site 12 | caches: 13 | - path: buildpacks-site/downloader/vendor 14 | outputs: 15 | - name: buildpacks-json 16 | params: 17 | ACCESS_TOKEN: 18 | run: 19 | path: buildpacks-ci/tasks/generate-buildpacks-json/run.sh 20 | -------------------------------------------------------------------------------- /tasks/generate-dependency-deprecation-github-issue/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cloudfoundry/buildpacks-ci/tasks/generate-dependency-deprecation-github-issue 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/google/go-github v17.0.0+incompatible 7 | github.com/google/go-querystring v1.1.0 // indirect 8 | golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c 9 | gopkg.in/yaml.v2 v2.4.0 10 | ) 11 | -------------------------------------------------------------------------------- /tasks/generate-dependency-deprecation-github-issue/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | 13 | run: 14 | dir: buildpacks-ci/tasks/generate-dependency-deprecation-github-issue 15 | path: go 16 | args: 17 | - run 18 | - main.go 19 | 20 | params: 21 | GITHUB_TOKEN: 22 | BUILDPACK_NAME: 23 | -------------------------------------------------------------------------------- /tasks/generate-rootfs-receipt-diff/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: previous-rootfs-release 12 | - name: receipt-artifacts 13 | - name: public-robots 14 | outputs: 15 | - name: public-robots-artifacts 16 | - name: git-tags 17 | run: 18 | path: buildpacks-ci/tasks/generate-rootfs-receipt-diff/run.rb 19 | params: 20 | STACK: 21 | -------------------------------------------------------------------------------- /tasks/generate-rootfs-release-notes/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: previous-rootfs-release 11 | - name: buildpacks-ci 12 | - name: version 13 | - name: new-cves 14 | - name: rootfs 15 | outputs: 16 | - name: release-body 17 | - name: new-cves-artifacts 18 | run: 19 | path: buildpacks-ci/tasks/generate-rootfs-release-notes/run.rb 20 | params: 21 | STACK: 22 | STACK_REPO: 23 | GITHUB_ACCESS_TOKEN: 24 | -------------------------------------------------------------------------------- /tasks/get-buildpack-github-release-notes/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: registry-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: version 13 | outputs: 14 | - name: release-body 15 | run: 16 | path: buildpacks-ci/tasks/get-buildpack-github-release-notes/run.sh 17 | params: 18 | BUILDPACK_REPO: 19 | OFFLINE_RELEASE: 20 | GITHUB_ACCESS_TOKEN: 21 | -------------------------------------------------------------------------------- /tasks/get-cf-creds/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | pushd "bbl-state/$ENV_NAME" 8 | set +x 9 | eval "$(bbl print-env)" 10 | set -x 11 | popd 12 | 13 | credhub get -n /bosh-"$ENV_NAME"/cf/cf_admin_password -j | jq -r .value > cf-admin-password/password 14 | 15 | -------------------------------------------------------------------------------- /tasks/get-cf-creds/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: bbl-state 12 | outputs: 13 | - name: cf-admin-password 14 | run: 15 | path: buildpacks-ci/tasks/get-cf-creds/run.sh 16 | 17 | params: 18 | ENV_NAME: 19 | -------------------------------------------------------------------------------- /tasks/make-rootfs/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | set -x 8 | 9 | #shellcheck source=../../scripts/start-docker 10 | source ./buildpacks-ci/scripts/start-docker 11 | util::docker::start 12 | trap util::docker::stop EXIT 13 | 14 | pushd rootfs 15 | old_receipt_copy="receipt.${STACK}.x86_64.copy" 16 | mv "receipt.${STACK}.x86_64" "$old_receipt_copy" 17 | 18 | make --always-make NAME="$STACK" 19 | 20 | versioned_stack_filename="../rootfs-artifacts/$STACK-$(cat ../version/number).tar.gz" 21 | mv "$STACK.x86_64.tar.gz" "$versioned_stack_filename" 22 | 23 | versioned_receipt_filename="../receipt-artifacts/receipt.${STACK}.x86_64-$(cat ../version/number)" 24 | mv "receipt.${STACK}.x86_64" "$versioned_receipt_filename" 25 | 26 | command -v git 27 | TERM=xterm-color git --no-pager diff "$old_receipt_copy" "$versioned_receipt_filename" || true 28 | popd 29 | -------------------------------------------------------------------------------- /tasks/make-rootfs/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: rootfs 12 | - name: version 13 | outputs: 14 | - name: rootfs-artifacts 15 | - name: receipt-artifacts 16 | run: 17 | path: buildpacks-ci/tasks/make-rootfs/run.sh 18 | params: 19 | STACK: 20 | -------------------------------------------------------------------------------- /tasks/overwrite-rootfs-release/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | echo "Overwriting BOSH release $STACK" 8 | 9 | release_dir=rootfs-release 10 | version="212.0.$(date +"%s")" 11 | 12 | pushd $release_dir 13 | for name in $( bosh2 blobs | grep -- "rootfs/$STACK-*" | awk '{print $1}' ); do 14 | bosh2 remove-blob "$name" 15 | done 16 | 17 | blob="../stack-s3/*.tar.gz" 18 | 19 | # shellcheck disable=SC2086 20 | bosh2 -n add-blob $blob "rootfs/$(basename $blob)" 21 | 22 | echo "Running 'bosh create release' in $release_dir" 23 | 24 | bosh2 create-release --force --tarball "dev_releases/$STACK/$STACK-$version.tgz" --name "$STACK" --version "${version}" 25 | popd 26 | 27 | cat < ${release_dir}/use-dev-release-opsfile.yml 28 | --- 29 | - type: replace 30 | path: /releases/name=$STACK? 31 | value: 32 | name: $STACK 33 | version: ${version} 34 | EOF 35 | 36 | echo "rsyncing $release_dir to ${release_dir}-artifacts" 37 | 38 | rsync -a "$release_dir/" "${release_dir}-artifacts" 39 | -------------------------------------------------------------------------------- /tasks/overwrite-rootfs-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: stack-s3 12 | - name: rootfs-release 13 | outputs: 14 | - name: rootfs-release-artifacts 15 | run: 16 | path: buildpacks-ci/tasks/overwrite-rootfs-release/run.sh 17 | params: 18 | STACK: 19 | -------------------------------------------------------------------------------- /tasks/remove-gcp-parent-dns-record/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "$GCP_SERVICE_ACCOUNT_KEY" > /tmp/gcp_key 4 | 5 | set -o errexit 6 | set -o nounset 7 | set -o pipefail 8 | set -o xtrace 9 | 10 | ENV_NAME=${ENV_NAME:-} 11 | DNS_NAME="${ENV_NAME}.buildpacks-gcp.ci.cf-app.com." 12 | 13 | gcloud auth activate-service-account --key-file /tmp/gcp_key 14 | 15 | gcloud config set project cf-buildpacks 16 | 17 | # get the NS 18 | NAMESERVERS=$(gcloud dns record-sets list -z buildpacks | grep "$ENV_NAME" | awk '{ print $4 }'| tr , ' ') 19 | 20 | if [ -z "$NAMESERVERS" ]; then 21 | echo "There are no record sets matching ${ENV_NAME}" 22 | echo "Skipping..." 23 | exit 0 24 | fi 25 | 26 | # remove the parent zone (buildpacks zone) subdomain NS records 27 | gcloud dns record-sets transaction start --zone=buildpacks 28 | # shellcheck disable=SC2086 29 | gcloud dns record-sets transaction remove ${NAMESERVERS} --name "${DNS_NAME}" --ttl=300 --type=NS --zone=buildpacks 30 | gcloud dns record-sets transaction execute --zone=buildpacks 31 | -------------------------------------------------------------------------------- /tasks/remove-gcp-parent-dns-record/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | 4 | image_resource: 5 | type: docker-image 6 | source: 7 | repository: cfbuildpacks/ci 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | 11 | inputs: 12 | - name: buildpacks-ci 13 | 14 | run: 15 | path: buildpacks-ci/tasks/remove-gcp-parent-dns-record/run.sh 16 | 17 | params: 18 | ENV_NAME: 19 | GCP_SERVICE_ACCOUNT_KEY: 20 | -------------------------------------------------------------------------------- /tasks/rename-rootfs-for-docker/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: stack-s3 11 | outputs: 12 | - name: docker-s3 13 | run: 14 | path: bash 15 | args: ["-c", "mv stack-s3/$STACK-*.tar.gz docker-s3/$STACK.tar.gz"] 16 | params: 17 | STACK: 18 | -------------------------------------------------------------------------------- /tasks/repackage-dependency/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -euo pipefail 4 | 5 | name="$(jq -r .source.name source/data.json)" 6 | version="$(jq -r .version.ref source/data.json)" 7 | 8 | if [ "${ANY_STACK}" == "true" ]; then 9 | metadata_file_path="builds/binary-builds-new/$name/$version-any-stack.json" 10 | else 11 | metadata_file_path="builds/binary-builds-new/$name/$version-$STACK.json" 12 | fi 13 | 14 | git_filename="binary-builds-new/$name/$version-$STACK.json" 15 | full_filename="builds/$git_filename" 16 | cp "${metadata_file_path}" "${full_filename}" 17 | git config --global user.email "cf-buildpacks-eng@pivotal.io" 18 | git config --global user.name "CF Buildpacks Team CI Server" 19 | if [[ -n "$(git -C builds status --porcelain)" ]]; then 20 | git -C builds add "$git_filename" 21 | git -C builds commit -m "Build $name - $version - $STACK" 22 | fi 23 | -------------------------------------------------------------------------------- /tasks/repackage-dependency/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cloudfoundry/cflinuxfs3 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: source 12 | - name: builds 13 | outputs: 14 | - name: artifacts 15 | - name: builds 16 | run: 17 | path: buildpacks-ci/tasks/repackage-dependency/run.sh 18 | params: 19 | STACK: 20 | ANY_STACK: 21 | -------------------------------------------------------------------------------- /tasks/rootfs/create-bosh-release-commit/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: release-artifacts 11 | outputs: 12 | - name: release-commit 13 | run: 14 | path: bash 15 | args: 16 | - "-c" 17 | - 'cd release-artifacts && git rev-list HEAD -n1 > ../release-commit/sha' 18 | -------------------------------------------------------------------------------- /tasks/rootfs/create-bosh-release-github-release-notes/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | repo = "cloudfoundry/#{ENV['STACK']}" 4 | 5 | body_file = 'release-body/body' 6 | version = `cat version/number` 7 | github_url = "https://github.com/#{repo}/releases/tag/#{version}" 8 | 9 | message = "This release ships with #{repo.split('/').last} version #{version}. For more information, see the [release notes](#{github_url})" 10 | 11 | File.write(body_file, message) 12 | -------------------------------------------------------------------------------- /tasks/rootfs/create-bosh-release-github-release-notes/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: version 12 | outputs: 13 | - name: release-body 14 | run: 15 | path: bash 16 | args: 17 | - "-cl" 18 | - "buildpacks-ci/tasks/rootfs/create-offline-bosh-release-github-release-notes/run.rb" 19 | params: 20 | STACK: 21 | -------------------------------------------------------------------------------- /tasks/rootfs/create-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: blob 12 | - name: version 13 | - name: release 14 | outputs: 15 | - name: release-artifacts 16 | params: 17 | STACK: 18 | BLOB_NAME: 19 | BLOB_GLOB: 20 | RELEASE_NAME: 21 | ACCESS_KEY_ID: 22 | SECRET_ACCESS_KEY: 23 | run: 24 | path: buildpacks-ci/tasks/rootfs/create-release/run.sh 25 | -------------------------------------------------------------------------------- /tasks/rootfs/rename-for-docker/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | mv stack-s3/"${STACK}"-*.tar.gz "docker-s3/${STACK}.tar.gz" 8 | -------------------------------------------------------------------------------- /tasks/rootfs/rename-for-docker/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: stack-s3 12 | outputs: 13 | - name: docker-s3 14 | run: 15 | path: buildpacks-ci/tasks/rootfs/rename-for-docker/run.sh 16 | params: 17 | STACK: 18 | -------------------------------------------------------------------------------- /tasks/rootfs/run-rootfs-smoke-test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | set -x 8 | 9 | pushd "bbl-state/$ENV_NAME" 10 | set +x 11 | eval "$(bbl print-env)" 12 | set -x 13 | trap "pkill -f ssh" EXIT 14 | popd 15 | 16 | bosh2 -d rootfs-smoke-test run-errand "${STACK}-smoke-test" 17 | -------------------------------------------------------------------------------- /tasks/rootfs/run-rootfs-smoke-test/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: bbl-state 12 | run: 13 | path: buildpacks-ci/tasks/rootfs/run-rootfs-smoke-test/run.sh 14 | params: 15 | ENV_NAME: 16 | STACK: 17 | -------------------------------------------------------------------------------- /tasks/rootfs/update-filename/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | source="stack-s3/${ROOTFS}-*.tar.gz" 8 | destination=rootfs-archive/${ROOTFS}-$(cat version/number).tar.gz 9 | 10 | # here, we actually want globbing, so: 11 | # shellcheck disable=SC2086 12 | mv $source "$destination" 13 | -------------------------------------------------------------------------------- /tasks/rootfs/update-filename/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: stack-s3 12 | - name: version 13 | outputs: 14 | - name: rootfs-archive 15 | run: 16 | path: buildpacks-ci/tasks/rootfs/update-filename/run.sh 17 | -------------------------------------------------------------------------------- /tasks/rootfs/update-receipt/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | cp receipt-s3/"${ROOTFS}"_receipt-* "rootfs/${ROOTFS}/${ROOTFS}_receipt" 8 | 9 | pushd rootfs 10 | version=$(cat ../version/number) 11 | git add "${ROOTFS}/${ROOTFS}_receipt" 12 | 13 | set +e 14 | git diff --cached --exit-code 15 | no_changes=$? 16 | set -e 17 | 18 | if [ $no_changes -ne 0 ] 19 | then 20 | git commit -m "Commit receipt for $version" 21 | else 22 | echo "No new changes to rootfs or receipt" 23 | fi 24 | popd 25 | 26 | rsync -a rootfs/ new-rootfs-commit 27 | -------------------------------------------------------------------------------- /tasks/rootfs/update-receipt/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: receipt-s3 12 | - name: rootfs 13 | - name: version 14 | outputs: 15 | - name: new-rootfs-commit 16 | run: 17 | path: buildpacks-ci/tasks/rootfs/update-receipt/run.sh 18 | params: 19 | ROOTFS: 20 | -------------------------------------------------------------------------------- /tasks/run-bp-brats-jammy/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o pipefail 5 | 6 | pushd buildpack > /dev/null 7 | if [ ! -f ./go.mod ]; then 8 | export GOPATH=$PWD 9 | fi 10 | export GOBIN=$PWD/.bin 11 | export PATH=$GOBIN:$PATH 12 | popd > /dev/null 13 | 14 | if [[ -e "${PWD}/buildpack/scripts/.util/tools.sh" ]]; then 15 | # shellcheck disable=SC1091 16 | source "${PWD}/buildpack/scripts/.util/tools.sh" 17 | util::tools::cf::install --directory "${PWD}/buildpack/.bin" 18 | fi 19 | 20 | "./cf-space/login" 21 | 22 | pushd buildpack > /dev/null 23 | ./scripts/brats.sh 24 | popd > /dev/null 25 | -------------------------------------------------------------------------------- /tasks/run-bp-brats-jammy/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/test-on-jammy 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: cf-space 13 | 14 | run: 15 | path: buildpacks-ci/tasks/run-bp-brats/run.sh 16 | params: 17 | CF_STACK: 18 | GINKGO_ATTEMPTS: 19 | GINKGO_NODES: 20 | -------------------------------------------------------------------------------- /tasks/run-bp-brats/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o pipefail 5 | 6 | pushd buildpack > /dev/null 7 | if [ ! -f ./go.mod ]; then 8 | export GOPATH=$PWD 9 | fi 10 | export GOBIN=$PWD/.bin 11 | export PATH=$GOBIN:$PATH 12 | popd > /dev/null 13 | 14 | if [[ -e "${PWD}/buildpack/scripts/.util/tools.sh" ]]; then 15 | # shellcheck disable=SC1091 16 | source "${PWD}/buildpack/scripts/.util/tools.sh" 17 | util::tools::cf::install --directory "${PWD}/buildpack/.bin" 18 | fi 19 | 20 | "./cf-space/login" 21 | 22 | pushd buildpack > /dev/null 23 | ./scripts/brats.sh 24 | popd > /dev/null 25 | -------------------------------------------------------------------------------- /tasks/run-bp-brats/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: cf-space 13 | 14 | run: 15 | path: buildpacks-ci/tasks/run-bp-brats/run.sh 16 | params: 17 | CF_STACK: 18 | GINKGO_ATTEMPTS: 19 | GINKGO_NODES: 20 | -------------------------------------------------------------------------------- /tasks/run-buildpack-integration-specs/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | set -o errexit 3 | set -o nounset 4 | set -o pipefail 5 | 6 | if [[ -e "${PWD}/buildpack/scripts/.util/tools.sh" ]]; then 7 | # shellcheck disable=SC1091 8 | source "${PWD}/buildpack/scripts/.util/tools.sh" 9 | util::tools::cf::install --directory "${PWD}/buildpack/.bin" 10 | fi 11 | 12 | "./cf-space/login" 13 | 14 | if [[ -d "uncached-buildpack" ]]; then 15 | UNCACHED_BUILDPACK_FILE="$(realpath "$(find ./uncached-buildpack -name "*.zip")")" 16 | export UNCACHED_BUILDPACK_FILE 17 | fi 18 | 19 | if [[ -d "cached-buildpack" ]]; then 20 | CACHED_BUILDPACK_FILE="$(realpath "$(find ./cached-buildpack -name "*.zip")")" 21 | export CACHED_BUILDPACK_FILE 22 | fi 23 | 24 | cd buildpack 25 | 26 | if [[ -z ${SKIP_DOCKER_START:-} ]]; then 27 | echo "Start Docker" 28 | #shellcheck source=../../scripts/start-docker 29 | source ../buildpacks-ci/scripts/start-docker 30 | util::docker::start 31 | trap util::docker::stop EXIT 32 | fi 33 | 34 | ./scripts/integration.sh 35 | -------------------------------------------------------------------------------- /tasks/run-buildpack-integration-specs/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | - name: cf-space 13 | - name: uncached-buildpack 14 | optional: true 15 | - name: cached-buildpack 16 | optional: true 17 | run: 18 | path: buildpacks-ci/tasks/run-buildpack-integration-specs/run.sh 19 | params: 20 | CF_STACK: 21 | GINKGO_ATTEMPTS: 22 | GINKGO_NODES: 23 | SKIP_DOCKER_START: 24 | COMPOSER_GITHUB_OAUTH_TOKEN: 25 | -------------------------------------------------------------------------------- /tasks/run-buildpack-unit-specs/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | set -o errexit 3 | set -o nounset 4 | set -o pipefail 5 | 6 | cd buildpack 7 | 8 | if [[ ${DOCKER_START} == "true" ]]; then 9 | echo "Start Docker" 10 | #shellcheck source=../../scripts/start-docker 11 | source ../buildpacks-ci/scripts/start-docker 12 | util::docker::start 13 | trap util::docker::stop EXIT 14 | fi 15 | 16 | ./scripts/unit.sh 17 | -------------------------------------------------------------------------------- /tasks/run-buildpack-unit-specs/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | run: 13 | path: buildpacks-ci/tasks/run-buildpack-unit-specs/run.sh 14 | params: 15 | STACKS: 16 | GINKGO_ATTEMPTS: 17 | GINKGO_NODES: 18 | DOCKER_START: 19 | -------------------------------------------------------------------------------- /tasks/run-rootfs-smoke-test/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -x 4 | 5 | pushd "bbl-state/$ENV_NAME" 6 | set +x 7 | eval "$(bbl print-env)" 8 | set -x 9 | trap "pkill -f ssh" EXIT 10 | popd 11 | 12 | bosh -d rootfs-smoke-test run-errand "$ENV_NAME-smoke-test" 13 | -------------------------------------------------------------------------------- /tasks/run-rootfs-smoke-test/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cloudfoundry/cf-deployment-concourse-tasks 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: bbl-state 12 | run: 13 | path: buildpacks-ci/tasks/run-rootfs-smoke-test/run.sh 14 | params: 15 | ENV_NAME: 16 | -------------------------------------------------------------------------------- /tasks/set-status-success/run.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'octokit' 3 | 4 | ## Required 5 | GITHUB_ACCESS_TOKEN = ENV.fetch('GITHUB_ACCESS_TOKEN') or raise 'Must supply env GITHUB_ACCESS_TOKEN' 6 | GITHUB_REPO = ENV.fetch('GITHUB_REPO') or raise 'Must supply env GITHUB_REPO' 7 | GITHUB_STATUS_CONTEXT = ENV.fetch('GITHUB_STATUS_CONTEXT') or raise 'Must supply env GITHUB_STATUS_CONTEXT' 8 | PIPELINE_URI = ENV.fetch('PIPELINE_URI') or raise 'Must supply env PIPELINE_URI' 9 | 10 | ## Optional (with default) 11 | GITHUB_STATUS_DESCRIPTION = ENV.fetch('GITHUB_STATUS_DESCRIPTION', 'Buildpacks CI build success') 12 | 13 | Octokit.configure do |c| 14 | c.access_token = GITHUB_ACCESS_TOKEN 15 | end 16 | 17 | sha = Dir.chdir('repo') do 18 | `git rev-parse HEAD`.chomp 19 | end 20 | 21 | puts "Setting status success on #{GITHUB_REPO}" 22 | puts "sha: #{sha}" 23 | puts "context: #{GITHUB_STATUS_CONTEXT}" 24 | puts "description: #{GITHUB_STATUS_DESCRIPTION}" 25 | puts "target_url: #{PIPELINE_URI}" 26 | Octokit.create_status( 27 | GITHUB_REPO, 28 | sha, 29 | 'success', 30 | context: GITHUB_STATUS_CONTEXT, 31 | description: GITHUB_STATUS_DESCRIPTION, 32 | target_url: PIPELINE_URI 33 | ) 34 | 35 | -------------------------------------------------------------------------------- /tasks/set-status-success/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: repo 12 | 13 | run: 14 | path: bash 15 | args: 16 | - -cl 17 | - buildpacks-ci/tasks/set-status-success/run.rb 18 | 19 | params: 20 | GITHUB_ACCESS_TOKEN: 21 | GITHUB_REPO: 22 | GITHUB_STATUS_CONTEXT: 23 | GITHUB_STATUS_DESCRIPTION: 24 | TEST_CREDENTIAL_FILTER_WHITELIST: GITHUB_REPO,GITHUB_STATUS_CONTEXT,GITHUB_STATUS_DESCRIPTION,PIPELINE_URI 25 | 26 | -------------------------------------------------------------------------------- /tasks/set-test-configuration/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "encoding/json" 5 | "io/ioutil" 6 | "log" 7 | "os" 8 | 9 | "github.com/cloudfoundry/dagger" 10 | ) 11 | 12 | func main() { 13 | configFilepath := os.Args[1] 14 | stack := os.Args[2] 15 | 16 | config, err := dagger.ParseConfig(configFilepath) 17 | if err != nil { 18 | log.Fatal(err) 19 | } 20 | if config.Builder != stack { 21 | config.Builder = stack 22 | updatedConfigBytes, _ := json.Marshal(&config) 23 | err = ioutil.WriteFile(configFilepath, updatedConfigBytes, 0644) 24 | if err != nil { 25 | log.Fatal(err) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /tasks/set-test-configuration/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | set -x 8 | 9 | config_filepath="$(realpath repo/integration/config.json)" 10 | 11 | pushd buildpacks-ci/tasks/set-test-configuration 12 | go run -mod=vendor main.go "$config_filepath" "$STACK" 13 | popd 14 | -------------------------------------------------------------------------------- /tasks/set-test-configuration/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: repo 12 | outputs: 13 | - name: repo 14 | 15 | run: 16 | path: buildpacks-ci/tasks/set-test-configuration/run.sh 17 | 18 | params: 19 | STACK: 20 | -------------------------------------------------------------------------------- /tasks/update-buildpack-dependency/php_manifest.rb: -------------------------------------------------------------------------------- 1 | class PHPManifest 2 | def self.update_defaults(manifest, target_name, resource_version) 3 | manifest['default_versions'].map do |default| 4 | if default['name'] == target_name 5 | if default['name'] == 'nginx' 6 | # For nginx, we update defaults only when a mainline version updates. 7 | # Mainline versions are identified by having an odd number as the minor (e.g. 1.27.2) 8 | if Gem::Version.new(resource_version).segments[1].odd? 9 | default['version'] = resource_version 10 | end 11 | else 12 | default['version'] = resource_version 13 | end 14 | end 15 | default 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /tasks/update-buildpack-dependency/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: cfbuildpacks 8 | password: ((buildpacks/dockerhub/cfbuildpacks.token)) 9 | inputs: 10 | - name: buildpack 11 | - name: buildpack-latest-released 12 | - name: buildpacks-ci 13 | - name: source 14 | - name: builds 15 | outputs: 16 | - name: artifacts 17 | run: 18 | path: ruby 19 | args: 20 | - buildpacks-ci/tasks/update-buildpack-dependency/run.rb 21 | params: 22 | GPG_SIGNING_KEY_ID: 23 | GPG_SIGNING_KEY: 24 | VERSION_LINE_TYPE: 25 | VERSION_LINE: 26 | REMOVAL_STRATEGY: 27 | DEPRECATION_DATE: 28 | DEPRECATION_LINK: 29 | DEPRECATION_MATCH: 30 | -------------------------------------------------------------------------------- /tasks/update-compile-extensions/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | set -x 8 | 9 | pushd buildpack/compile-extensions 10 | git checkout master 11 | git pull origin master 12 | if [ ! -z "$RUBYGEM_MIRROR" ]; then 13 | bundle config mirror.https://rubygems.org "${RUBYGEM_MIRROR}" 14 | fi 15 | export BUNDLE_GEMFILE=$PWD/Gemfile 16 | bundle install --deployment 17 | bundle cache 18 | bundle exec rspec 19 | compile_extensions_head=$(git rev-parse HEAD) 20 | popd 21 | 22 | pushd buildpack 23 | git add compile-extensions/ 24 | 25 | set +e 26 | git diff --cached --exit-code 27 | no_changes=$? 28 | set -e 29 | 30 | if [ $no_changes -ne 0 ] 31 | then 32 | git commit -m "Update compile-extensions to $compile_extensions_head" 33 | else 34 | echo "compile-extensions in buildpack is up to date" 35 | fi 36 | popd 37 | 38 | rsync -a buildpack/ buildpack-artifacts 39 | -------------------------------------------------------------------------------- /tasks/update-compile-extensions/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | caches: 13 | - path: buildpack/compile-extensions/vendor 14 | outputs: 15 | - name: buildpack-artifacts 16 | run: 17 | path: buildpacks-ci/tasks/update-compile-extensions/run.sh 18 | -------------------------------------------------------------------------------- /tasks/update-gem-in-gemfile/run.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | set -x 8 | 9 | GEM_VERSION=$(cat gem/version) 10 | NEW_VERSION_LINE="gem '$GEM_NAME', git: '$GEM_GIT_REPOSITORY', tag: 'v$GEM_VERSION'" 11 | 12 | pushd repo-with-gemfile 13 | sed -i "s|^gem '$GEM_NAME'.*$|$NEW_VERSION_LINE|" "$GEMFILE_NAME" 14 | if [ ! -z "$RUBYGEM_MIRROR" ]; then 15 | bundle config mirror.https://rubygems.org "${RUBYGEM_MIRROR}" 16 | fi 17 | BUNDLE_GEMFILE="$GEMFILE_NAME" bundle install --jobs="$(nproc)" 18 | git add "$GEMFILE_NAME" "$GEMFILE_NAME.lock" 19 | 20 | set +e 21 | git diff --cached --exit-code 22 | no_changes=$? 23 | set -e 24 | 25 | if [ $no_changes -ne 0 ] 26 | then 27 | git commit -m "Update $GEM_NAME to $GEM_VERSION" 28 | else 29 | echo "$GEM_NAME in $GEMFILE_NAME is up to date" 30 | fi 31 | popd 32 | 33 | rsync -a repo-with-gemfile/ repo-with-gemfile-artifacts 34 | -------------------------------------------------------------------------------- /tasks/update-gem-in-gemfile/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: gem 11 | - name: buildpacks-ci 12 | - name: repo-with-gemfile 13 | outputs: 14 | - name: repo-with-gemfile-artifacts 15 | run: 16 | path: buildpacks-ci/tasks/update-gem-in-gemfile/run.sh 17 | params: 18 | RUBYGEM_MIRROR: 19 | GEM_NAME: 20 | GEM_GIT_REPOSITORY: 21 | GEMFILE_NAME: 22 | -------------------------------------------------------------------------------- /tasks/update-libbuildpack/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: buildpack 12 | outputs: 13 | - name: buildpack 14 | run: 15 | path: buildpacks-ci/tasks/update-libbuildpack/run.sh 16 | params: 17 | LANGUAGE: 18 | SHIM: -------------------------------------------------------------------------------- /tasks/update-rootfs-filename/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | SUFFIX="${ROOTFS_SUFFIX-}" 8 | 9 | source="stack-s3/${STACK}${SUFFIX}-*.tar.gz" 10 | destination="rootfs-archive/${STACK}${SUFFIX}-$(cat version/number).tar.gz" 11 | 12 | # here, we actually want globbing, so: 13 | # shellcheck disable=SC2086 14 | mv $source "$destination" 15 | -------------------------------------------------------------------------------- /tasks/update-rootfs-filename/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: stack-s3 12 | - name: version 13 | outputs: 14 | - name: rootfs-archive 15 | run: 16 | path: buildpacks-ci/tasks/update-rootfs-filename/run.sh 17 | params: 18 | STACK: 19 | -------------------------------------------------------------------------------- /tasks/update-rootfs-receipt/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | receipt_file="receipt.${STACK}.x86_64" 8 | 9 | cp "receipt-s3/${receipt_file}"-* "rootfs/${receipt_file}" 10 | 11 | pushd rootfs 12 | version=$(cat ../version/number) 13 | git add "${receipt_file}" 14 | 15 | set +e 16 | git diff --cached --exit-code 17 | no_changes=$? 18 | set -e 19 | 20 | if [ $no_changes -ne 0 ] 21 | then 22 | git commit -m "Commit receipt for $version" 23 | else 24 | echo "No new changes to rootfs or receipt" 25 | fi 26 | popd 27 | 28 | rsync -a rootfs/ new-rootfs-commit 29 | -------------------------------------------------------------------------------- /tasks/update-rootfs-receipt/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: receipt-s3 12 | - name: rootfs 13 | - name: version 14 | outputs: 15 | - name: new-rootfs-commit 16 | run: 17 | path: buildpacks-ci/tasks/update-rootfs-receipt/run.sh 18 | params: 19 | STACK: 20 | -------------------------------------------------------------------------------- /tasks/upload-bosh-release/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | set -xeuo pipefail 3 | 4 | echo "Targeting bosh director..." 5 | pushd "bbl-state/$BBL_STATE_DIR" 6 | set +x 7 | eval "$(bbl print-env)" 8 | set -x 9 | popd 10 | 11 | echo "Uploading any matching releases..." 12 | pushd bosh-release 13 | # shellcheck disable=SC2086 14 | bosh upload-release $RELEASE 15 | popd 16 | 17 | echo "All done." 18 | -------------------------------------------------------------------------------- /tasks/upload-bosh-release/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | tag: bbl-6 # TODO cut this back after all pipelines migrate to bbl 6 8 | username: ((coredeps-dockerhub-user.username)) 9 | password: ((coredeps-dockerhub-user.password)) 10 | inputs: 11 | - name: buildpacks-ci 12 | - name: bosh-release 13 | - name: bbl-state 14 | 15 | run: 16 | path: buildpacks-ci/tasks/upload-bosh-release/run.sh 17 | params: 18 | BBL_STATE_DIR: 19 | RELEASE: 20 | -------------------------------------------------------------------------------- /tasks/use-new-buildpack-bosh-releases/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -l 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | version=$(date +%s) 8 | 9 | for language in binary dotnet-core go java nodejs php python ruby staticfile; do 10 | pushd "$language-buildpack-release" 11 | bosh2 create-release --tarball "../built-buildpacks-artifacts/$language-buildpack-$version.tgz" --name "$language-buildpack" --version "$version" 12 | popd 13 | 14 | cat <> buildpacks-opsfile/use-latest-buildpack-releases.yml 15 | - path: /releases/name=$language-buildpack/version? 16 | type: replace 17 | value: $version 18 | 19 | EOF 20 | done 21 | -------------------------------------------------------------------------------- /tasks/use-new-buildpack-bosh-releases/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: java-buildpack-release 11 | - name: go-buildpack-release 12 | - name: python-buildpack-release 13 | - name: nodejs-buildpack-release 14 | - name: ruby-buildpack-release 15 | - name: php-buildpack-release 16 | - name: staticfile-buildpack-release 17 | - name: binary-buildpack-release 18 | - name: dotnet-core-buildpack-release 19 | - name: buildpacks-ci 20 | outputs: 21 | - name: buildpacks-opsfile 22 | - name: built-buildpacks-artifacts 23 | run: 24 | path: buildpacks-ci/tasks/use-new-buildpack-bosh-releases/run.sh 25 | params: 26 | -------------------------------------------------------------------------------- /tasks/verify-buildpack-binaries/run.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | 3 | buildpacks_ci_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) 4 | require_relative "#{buildpacks_ci_dir}/lib/buildpack-binary-checksum-verifier" 5 | 6 | # uris that should not be checked because the binaries are already replaced and 7 | # we have vetted these uris/agree that they're not a concern 8 | whitelist_file = File.join(Dir.pwd, 'verification-whitelist', 'binary-verification-whitelist' , 'whitelist.yml') 9 | 10 | all_checksums_correct = true 11 | Dir["*-buildpack"].each do |buildpack| 12 | puts "Now validating checksums for the #{buildpack}" 13 | buildpack_dir = File.join(Dir.pwd, buildpack) 14 | all_checksums_correct = false unless BuildpackBinaryChecksumVerifier.run!(buildpack_dir, whitelist_file) 15 | end 16 | 17 | if all_checksums_correct 18 | puts "All checksums in buildpack release manifests are correct." 19 | else 20 | puts "There were checksums in buildpack release manifests that did not match up with the actual artifacts." 21 | exit 1 22 | end 23 | -------------------------------------------------------------------------------- /tasks/verify-buildpack-binaries/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: verification-whitelist 12 | - name: nodejs-buildpack 13 | - name: ruby-buildpack 14 | - name: go-buildpack 15 | - name: python-buildpack 16 | - name: staticfile-buildpack 17 | - name: binary-buildpack 18 | - name: php-buildpack 19 | - name: dotnet-core-buildpack 20 | - name: hwc-buildpack 21 | outputs: 22 | - name: buildpack-artifacts 23 | run: 24 | path: buildpacks-ci/tasks/verify-buildpack-binaries/run.rb 25 | -------------------------------------------------------------------------------- /tasks/write-cats-config/task.yml: -------------------------------------------------------------------------------- 1 | --- 2 | platform: linux 3 | image_resource: 4 | type: docker-image 5 | source: 6 | repository: cfbuildpacks/ci 7 | username: ((coredeps-dockerhub-user.username)) 8 | password: ((coredeps-dockerhub-user.password)) 9 | inputs: 10 | - name: buildpacks-ci 11 | - name: cf-admin-password 12 | - name: bbl-state 13 | outputs: 14 | - name: integration-config 15 | run: 16 | path: "buildpacks-ci/tasks/write-cats-config/run.rb" 17 | params: 18 | APPS_DOMAIN: 19 | DIEGO_DOCKER_ON: 20 | CREDHUB_MODE: 21 | CREDHUB_CLIENT_SECRET: 22 | CREDHUB_CLIENT: 23 | WINDOWS_STACK: 24 | ENV_NAME: 25 | -------------------------------------------------------------------------------- /util/print.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eu 4 | set -o pipefail 5 | 6 | function util::print::title() { 7 | local blue reset message 8 | blue="\033[0;34m" 9 | reset="\033[0;39m" 10 | message="${1}" 11 | 12 | echo -e "\n${blue}${message}${reset}" >&2 13 | } 14 | 15 | function util::print::info() { 16 | local message 17 | message="${1}" 18 | 19 | echo -e "${message}" >&2 20 | } 21 | 22 | function util::print::error() { 23 | local message red reset 24 | message="${1}" 25 | red="\033[0;31m" 26 | reset="\033[0;39m" 27 | 28 | echo -e "${red}${message}${reset}" >&2 29 | exit 1 30 | } 31 | 32 | function util::print::success() { 33 | local message green reset 34 | message="${1}" 35 | green="\033[0;32m" 36 | reset="\033[0;39m" 37 | 38 | echo -e "${green}${message}${reset}" >&2 39 | exit 0 40 | } 41 | 42 | function util::print::warn() { 43 | local message yellow reset 44 | message="${1}" 45 | yellow="\033[0;33m" 46 | reset="\033[0;39m" 47 | 48 | echo -e "${yellow}${message}${reset}" >&2 49 | exit 0 50 | } 51 | 52 | function util::print::printf() { 53 | local message 54 | message="${1}" 55 | 56 | printf "%s" "${message}" 57 | } 58 | -------------------------------------------------------------------------------- /vendor/code.cloudfoundry.org/lager/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project contains software that is Copyright (c) 2014-2015 Pivotal Software, Inc. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | 17 | This project may include a number of subcomponents with separate 18 | copyright notices and license terms. Your use of these subcomponents 19 | is subject to the terms and conditions of each subcomponent's license, 20 | as noted in the LICENSE file. 21 | -------------------------------------------------------------------------------- /vendor/code.cloudfoundry.org/lager/package.go: -------------------------------------------------------------------------------- 1 | package lager // import "code.cloudfoundry.org/lager" 2 | -------------------------------------------------------------------------------- /vendor/code.cloudfoundry.org/lager/reconfigurable_sink.go: -------------------------------------------------------------------------------- 1 | package lager 2 | 3 | import "sync/atomic" 4 | 5 | type ReconfigurableSink struct { 6 | sink Sink 7 | 8 | minLogLevel int32 9 | } 10 | 11 | func NewReconfigurableSink(sink Sink, initialMinLogLevel LogLevel) *ReconfigurableSink { 12 | return &ReconfigurableSink{ 13 | sink: sink, 14 | 15 | minLogLevel: int32(initialMinLogLevel), 16 | } 17 | } 18 | 19 | func (sink *ReconfigurableSink) Log(log LogFormat) { 20 | minLogLevel := LogLevel(atomic.LoadInt32(&sink.minLogLevel)) 21 | 22 | if log.LogLevel < minLogLevel { 23 | return 24 | } 25 | 26 | sink.sink.Log(log) 27 | } 28 | 29 | func (sink *ReconfigurableSink) SetMinLevel(level LogLevel) { 30 | atomic.StoreInt32(&sink.minLogLevel, int32(level)) 31 | } 32 | 33 | func (sink *ReconfigurableSink) GetMinLevel() LogLevel { 34 | return LogLevel(atomic.LoadInt32(&sink.minLogLevel)) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | install: 11 | - go install ./... 12 | - go get github.com/BurntSushi/toml-test 13 | script: 14 | - export PATH="$PATH:$HOME/gopath/bin" 15 | - make test 16 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COPYING: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 TOML authors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package toml provides facilities for decoding and encoding TOML configuration 3 | files via reflection. There is also support for delaying decoding with 4 | the Primitive type, and querying the set of keys in a TOML document with the 5 | MetaData type. 6 | 7 | The specification implemented: https://github.com/toml-lang/toml 8 | 9 | The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify 10 | whether a file is a valid TOML document. It can also be used to print the 11 | type of each key in a TOML document. 12 | 13 | Testing 14 | 15 | There are two important types of tests used for this package. The first is 16 | contained inside '*_test.go' files and uses the standard Go unit testing 17 | framework. These tests are primarily devoted to holistically testing the 18 | decoder and encoder. 19 | 20 | The second type of testing is used to verify the implementation's adherence 21 | to the TOML specification. These tests have been factored into their own 22 | project: https://github.com/BurntSushi/toml-test 23 | 24 | The reason the tests are in a separate project is so that they can be used by 25 | any implementation of TOML. Namely, it is language agnostic. 26 | */ 27 | package toml 28 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.6.x 5 | - 1.7.x 6 | - 1.8.x 7 | - 1.9.x 8 | - 1.10.x 9 | - 1.11.x 10 | - 1.12.x 11 | - tip 12 | 13 | # Setting sudo access to false will let Travis CI use containers rather than 14 | # VMs to run the tests. For more details see: 15 | # - http://docs.travis-ci.com/user/workers/container-based-infrastructure/ 16 | # - http://docs.travis-ci.com/user/workers/standard-infrastructure/ 17 | sudo: false 18 | 19 | script: 20 | - make setup 21 | - make test 22 | 23 | notifications: 24 | webhooks: 25 | urls: 26 | - https://webhooks.gitter.im/e/06e3328629952dabe3e0 27 | on_success: change # options: [always|never|change] default: always 28 | on_failure: always # options: [always|never|change] default: always 29 | on_start: never # options: [always|never|change] default: always 30 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014-2019, Matt Butcher and Matt Farina 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: setup 2 | setup: 3 | go get -u gopkg.in/alecthomas/gometalinter.v1 4 | gometalinter.v1 --install 5 | 6 | .PHONY: test 7 | test: validate lint 8 | @echo "==> Running tests" 9 | go test -v 10 | 11 | .PHONY: validate 12 | validate: 13 | @echo "==> Running static validations" 14 | @gometalinter.v1 \ 15 | --disable-all \ 16 | --enable deadcode \ 17 | --severity deadcode:error \ 18 | --enable gofmt \ 19 | --enable gosimple \ 20 | --enable ineffassign \ 21 | --enable misspell \ 22 | --enable vet \ 23 | --tests \ 24 | --vendor \ 25 | --deadline 60s \ 26 | ./... || exit_code=1 27 | 28 | .PHONY: lint 29 | lint: 30 | @echo "==> Running linters" 31 | @gometalinter.v1 \ 32 | --disable-all \ 33 | --enable golint \ 34 | --vendor \ 35 | --deadline 60s \ 36 | ./... || : 37 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\Masterminds\semver 4 | shallow_clone: true 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | install: 13 | - go version 14 | - go env 15 | - go get -u gopkg.in/alecthomas/gometalinter.v1 16 | - set PATH=%PATH%;%GOPATH%\bin 17 | - gometalinter.v1.exe --install 18 | 19 | build_script: 20 | - go install -v ./... 21 | 22 | test_script: 23 | - "gometalinter.v1 \ 24 | --disable-all \ 25 | --enable deadcode \ 26 | --severity deadcode:error \ 27 | --enable gofmt \ 28 | --enable gosimple \ 29 | --enable ineffassign \ 30 | --enable misspell \ 31 | --enable vet \ 32 | --tests \ 33 | --vendor \ 34 | --deadline 60s \ 35 | ./... || exit_code=1" 36 | - "gometalinter.v1 \ 37 | --disable-all \ 38 | --enable golint \ 39 | --vendor \ 40 | --deadline 60s \ 41 | ./... || :" 42 | - go test -v 43 | 44 | deploy: off 45 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/collection.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | // Collection is a collection of Version instances and implements the sort 4 | // interface. See the sort package for more details. 5 | // https://golang.org/pkg/sort/ 6 | type Collection []*Version 7 | 8 | // Len returns the length of a collection. The number of Version instances 9 | // on the slice. 10 | func (c Collection) Len() int { 11 | return len(c) 12 | } 13 | 14 | // Less is needed for the sort interface to compare two Version objects on the 15 | // slice. If checks if one is less than the other. 16 | func (c Collection) Less(i, j int) bool { 17 | return c[i].LessThan(c[j]) 18 | } 19 | 20 | // Swap is needed for the sort interface to replace the Version objects 21 | // at two different positions in the slice. 22 | func (c Collection) Swap(i, j int) { 23 | c[i], c[j] = c[j], c[i] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/Masterminds/semver/version_fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package semver 4 | 5 | func Fuzz(data []byte) int { 6 | if _, err := NewVersion(string(data)); err != nil { 7 | return 0 8 | } 9 | return 1 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | matrix: 3 | include: 4 | - go: 1.4.3 5 | - go: 1.5.4 6 | - go: 1.6.3 7 | - go: 1.7 8 | - go: tip 9 | allow_failures: 10 | - go: tip 11 | install: 12 | - go get golang.org/x/tools/cmd/cover 13 | - go get github.com/mattn/goveralls 14 | script: 15 | - echo "Test and track coverage" ; $HOME/gopath/bin/goveralls -package "." -service=travis-ci 16 | -repotoken $COVERALLS_TOKEN 17 | - echo "Build examples" ; cd examples && go build 18 | - echo "Check if gofmt'd" ; diff -u <(echo -n) <(gofmt -d -s .) 19 | env: 20 | global: 21 | secure: HroGEAUQpVq9zX1b1VIkraLiywhGbzvNnTZq2TMxgK7JHP8xqNplAeF1izrR2i4QLL9nsY+9WtYss4QuPvEtZcVHUobw6XnL6radF7jS1LgfYZ9Y7oF+zogZ2I5QUMRLGA7rcxQ05s7mKq3XZQfeqaNts4bms/eZRefWuaFZbkw= 22 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2014 Benedikt Lang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/json.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | // MarshalJSON implements the encoding/json.Marshaler interface. 8 | func (v Version) MarshalJSON() ([]byte, error) { 9 | return json.Marshal(v.String()) 10 | } 11 | 12 | // UnmarshalJSON implements the encoding/json.Unmarshaler interface. 13 | func (v *Version) UnmarshalJSON(data []byte) (err error) { 14 | var versionString string 15 | 16 | if err = json.Unmarshal(data, &versionString); err != nil { 17 | return 18 | } 19 | 20 | *v, err = Parse(versionString) 21 | 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "blang", 3 | "bugs": { 4 | "URL": "https://github.com/blang/semver/issues", 5 | "url": "https://github.com/blang/semver/issues" 6 | }, 7 | "gx": { 8 | "dvcsimport": "github.com/blang/semver" 9 | }, 10 | "gxVersion": "0.10.0", 11 | "language": "go", 12 | "license": "MIT", 13 | "name": "semver", 14 | "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", 15 | "version": "3.5.1" 16 | } 17 | 18 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sort.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "sort" 5 | ) 6 | 7 | // Versions represents multiple versions. 8 | type Versions []Version 9 | 10 | // Len returns length of version collection 11 | func (s Versions) Len() int { 12 | return len(s) 13 | } 14 | 15 | // Swap swaps two versions inside the collection by its indices 16 | func (s Versions) Swap(i, j int) { 17 | s[i], s[j] = s[j], s[i] 18 | } 19 | 20 | // Less checks if version at index i is less than version at index j 21 | func (s Versions) Less(i, j int) bool { 22 | return s[i].LT(s[j]) 23 | } 24 | 25 | // Sort sorts a slice of versions 26 | func Sort(versions []Version) { 27 | sort.Sort(Versions(versions)) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/blang/semver/sql.go: -------------------------------------------------------------------------------- 1 | package semver 2 | 3 | import ( 4 | "database/sql/driver" 5 | "fmt" 6 | ) 7 | 8 | // Scan implements the database/sql.Scanner interface. 9 | func (v *Version) Scan(src interface{}) (err error) { 10 | var str string 11 | switch src := src.(type) { 12 | case string: 13 | str = src 14 | case []byte: 15 | str = string(src) 16 | default: 17 | return fmt.Errorf("Version.Scan: cannot convert %T to string.", src) 18 | } 19 | 20 | if t, err := Parse(str); err == nil { 21 | *v = t 22 | } 23 | 24 | return 25 | } 26 | 27 | // Value implements the database/sql/driver.Valuer interface. 28 | func (v Version) Value() (driver.Value, error) { 29 | return v.String(), nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/NOTICE: -------------------------------------------------------------------------------- 1 | libbuildpack 2 | 3 | Copyright (c) the original author or authors. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | https://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/internal/arguments.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "fmt" 21 | "os" 22 | ) 23 | 24 | // Argument returns the specified argument from os.Args. It returns an error if there are not enough arguments to 25 | // satisfy the request. 26 | func Argument(index int) (string, error) { 27 | if len(os.Args) < index+1 { 28 | return "", fmt.Errorf("incorrect number of command line arguments") 29 | } 30 | 31 | return os.Args[index], nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/internal/file_exists.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "os" 21 | ) 22 | 23 | // FileExists returns whether a file exists taking into account various error cases. 24 | func FileExists(file string) (bool, error) { 25 | _, err := os.Stat(file) 26 | if err != nil { 27 | if os.IsNotExist(err) { 28 | return false, nil 29 | } 30 | 31 | return false, err 32 | } 33 | 34 | return true, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/internal/replace_args.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "os" 21 | "testing" 22 | ) 23 | 24 | // ReplaceArgs replaces the current command line arguments (os.Args) with a new collection of values. Returns a 25 | // function suitable for use with defer in order to reset the previous values 26 | // 27 | // defer ReplaceArgs(t, "alpha")() 28 | func ReplaceArgs(t *testing.T, args ...string) func() { 29 | t.Helper() 30 | 31 | previous := os.Args 32 | os.Args = args 33 | 34 | return func() { os.Args = previous } 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/internal/scratch_dir.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "io/ioutil" 21 | "path/filepath" 22 | "testing" 23 | ) 24 | 25 | // ScratchDir returns a safe scratch directory for tests to modify. 26 | func ScratchDir(t *testing.T, prefix string) string { 27 | t.Helper() 28 | 29 | tmp, err := ioutil.TempDir("", prefix) 30 | if err != nil { 31 | t.Fatal(err) 32 | } 33 | 34 | abs, err := filepath.EvalSymlinks(tmp) 35 | if err != nil { 36 | t.Fatal(err) 37 | } 38 | 39 | return abs 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/buildpack/libbuildpack/internal/touch_test_file.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package internal 18 | 19 | import ( 20 | "io/ioutil" 21 | "os" 22 | "path/filepath" 23 | "testing" 24 | ) 25 | 26 | // TouchTestFile writes a zero-length file during testing. 27 | func TouchTestFile(t *testing.T, elem ...string) { 28 | filename := filepath.Join(elem...) 29 | 30 | if err := os.MkdirAll(filepath.Dir(filename), 0755); err != nil { 31 | t.Fatal(err) 32 | } 33 | 34 | if err := ioutil.WriteFile(filename, []byte{}, 0644); err != nil { 35 | t.Fatal(err) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/dagger/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this project except in compliance with the License. 5 | 6 | This project may include a number of subcomponents with separate copyright notices 7 | and license terms. Your use of these subcomponents is subject to the terms and 8 | conditions of the subcomponent's license, as noted in the LICENSE file. 9 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/dagger/README.md: -------------------------------------------------------------------------------- 1 | # A Go library for working with V3 buildpacks 2 | 3 | # Dagger Setup: 4 | 5 | 1. install the [pack cli tool](from https://github.com/buildpack/pack) 6 | 1. install docker 7 | 1. Verify all tests pass using 8 | ``` 9 | go test -v ./... 10 | ``` 11 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/dagger/config.go: -------------------------------------------------------------------------------- 1 | package dagger 2 | 3 | import ( 4 | "bytes" 5 | "encoding/json" 6 | "io/ioutil" 7 | ) 8 | 9 | type TestConfig struct { 10 | Builder string `json:"builder"` 11 | BuildpackOrder map[string][]string `json:"buildpackOrder"` 12 | } 13 | 14 | func ParseConfig(configPath string) (TestConfig, error) { 15 | var config TestConfig 16 | configData, err := ioutil.ReadFile(configPath) 17 | if err != nil { 18 | return config, err 19 | } 20 | 21 | jsonReader := bytes.NewReader(configData) 22 | decoder := json.NewDecoder(jsonReader) 23 | decoder.Decode(&config) 24 | 25 | return config, nil 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/dagger/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cloudfoundry/dagger 2 | 3 | require ( 4 | code.cloudfoundry.org/lager v2.0.0+incompatible 5 | github.com/buildpack/libbuildpack v1.24.5 6 | github.com/cloudfoundry/libcfbuildpack v1.89.0 7 | github.com/cloudfoundry/packit v0.0.0-20191014140300-f8d2e0b20a04 8 | github.com/google/go-github v17.0.0+incompatible 9 | github.com/google/go-querystring v1.0.0 // indirect 10 | github.com/onsi/gomega v1.7.0 11 | github.com/pkg/errors v0.8.1 12 | github.com/sclevine/spec v1.3.0 13 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 14 | ) 15 | 16 | go 1.13 17 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/dagger/utils/utils.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "context" 5 | "fmt" 6 | "math/rand" 7 | "net/http" 8 | "os" 9 | 10 | "github.com/google/go-github/github" 11 | "golang.org/x/oauth2" 12 | ) 13 | 14 | func RandStringRunes(n int) string { 15 | runes := []rune("abcdefghijklmnopqrstuvwxyz1234567890") 16 | b := make([]rune, n) 17 | for i := range b { 18 | b[i] = runes[rand.Intn(len(runes))] 19 | } 20 | return string(b) 21 | } 22 | 23 | func NewGitClient(ctx context.Context) *github.Client { 24 | git_token := os.Getenv("GIT_TOKEN") 25 | 26 | ts := oauth2.StaticTokenSource( 27 | &oauth2.Token{AccessToken: git_token}, 28 | ) 29 | tc := oauth2.NewClient(ctx, ts) 30 | 31 | client := github.NewClient(tc) 32 | if git_token == "" { 33 | fmt.Println("Using unauthorized github api, consider setting the GIT_TOKEN environment variable") 34 | fmt.Println("More info on Github tokens here: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line") 35 | client = github.NewClient(http.DefaultClient) 36 | } 37 | 38 | return client 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/NOTICE: -------------------------------------------------------------------------------- 1 | libcfbuildpack 2 | 3 | Copyright (c) the original author or authors. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | https://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/helper/copy_file.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package helper 18 | 19 | import ( 20 | "os" 21 | ) 22 | 23 | // CopyFile copies source to destination. Before writing, it creates all required parent directories for the 24 | // destination. 25 | func CopyFile(source string, destination string) error { 26 | s, err := os.Open(source) 27 | if err != nil { 28 | return err 29 | } 30 | 31 | defer s.Close() 32 | 33 | i, err := s.Stat() 34 | if err != nil { 35 | return err 36 | } 37 | 38 | return WriteFileFromReader(destination, i.Mode(), s) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/helper/extract_tar.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package helper 18 | 19 | import ( 20 | "os" 21 | ) 22 | 23 | // ExtractTar extracts a source TAR file to a destination directory. An arbitrary number of top-level directory 24 | // components can be stripped from each path. 25 | func ExtractTar(source string, destination string, stripComponents int) error { 26 | f, err := os.Open(source) 27 | if err != nil { 28 | return err 29 | } 30 | defer f.Close() 31 | 32 | return handleTar(f, destination, stripComponents) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/helper/file_exists.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package helper 18 | 19 | import ( 20 | "os" 21 | ) 22 | 23 | // FileExists returns whether a file exists taking into account various error cases. 24 | func FileExists(file string) (bool, error) { 25 | _, err := os.Stat(file) 26 | if err != nil { 27 | if os.IsNotExist(err) { 28 | return false, nil 29 | } 30 | 31 | return false, err 32 | } 33 | 34 | return true, nil 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/helper/has_file.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package helper 18 | 19 | import ( 20 | "regexp" 21 | ) 22 | 23 | // HasFile searches a directory structure for a file matching the provided pattern, returning true if found. 24 | func HasFile(root string, pattern *regexp.Regexp) (bool, error) { 25 | f, err := FindFiles(root, pattern) 26 | if err != nil { 27 | return false, err 28 | } 29 | 30 | return len(f) > 0, nil 31 | 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/libcfbuildpack/helper/stripped_path.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package helper 18 | 19 | import ( 20 | "path/filepath" 21 | "strings" 22 | ) 23 | 24 | func strippedPath(source string, destination string, stripComponents int) string { 25 | components := strings.Split(source, string(filepath.Separator)) 26 | if len(components) <= stripComponents { 27 | return "" 28 | } 29 | 30 | return filepath.Join(append([]string{destination}, components[stripComponents:]...)...) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/cloudfoundry/packit/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/cloudfoundry/packit 2 | 3 | go 1.12 4 | 5 | require ( 6 | code.cloudfoundry.org/lager v2.0.0+incompatible 7 | github.com/onsi/ginkgo v1.10.2 8 | github.com/onsi/gomega v1.7.0 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2012-2016 Dave Collins 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-github/github/git.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The go-github AUTHORS. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package github 7 | 8 | // GitService handles communication with the git data related 9 | // methods of the GitHub API. 10 | // 11 | // GitHub API docs: https://developer.github.com/v3/git/ 12 | type GitService service 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-github/github/with_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The go-github AUTHORS. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build appengine 7 | 8 | // This file provides glue for making github work on App Engine. 9 | 10 | package github 11 | 12 | import ( 13 | "context" 14 | "net/http" 15 | ) 16 | 17 | func withContext(ctx context.Context, req *http.Request) *http.Request { 18 | // No-op because App Engine adds context to a request differently. 19 | return req 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/google/go-github/github/without_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The go-github AUTHORS. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !appengine 7 | 8 | // This file provides glue for making github work without App Engine. 9 | 10 | package github 11 | 12 | import ( 13 | "context" 14 | "net/http" 15 | ) 16 | 17 | func withContext(ctx context.Context, req *http.Request) *http.Request { 18 | return req.WithContext(ctx) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.11.x" 5 | - tip 6 | 7 | script: 8 | - go test 9 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.1.2 2 | 3 | * Fix error when decode hook decodes interface implementation into interface 4 | type. [GH-140] 5 | 6 | ## 1.1.1 7 | 8 | * Fix panic that can happen in `decodePtr` 9 | 10 | ## 1.1.0 11 | 12 | * Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] 13 | * Support struct to struct decoding [GH-137] 14 | * If source map value is nil, then destination map value is nil (instead of empty) 15 | * If source slice value is nil, then destination slice value is nil (instead of empty) 16 | * If source pointer is nil, then destination pointer is set to nil (instead of 17 | allocated zero value of type) 18 | 19 | ## 1.0.0 20 | 21 | * Initial tagged stable release. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Mitchell Hashimoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mitchellh/mapstructure 2 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 Onsi Fakhouri 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/onsi/gomega/types/types.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | type TWithHelper interface { 4 | Helper() 5 | } 6 | 7 | type GomegaFailHandler func(message string, callerSkip ...int) 8 | 9 | type GomegaFailWrapper struct { 10 | Fail GomegaFailHandler 11 | TWithHelper TWithHelper 12 | } 13 | 14 | //A simple *testing.T interface wrapper 15 | type GomegaTestingT interface { 16 | Fatalf(format string, args ...interface{}) 17 | } 18 | 19 | //All Gomega matchers must implement the GomegaMatcher interface 20 | // 21 | //For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding-your-own-matchers 22 | type GomegaMatcher interface { 23 | Match(actual interface{}) (success bool, err error) 24 | FailureMessage(actual interface{}) (message string) 25 | NegatedFailureMessage(actual interface{}) (message string) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.x 5 | - 1.5.x 6 | - 1.6.x 7 | - 1.7.x 8 | - 1.8.x 9 | - 1.9.x 10 | - 1.10.x 11 | - 1.11.x 12 | - tip 13 | 14 | script: 15 | - go test -v ./... 16 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/sclevine/spec/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | *.coverprofile 4 | *.test 5 | *~ 6 | -------------------------------------------------------------------------------- /vendor/github.com/sclevine/spec/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.11.x 4 | - 1.12.x 5 | go_import_path: github.com/sclevine/spec 6 | script: 7 | - env GO111MODULE=on go test ./... 8 | -------------------------------------------------------------------------------- /vendor/github.com/sclevine/spec/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sclevine/spec 2 | -------------------------------------------------------------------------------- /vendor/github.com/sclevine/spec/report/log.go: -------------------------------------------------------------------------------- 1 | package report 2 | 3 | import ( 4 | "io/ioutil" 5 | "testing" 6 | 7 | "github.com/sclevine/spec" 8 | ) 9 | 10 | // Log reports specs via the testing log methods and only affects verbose runs. 11 | type Log struct{} 12 | 13 | func (Log) Start(t *testing.T, plan spec.Plan) { 14 | t.Helper() 15 | t.Log("Suite:", plan.Text) 16 | t.Logf("Total: %d | Focused: %d | Pending: %d", plan.Total, plan.Focused, plan.Pending) 17 | if plan.HasRandom { 18 | t.Log("Random seed:", plan.Seed) 19 | } 20 | if plan.HasFocus { 21 | t.Log("Focus is active.") 22 | } 23 | } 24 | 25 | func (Log) Specs(t *testing.T, specs <-chan spec.Spec) { 26 | t.Helper() 27 | var passed, failed, skipped int 28 | for s := range specs { 29 | switch { 30 | case s.Failed: 31 | failed++ 32 | if testing.Verbose() { 33 | if out, err := ioutil.ReadAll(s.Out); err == nil { 34 | t.Logf("%s", out) 35 | } 36 | } 37 | case s.Skipped: 38 | skipped++ 39 | default: 40 | passed++ 41 | } 42 | } 43 | t.Logf("Passed: %d | Failed: %d | Skipped: %d", passed, failed, skipped) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012-2018 Mat Ryer and Tyler Bunnell 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentFormat}} 2 | func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/doc.go: -------------------------------------------------------------------------------- 1 | // Package require implements the same assertions as the `assert` package but 2 | // stops test execution when a test fails. 3 | // 4 | // Example Usage 5 | // 6 | // The following is a complete example using require in a standard test function: 7 | // import ( 8 | // "testing" 9 | // "github.com/stretchr/testify/require" 10 | // ) 11 | // 12 | // func TestSomething(t *testing.T) { 13 | // 14 | // var a string = "Hello" 15 | // var b string = "Hello" 16 | // 17 | // require.Equal(t, a, b, "The two words should be the same.") 18 | // 19 | // } 20 | // 21 | // Assertions 22 | // 23 | // The `require` package have same global functions as in the `assert` package, 24 | // but instead of returning a boolean result they call `t.FailNow()`. 25 | // 26 | // Every assertion function also takes an optional string message as the final argument, 27 | // allowing custom error messages to be appended to the message the assertion method outputs. 28 | package require 29 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/forward_requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl -include-format-funcs 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if h, ok := t.(tHelper); ok { h.Helper() } 4 | if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return } 5 | t.FailNow() 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | if h, ok := a.t.(tHelper); ok { h.Helper() } 4 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/xi2/xz/AUTHORS: -------------------------------------------------------------------------------- 1 | # Package xz authors 2 | 3 | Michael Cross 4 | 5 | # XZ Embedded authors 6 | 7 | Lasse Collin 8 | Igor Pavlov 9 | -------------------------------------------------------------------------------- /vendor/github.com/xi2/xz/LICENSE: -------------------------------------------------------------------------------- 1 | Licensing of github.com/xi2/xz 2 | ============================== 3 | 4 | This Go package is a modified version of 5 | 6 | XZ Embedded 7 | 8 | The contents of the testdata directory are modified versions of 9 | the test files from 10 | 11 | XZ Utils 12 | 13 | All the files in this package have been written by Michael Cross, 14 | Lasse Collin and/or Igor PavLov. All these files have been put 15 | into the public domain. You can do whatever you want with these 16 | files. 17 | 18 | This software is provided "as is", without any warranty. 19 | -------------------------------------------------------------------------------- /vendor/github.com/xi2/xz/README.md: -------------------------------------------------------------------------------- 1 | # Xz 2 | 3 | Package xz implements XZ decompression natively in Go. 4 | 5 | Documentation at . 6 | 7 | Download and install with `go get github.com/xi2/xz`. 8 | 9 | If you need compression as well as decompression, you might want to 10 | look at . 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/context/go19.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.9 6 | 7 | package context 8 | 9 | import "context" // standard library's context, as of Go 1.7 10 | 11 | // A Context carries a deadline, a cancelation signal, and other values across 12 | // API boundaries. 13 | // 14 | // Context's methods may be called by multiple goroutines simultaneously. 15 | type Context = context.Context 16 | 17 | // A CancelFunc tells an operation to abandon its work. 18 | // A CancelFunc does not wait for the work to stop. 19 | // After the first call, subsequent calls to a CancelFunc do nothing. 20 | type CancelFunc = context.CancelFunc 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - tip 5 | 6 | install: 7 | - export GOPATH="$HOME/gopath" 8 | - mkdir -p "$GOPATH/src/golang.org/x" 9 | - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" 10 | - go get -v -t -d golang.org/x/oauth2/... 11 | 12 | script: 13 | - go test -v golang.org/x/oauth2/... 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Go 2 | 3 | Go is an open source project. 4 | 5 | It is the work of hundreds of contributors. We appreciate your help! 6 | 7 | ## Filing issues 8 | 9 | When [filing an issue](https://github.com/golang/oauth2/issues), make sure to answer these five questions: 10 | 11 | 1. What version of Go are you using (`go version`)? 12 | 2. What operating system and processor architecture are you using? 13 | 3. What did you do? 14 | 4. What did you expect to see? 15 | 5. What did you see instead? 16 | 17 | General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. 18 | The gophers there will answer or ask you to file an issue if you've tripped over a bug. 19 | 20 | ## Contributing code 21 | 22 | Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) 23 | before sending patches. 24 | 25 | Unless otherwise noted, the Go source files are distributed under 26 | the BSD-style license found in the LICENSE file. 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/go.mod: -------------------------------------------------------------------------------- 1 | module golang.org/x/oauth2 2 | 3 | go 1.11 4 | 5 | require ( 6 | cloud.google.com/go v0.34.0 7 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e 8 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect 9 | google.golang.org/appengine v1.4.0 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= 4 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 5 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 6 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= 7 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 8 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= 9 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 10 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 11 | google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= 12 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/internal/client_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package internal 8 | 9 | import "google.golang.org/appengine/urlfetch" 10 | 11 | func init() { 12 | appengineClientHook = urlfetch.Client 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/internal/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package internal contains support packages for oauth2 package. 6 | package internal 7 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/internal/oauth2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "crypto/rsa" 9 | "crypto/x509" 10 | "encoding/pem" 11 | "errors" 12 | "fmt" 13 | ) 14 | 15 | // ParseKey converts the binary contents of a private key file 16 | // to an *rsa.PrivateKey. It detects whether the private key is in a 17 | // PEM container or not. If so, it extracts the the private key 18 | // from PEM container before conversion. It only supports PEM 19 | // containers with no passphrase. 20 | func ParseKey(key []byte) (*rsa.PrivateKey, error) { 21 | block, _ := pem.Decode(key) 22 | if block != nil { 23 | key = block.Bytes 24 | } 25 | parsedKey, err := x509.ParsePKCS8PrivateKey(key) 26 | if err != nil { 27 | parsedKey, err = x509.ParsePKCS1PrivateKey(key) 28 | if err != nil { 29 | return nil, fmt.Errorf("private key should be a PEM or plain PKCS1 or PKCS8; parse error: %v", err) 30 | } 31 | } 32 | parsed, ok := parsedKey.(*rsa.PrivateKey) 33 | if !ok { 34 | return nil, errors.New("private key is invalid") 35 | } 36 | return parsed, nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/oauth2/internal/transport.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "context" 9 | "net/http" 10 | ) 11 | 12 | // HTTPClient is the context key to use with golang.org/x/net/context's 13 | // WithValue function to associate an *http.Client value with a context. 14 | var HTTPClient ContextKey 15 | 16 | // ContextKey is just an empty struct. It exists so HTTPClient can be 17 | // an immutable public variable with a unique type. It's immutable 18 | // because nobody else can create a ContextKey, being unexported. 19 | type ContextKey struct{} 20 | 21 | var appengineClientHook func(context.Context) *http.Client 22 | 23 | func ContextClient(ctx context.Context) *http.Client { 24 | if ctx != nil { 25 | if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { 26 | return hc 27 | } 28 | } 29 | if appengineClientHook != nil { 30 | return appengineClientHook(ctx) 31 | } 32 | return http.DefaultClient 33 | } 34 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/app_id.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | func parseFullAppID(appid string) (partition, domain, displayID string) { 12 | if i := strings.Index(appid, "~"); i != -1 { 13 | partition, appid = appid[:i], appid[i+1:] 14 | } 15 | if i := strings.Index(appid, ":"); i != -1 { 16 | domain, appid = appid[:i], appid[i+1:] 17 | } 18 | return partition, domain, appid 19 | } 20 | 21 | // appID returns "appid" or "domain.com:appid". 22 | func appID(fullAppID string) string { 23 | _, dom, dis := parseFullAppID(fullAppID) 24 | if dom != "" { 25 | return dom + ":" + dis 26 | } 27 | return dis 28 | } 29 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/base/api_base.proto: -------------------------------------------------------------------------------- 1 | // Built-in base types for API calls. Primarily useful as return types. 2 | 3 | syntax = "proto2"; 4 | option go_package = "base"; 5 | 6 | package appengine.base; 7 | 8 | message StringProto { 9 | required string value = 1; 10 | } 11 | 12 | message Integer32Proto { 13 | required int32 value = 1; 14 | } 15 | 16 | message Integer64Proto { 17 | required int64 value = 1; 18 | } 19 | 20 | message BoolProto { 21 | required bool value = 1; 22 | } 23 | 24 | message DoubleProto { 25 | required double value = 1; 26 | } 27 | 28 | message BytesProto { 29 | required bytes value = 1 [ctype=CORD]; 30 | } 31 | 32 | message VoidProto { 33 | } 34 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/identity_flex.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Google LLC. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appenginevm 6 | 7 | package internal 8 | 9 | func init() { 10 | appengineFlex = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package internal 8 | 9 | import ( 10 | "appengine_internal" 11 | ) 12 | 13 | func Main() { 14 | MainPath = "" 15 | appengine_internal.Main() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/main_common.go: -------------------------------------------------------------------------------- 1 | package internal 2 | 3 | // MainPath stores the file path of the main package. On App Engine Standard 4 | // using Go version 1.9 and below, this will be unset. On App Engine Flex and 5 | // App Engine Standard second-gen (Go 1.11 and above), this will be the 6 | // filepath to package main. 7 | var MainPath string 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/appengine/internal/remote_api/remote_api.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | option go_package = "remote_api"; 3 | 4 | package remote_api; 5 | 6 | message Request { 7 | required string service_name = 2; 8 | required string method = 3; 9 | required bytes request = 4; 10 | optional string request_id = 5; 11 | } 12 | 13 | message ApplicationError { 14 | required int32 code = 1; 15 | required string detail = 2; 16 | } 17 | 18 | message RpcError { 19 | enum ErrorCode { 20 | UNKNOWN = 0; 21 | CALL_NOT_FOUND = 1; 22 | PARSE_ERROR = 2; 23 | SECURITY_VIOLATION = 3; 24 | OVER_QUOTA = 4; 25 | REQUEST_TOO_LARGE = 5; 26 | CAPABILITY_DISABLED = 6; 27 | FEATURE_DISABLED = 7; 28 | BAD_REQUEST = 8; 29 | RESPONSE_TOO_LARGE = 9; 30 | CANCELLED = 10; 31 | REPLAY_ERROR = 11; 32 | DEADLINE_EXCEEDED = 12; 33 | } 34 | required int32 code = 1; 35 | optional string detail = 2; 36 | } 37 | 38 | message Response { 39 | optional bytes response = 1; 40 | optional bytes exception = 2; 41 | optional ApplicationError application_error = 3; 42 | optional bytes java_exception = 4; 43 | optional RpcError rpc_error = 5; 44 | } 45 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - 1.7 8 | - 1.8 9 | - 1.9 10 | - tip 11 | 12 | go_import_path: gopkg.in/yaml.v2 13 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/go.mod: -------------------------------------------------------------------------------- 1 | module "gopkg.in/yaml.v2" 2 | 3 | require ( 4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 5 | ) 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | --------------------------------------------------------------------------------