From d2019369b682d1ae4b55f84d730ab0e1ce9a1326 Mon Sep 17 00:00:00 2001 From: Al Berez Date: Tue, 19 Apr 2022 11:49:06 -0700 Subject: [PATCH] [v8] Online release process with Github Actions (#2265) * Add Build-Sign-Release workflow Commit summary below Current state of CF CLI release infrastructure is offline and quite outdated. To make our release process more transparent and inclusive we decided to move build, signing and release processes online to Github Actions. * Split out release/upload part of workflow * Add capabilities to release workflow At this point working in a workflow separate from build, for separation of concerns between building&signing, and releasing. This is a squashed commit of the gha-allplatforms branch, consisting of the following changes : - Upload mac installer to S3 - include mac installer in github release - retrieve mac binaries in release job - add write permission to github release job - Add linux packages, and simplify CLAW upload steps - Switch to sync action to support simpler CLAW S3 upload step - Add linux packages to GH Release - Update artifact names in release jobs - aws s3 ls to debug s3 upload - bump aws s3 sync to non-default-region change * Updated for build, release, and units workflows * Add update-repos workflow Update-repos workflow is in charge of updating and signing on a repository level. This workflow should be triggered towards the end of the release process after all packages are available via distribution network (after CLAW update). It will update the following repositories: - Homebrew formula in homebrew-tap git repository - RPM repo hosted on S3 - Debian repo hosted on S3 Current implementations of the update-repos workflow is matching offline release process. Following updates are recommended: - Implement backup and disaster recovery procedure - Debian - fill license and vendor fields - RPM - sign on the repo level - Homebrew - add arm architecture * Release pipelines updates * Removes/Cleans comments Also, small change to sign-windows-binary.ps1 as that step was already being done in the sign job * Update github actions secrets template for use with the set-github-actions-env-vars.sh script, or the github cli's 'secret set' subcommand directly Co-authored-by: Alexander Berezovsky Co-authored-by: George Gelashvili Co-authored-by: Juan Diego Gonzalez Signed-off-by: Pete Levine --- .github/license/CF_NOTICE | 36 + .../license/LICENSE-WITH-3RD-PARTY-LICENSES | 1149 +++++++++++++++++ .github/release/gon.json | 14 + .github/secrets.template.envrc | 29 + .github/win/cf.ico | Bin 0 -> 13094 bytes .github/win/common.iss | 76 ++ .github/win/innosetup/Dockerfile | 19 + .github/win/install-innosetup.ps1 | 18 + .github/win/run-innosetup.ps1 | 20 + .github/win/sign-windows-binary.ps1 | 9 + .github/win/windows-installer-v8-x64.iss | 51 + .github/win/windows-installer-v8-x86.iss | 31 + .github/workflows/build-sign-upload.yml | 880 +++++++++++++ .github/workflows/code-quality.yml | 3 + .github/workflows/units.yml | 133 +- .github/workflows/update-repos.yml | 416 ++++++ .gitignore | 2 + Makefile | 17 +- bin/bump-version | 19 +- bin/generate-release-notes | 2 +- 20 files changed, 2846 insertions(+), 78 deletions(-) create mode 100644 .github/license/CF_NOTICE create mode 100644 .github/license/LICENSE-WITH-3RD-PARTY-LICENSES create mode 100644 .github/release/gon.json create mode 100644 .github/secrets.template.envrc create mode 100644 .github/win/cf.ico create mode 100644 .github/win/common.iss create mode 100644 .github/win/innosetup/Dockerfile create mode 100644 .github/win/install-innosetup.ps1 create mode 100644 .github/win/run-innosetup.ps1 create mode 100644 .github/win/sign-windows-binary.ps1 create mode 100644 .github/win/windows-installer-v8-x64.iss create mode 100644 .github/win/windows-installer-v8-x86.iss create mode 100644 .github/workflows/build-sign-upload.yml create mode 100644 .github/workflows/update-repos.yml diff --git a/.github/license/CF_NOTICE b/.github/license/CF_NOTICE new file mode 100644 index 00000000000..2224b281c8e --- /dev/null +++ b/.github/license/CF_NOTICE @@ -0,0 +1,36 @@ +Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. + +This product contains software that is Copyright (c) 2013-2015 Pivotal Software, Inc. + +This product is licensed to you under the Apache License, Version 2.0 (the "License"). + +You may not use this project except in compliance with the License. + + +Attribution notices: + +This product includes software from https://github.com/cloudfoundry/cli/tree/master/vendor/code.cloudfoundry.org/gofileutils/fileutils that is: +Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. +Copyright (c) 2014-2015 Pivotal Software, Inc. +and is licensed under the Apache License, Version 2.0. + +This product includes software from https://github.com/code.cloudfoundry.org/cli/tree/master/vendor/code.cloudfoundry.org/ykk that is: +Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. +and is licensed under the Apache License, Version 2.0. + +This product includes software from https://github.com/code.cloudfoundry.org/cli/tree/master/vendor/code.cloudfoundry.org/cfnetworking-cli-api that is: +Copyright (c) 2016-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. +and is licensed under the Apache License, Version 2.0. + +This product includes software from https://github.com/cloudfoundry/cli/tree/master/vendor/github.com/cloudfoundry/cli-plugin-repo/web that is: +Copyright (c) 2015-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. +Copyright (c) 2015 Pivotal Software, Inc. +and is licensed under the Apache License, Version 2.0. + +This product includes software from https://github.com/cloudfoundry/cli/tree/master/vendor/github.com/cloudfoundry/dropsonde that is: +Copyright (c) 2014-2015 Pivotal Software, Inc. +and is licensed under the Apache License, Version 2.0. + +This product includes software from https://github.com/cloudfoundry/cli/tree/master/vendor/github.com/docker/docker/pkg/term that is: +Copyright 2012-2016 Docker, Inc. +and is licensed under the Apache License, Version 2.0. diff --git a/.github/license/LICENSE-WITH-3RD-PARTY-LICENSES b/.github/license/LICENSE-WITH-3RD-PARTY-LICENSES new file mode 100644 index 00000000000..d8ce5236b07 --- /dev/null +++ b/.github/license/LICENSE-WITH-3RD-PARTY-LICENSES @@ -0,0 +1,1149 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +================ + +This product includes software with separate copyright notices and +license terms, as noted below. + + +For vendor/golang.org/x/sys/unix: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/golang.org/x/sys/windows: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/golang.org/x/net/websocket: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/golang.org/x/crypto: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/blang/semver: + +The MIT License + +Copyright (c) 2014 Benedikt Lang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +For vendor/github.com/tedsuo/rata: + +The MIT License (MIT) + +Copyright (c) 2014 Ted Young + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +For vendor/github.com/golang/protobuf/ptypes/any: + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/golang/protobuf/proto: + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/jessevdk/go-flags: + +Copyright (c) 2012 Jesse van den Kieboom. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +For vendor/github.com/SermoDigital/jose: + +The MIT License (MIT) + +Copyright (c) 2015 Sermo Digital LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/Azure/go-ansiterm: + +The MIT License (MIT) + +Copyright (c) 2015 Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +For vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor: + +Extensions for Protocol Buffers to create more go like structures. + +Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved. +http://github.com/gogo/protobuf/gogoproto + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/gogo/protobuf/gogoproto: + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/gogo/protobuf/proto: + +Protocol Buffers for Go with Gadgets + +Copyright (c) 2013, The GoGo Authors. All rights reserved. +http://github.com/gogo/protobuf + +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/google/go-querystring/query: + +Copyright (c) 2013 Google. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/mattn/go-colorable: + +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/mattn/go-isatty: + +Copyright (c) Yasuhiro MATSUMOTO + +MIT License (Expat) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +For vendor/github.com/mattn/go-runewidth: + +The MIT License (MIT) + +Copyright (c) 2016 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/sajari/fuzzy: + +The MIT License (MIT) + +Copyright (c) 2014 Sajari Pty Ltd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +For vendor/github.com/gorilla/websocket: + +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/sirupsen/logrus: + +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +For vendor/github.com/lunixbochs/vtclean: + +The MIT License (MIT) + +Copyright (c) 2015 Ryan Hileman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +For vendor/gopkg.in/cheggaaa/pb.v1: + +Copyright (c) 2012-2015, Sergey Cherepanov All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used +* to endorse or promote products derived from this software without specific +* prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +For vendor/github.com/sabhiram/go-gitignore: + +The MIT License (MIT) + +Copyright (c) 2015 Shaba Abhiram + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +For portions of vendor/gopkg.in/yaml.v2: + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/bmatcuk/doublestar: + +The MIT License (MIT) + +Copyright (c) 2014 Bob Matcuk + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/bmizerany/pat: + +Copyright (C) 2012 by Keith Rarick, Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +For vendor/github.com/charlievieth/fs: + +The MIT License (MIT) + +Copyright (c) 2016 Charlie Vieth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/cppforlife/go-patch: + +Copyright (c) 2016 Dmitriy Kalinin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +For vendor/github.com/fatih/color: + +The MIT License (MIT) + +Copyright (c) 2013 Fatih Arslan + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +For vendor/github.com/mailru/easyjson: + +Copyright (c) 2016 Mail.Ru Group + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +For vendor/github.com/vito/go-interact: + +Copyright (c) 2015-2016 Alex Suraci + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +For vendor/github.com/pkg/errors: + +Copyright (c) 2015, Dave Cheney +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/github.com/cyphar/filepath-securejoin: + +Copyright (C) 2014-2015 Docker Inc & Go Authors. All rights reserved. +Copyright (C) 2017 SUSE LLC. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +For vendor/golang.org/x/text: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.github/release/gon.json b/.github/release/gon.json new file mode 100644 index 00000000000..73fd4923a2a --- /dev/null +++ b/.github/release/gon.json @@ -0,0 +1,14 @@ +{ + "source" : [ + "./dist/hello-darwin_darwin_amd64/hello", + "./dist/hello-darwin_darwin_arm64/hello" + ], + "bundle_id" : "com.example.hello", + "apple_id": { + "username" : "none@example.com", + "password": "@env:AC_PASSWORD" + }, + "sign" :{ + "application_identity" : "test-sign" + } +} diff --git a/.github/secrets.template.envrc b/.github/secrets.template.envrc new file mode 100644 index 00000000000..0e955f6f089 --- /dev/null +++ b/.github/secrets.template.envrc @@ -0,0 +1,29 @@ +ACTIONS_RUNNER_DEBUG= # boolean +ACTIONS_STEP_DEBUG= # boolean +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_S3_BUCKET= +AWS_BUCKET_INTEGRATION= +AWS_BUCKET_STAGING= + +DOCKER_HUB_USERNAME= +DOCKER_HUB_ACCESS_TOKEN= + +GIT_RELEASE_TARGET_REPO= # repo to draft a release under, in / format +GIT_REPO_ACCESS_TOKEN= # only needed when pushing to a repo other than 'self' + +GIT_DEPLOY_HOMEBREW_TAP= + +SIGNING_KEY_GPG= +SIGNING_KEY_GPG_ID= +SIGNING_KEY_GPG_PASSPHRASE= + +SIGNING_CRT_MAC= +SIGNING_KEY_MAC= +SIGNING_KEY_MAC_ID= +SIGNING_KEY_MAC_PASSPHRASE= + +SIGNING_KEY_WINDOWS_PFX= +SIGNING_KEY_WINDOWS_ID= +SIGNING_KEY_WINDOWS_PASSPHRASE= + diff --git a/.github/win/cf.ico b/.github/win/cf.ico new file mode 100644 index 0000000000000000000000000000000000000000..4381126babf6c89e87ec603553f9a2404aa45960 GIT binary patch literal 13094 zcmeHN2UJwo*8c9D85jYnq5)|Z#6pY>MFj;^K&+?~1wn#?NLN&fh?GI87Q`}ev7uO> zMq{F}8;!;mHP)xtp1mX*O?jrhf1f*)K?Y3LTW|eut(Pt5&MEubr`&z^+521p4pJB! zgMQ_RlmVUq?CjL#jdEZc)phGuT{Z;#DY?0+%N<(+zgqzv2}2@4Fi{TuuuL7XJSC@o z&gj#>ANsiTL%)HpaP@G*01tP#4H<+%UY;1_?FsMU!{9w)7<@*Jz;NGD7&*olBggt; z6s56&0T{>9_(1qg2!wyocmxIqA#h?4CWKBz_>>6DNJ_%YWJ)Q?NKQ+mGzYWO=O8U3 z9dk0XFgGg`8)VV_wcQX8j!(dolYz+0QBummy!-;>73L$qr~pNa7GlwoVw5afiWOz0C@mMT zzbubZK31J9 zxwQ~SE0<6z!_f_8IJJE_r4_iiXFe|PRpRWCefaA01Gsi{AFdtSho{#BJi5FV53g*- z{YxL==&_?Xe&RUJoIQiHUwwtkS1wb!f@@dKQ@Vib*RSJ7RTXaDx`o?!?%@8N3wUt% zJf1$NqI45a9^b~B7pL*_%hR}b?;ajLdWffw@8IdPr+D`KIi7#R(l_|_+i&sW#S6TA z`4Zo~dWBc7U*pFgf5e+NZ}9WaKjW8Qe!;K5{)*pz`whSU{yYBluYc9)#$UPrnH9*& z%1R2EJk&rkFkUf>3Pe7-dM)02&(x^d5V4qG!#R%|Im)juY!g{UQh(`S|F&%dJazib z5E)Y4d%F#A9n{BTwpgUc-034m%*?1MWo1r^@EtuREVH^I)2n&#@Zl2;y{aoh<*lO~ zI!0N@Lq&#+Hu~XX+O;41p?(`tM2fjpPzQU*_a|7Jr!a$(ls*ny=S;=U z`2)!YyI}8v-uP@mKO9=(hy%sFur*@{KFS%4U3qT!WPvZ);pX^4)fy*-7G#S%;K;Jh zIJTlKzFMP)uh;Rox{5cw4zttPZ*T>@2 z<`~>KsK7rCx#QvI?znq22w7yub8_cnUS2K=78Hp#d=|B=&3*m+0bYOe3_rbkgrB~9 zjNg8Kf$zWn9zXr_pOk;~m%Y{4BL53nr6y&KkjUf_nl&}~RR0Mv@e$TC@GuNWPEC$X zu4xf}XIp^R)#a-fteJi@iE(^AhSA`8=o(v$7}459msup!dIFNIz)4z9ojoTdWlmMLCM&c+>H93^CSnp7&RV+1c3H*w}?B19(oiMZI}U zkijS>D>1~zHY8CQV+whYrhKI`xrJONw~mXpwT+G&CYR~f>z;L#86V@XH!Q)feZnx4 zfT)<%y3Xrz$;s2(x1XM@wN1^H*uFzz9sk?8Oy$fD9cC))kF1s{*>{9;rh~&w<*3p1 z)~=c%(ip9k(;Xb9DTl!%vKCd7iD(8sKpEDy?T5-h9?j}44)Me{=g?xda^eRcOjM?t z0?q5cK9b4lO;t|oLFd^FWuzX5VKsuq-xys^5}-^Q(z$!*&O_3b0a8vkMw4MI2lLFi zo}D{8cIn*3GdErC|+{+_7 zLIP8bWy&;xWJpgXsJ{;>2wG~$SB?a%l}Q8oi{zF> z)5S>5cIrE9&Wok=WOpW0YXON6e_Ubi_ zZ^d!CL7H&Nk0lM)8x;{37c@$rw0rDZ&C0AXZ12$~lh7uUjj1nPWFBuK?mwRAO(wjJ z7R#yrEt|=t@|OOZ3i|(TtOHKG-zJ2bD8IuqjP}4KpT@f8t91 ziBq+ILUCeoPwZRdjBVMT*qZ5$?eqMwW8PqVoacd$=KEp)@&Ig8#$s1~GIr!A;?u>E zI8+{wPZp(M&(b;AFU-d2mCbRYtR;?@TH$258TmB!II^@0`7~{Cyu2IEl3#Oftu8LE z=W%|W0r@u&{hO+7&2V+IKKVD!xW20^?(CG~9|!v4@Cr8^DIbp`E2rR#HGw#{GYJrNNNEv@mzH1|`8h03U9MUo`Z=p8PTgOY zfkUMQSi5c=DmQMxhD{r>Y0GA8-|-PX-n9$N|Jk>HzdASV^odTNIW77` z7cPFS_JyupL)FbHbzFLxe4(os$mjVQ&+lEs%ZF$1^3gSX_xK7PJbZvhj~`RpU5ZJc zkstH~KfV4IZ+>`)U*9|z{h&8Lyv8qYe)`J~s@Z@4CBK3;%4jB&$@R0fHEFBMG3I!l z<60JLYpkow4YiCSS3f>TPV7XSL3D0ONpW^`ZXJ(CE-M%xbYbvuxsnqbElwn3mLXX=H-PccM}7dgj5AQ==k-Tj^0(Y$oy?4X)a(%1q=p zi>;kzaePY&6)y?Sq1t++GN3V&sP|Mt z=`;r`Mz#*qN(Dh2B&S35^(oRw%3Qy2K`5}bvaw=+R&5FdA(G92*9oo9O(j)=3Gthi z2&L0|+uPb$S=;xXt`bzOh}|$U_igbEo}){WEb|1RG~eFV+CINb5Q~!qN^_RvnfK$}oL8dtj_(dBovm2M1Z2$epy(qM3>}ranT6 z8QV-oG{?mDk+@@+tTS>QnisvnC;%hooEozK%!JZWkd~T z4fs{W&zY!%)Ed?S0|vOcxh4xL6Wa3)`Gr0DGp{u~`rtyXlk zG=8|6*T-krtTHl)w9YzObXuISlwM3(`siUkM56-INou^5#M72&NHMj_zG7}lU|`DJ z6~vQk$n+_cV^RmZ7ad-VXjQ}0E0>g*dPi>#Hxdbdclj`sgE2^ck1eImSY3_C{Fc< z|Ag@vKQWl@)I-HPbr!EGrmFAMqv%dOb{gHOPoIYAGiQk3EoY@BBPDG%(z7y9t{92( zD2i97P`nyF8mnV`Q9<|WYiEw4cy+iKudYoTjdjz5v2oUi*q9tH#;oi<{j;Jzbf^A- zc&A<$vks-0)t6${K@_vP#QhFl~l*59Ik9J!Pnac;Ldj7?oM6YJJ1tHR72<5RcU6Df`!WXKTuj2fQ;BphpN;wXbSF>o zsxo(;crU-WWQlk$zl>tlvX$j1r+fKTYgW^@TO|$(g;+~>^y^u?O5asCZ`~rstL&R9 zyQ|-KV80l*9z1+Vj9X7^&ZqCItMJ8!6*%|lLP|?Nj$E)iYGU(;hTH6@#^6bynJ#CZ(iTVeY)3w^!Sk&$Fi9A z#mg6X_3Sa;{P-L{|44WI;+_6a_~-X8DYpIouXwg*pZyWht@f@ZGo}bjj z2nytNSUQWPB8i81jY!_0pb30Mi)uW5P%xRONXX02&r67!XhxqKY6M3&0k0H{MK+#q z9$vVrjm9_)vf{+g;C-vac0zBF{@pT02`ZjvuF(} zEJWqdZ535S!n9MVH5-6*3TrJ%i|p9erj2d8$g~nxj$_+FYT5K=ERr(;I$`4aS46gL zYikq9z?FhRm*AZFO0m@FBVNj}6_gk$SU*$k?Aq8&rOd);Q}O+aQ)?7V4W)|ay1KMY zI9?vIvNFlW&ekTWa^)n7E!fME8bxV+b(#`O3kwSpLYq@}36*KKZ5(XVD&r)a%rqo6 zZ$@6NanM9)%a>Y6B~g`gY}>SPNUNN}$>ZMH?^{xYg7}4%b8Q{k*v_q7G`;CXe+yby z%xXiFRagGAxeN!Qe+%En!C}dt?X`}7i9>q_hm5-NpU73P1@6_Vx@P1=)LAH$AmApp}zptME}&pG9yHA5W2#ZulP? zLa7DYL9#r;r`y|iuurEXR~}1tEQV4v4K@+r6P4Vl8LN!nRE9Z-Fx)v?!1Bu6;@1ugg0n% z2}0GQG%siPE{8!qSW;70clR8sZY55Dsisz%NM{7kv5o83 zmB7_l4-a>D_d#xcR2|9=5nfadZ33*=0m~^WD=U1vdU()H8zuU4b)`SoF*E@M!*f>J zu&mCKjh}7&b)yFmnve`gG|<(x|1iQwF%94>8^g2yC9MDT;|5eCUD;({|NfpXE@NpM zio3A!{wIm}NhIFi)z#CLecbnCmwAH+5BBm3rfM}qNMrpgL_E`vBY!rIV}rQ zAfAtC44)?|sGKSI1TX4RByTTo@1fq_6R5IC)Gz6b#_($W5EXpQSTDj6(RCrCz%>LC zw}+@-jYwb~l7urZqh{6kpN3(NJ0*0G*U@x zUs*X>w1MLGXhcM{`zvR*yRve1Zct!AKwwZV8+&DCp6H#b4YOFGcj2T?Qzr%tT$kl9m^&PE>D79J@>nh%Hc-2TrP&>QzWYGUoNvvsq=Wpp`{knjQ#L!Ii z!^y1vaVk=n>e5zat4>c{Ger}pj&`X+{$z6_JzZV7p}8Wj_Ek3E{SRL+{3ZUsd ExpandConstant('{userappdata}\Cloud Foundry')) AND + (WizardDirValue <> ExpandConstant('{pf}\Cloud Foundry')) then + begin + Log('User has selected a custom install path. Will not override.') + end + else if OptionPage.Values[1] then + begin + // override the default installation to program files ({pf}) + WizardForm.DirEdit.Text := ExpandConstant('{userappdata}\Cloud Foundry') + end + else + begin + WizardForm.DirEdit.Text := ExpandConstant('{pf}\Cloud Foundry'); + end; + end; + Result := True; +end; diff --git a/.github/win/innosetup/Dockerfile b/.github/win/innosetup/Dockerfile new file mode 100644 index 00000000000..0a0d5a18ed3 --- /dev/null +++ b/.github/win/innosetup/Dockerfile @@ -0,0 +1,19 @@ +# This image is not being used by the github actions workflow +# because gh-actions doesn't support windows based images +# Keeping this file as we expect to use it in the future +FROM mcr.microsoft.com/windows/servercore:ltsc2019 +SHELL ["powershell.exe"] + +ARG CHOCO_THUMBPRINT=83AC7D88C66CB8680BCE802E0F0F5C179722764B +RUN mkdir \setup + +RUN (New-Object System.Net.WebClient).DownloadFile('https://chocolatey.org/install.ps1', '\setup\installChocolatey.ps1') +RUN (Get-AuthenticodeSignature \setup\installChocolatey.ps1).SignerCertificate.Thumbprint > \setup\thumbprint +RUN if ((type \setup\thumbprint) -ne $env:CHOCO_THUMBPRINT) { \ + throw 'chocolatey installer thumbprint does not match expected. see https://docs.chocolatey.org/en-us/information/security' \ + } +RUN \setup\installChocolatey.ps1 +RUN Remove-Item -Recurse \setup + + +RUN choco install --no-progress -r -y innosetup diff --git a/.github/win/install-innosetup.ps1 b/.github/win/install-innosetup.ps1 new file mode 100644 index 00000000000..14c64bf0908 --- /dev/null +++ b/.github/win/install-innosetup.ps1 @@ -0,0 +1,18 @@ +$ErrorActionPreference = "Stop" +# in the future, this variable should cause PS to exit on non-zero exit codes from commands/exes (as opposed to PS cmdlets) +$PSNativeCommandUseErrorActionPreference = $true +# see https://github.com/PowerShell/PowerShell/issues/3415 and https://github.com/PowerShell/PowerShell-RFC/pull/277 + +# retrieved from https://docs.chocolatey.org/en-us/information/security +$chocoThumbprint = '83AC7D88C66CB8680BCE802E0F0F5C179722764B' + +$scriptPath = (Get-Location).Path + '\installChocolatey.ps1' +(New-Object System.Net.WebClient).DownloadFile('https://chocolatey.org/install.ps1', $scriptPath) +(Get-AuthenticodeSignature .\installChocolatey.ps1).SignerCertificate.Thumbprint -eq $chocoThumbprint + +Set-ExecutionPolicy Bypass -Scope Process +.\installChocolatey.ps1 + +choco install --no-progress -r -y innosetup --force + +Get-Command iscc -ErrorAction Continue diff --git a/.github/win/run-innosetup.ps1 b/.github/win/run-innosetup.ps1 new file mode 100644 index 00000000000..b1f1143550a --- /dev/null +++ b/.github/win/run-innosetup.ps1 @@ -0,0 +1,20 @@ +param ($InnoSetupConfig, $CfBinary, $InstallerOutput) + +$ErrorActionPreference = "Stop" +# in the future, this variable should cause PS to exit on non-zero exit codes from commands/exes (as opposed to PS cmdlets) +$PSNativeCommandUseErrorActionPreference = $true +# see https://github.com/PowerShell/PowerShell/issues/3415 and https://github.com/PowerShell/PowerShell-RFC/pull/277 + +$innoSetupWorkDir = "$PSScriptRoot" +$licenseDir = "${PSScriptRoot}\..\license" + +Move-Item -Force "$CfBinary" $innoSetupWorkDir\cf8.exe + +# convert line-endings +Get-Content ${licenseDir}\LICENSE-WITH-3RD-PARTY-LICENSES | Set-Content "${innoSetupWorkDir}\LICENSE" +Get-Content ${licenseDir}\CF_NOTICE | Set-Content "${innoSetupWorkDir}\NOTICE" + +iscc "$InnoSetupConfig" +Move-Item "${innoSetupWorkDir}\Output\mysetup.exe" "$InstallerOutput" + +Get-ChildItem "${innoSetupWorkDir}\Output" diff --git a/.github/win/sign-windows-binary.ps1 b/.github/win/sign-windows-binary.ps1 new file mode 100644 index 00000000000..684b2ab1562 --- /dev/null +++ b/.github/win/sign-windows-binary.ps1 @@ -0,0 +1,9 @@ +# expected environment variables +# SIGNING_KEY_WINDOWS_PASSPHRASE + +param ($BinaryFilePath) + +# add PATH to signtool.exe +$env:PATH="$env:PATH;C:\Program Files (x86)\Windows Kits\10\bin\x64" + +signtool sign /v /p "$env:SIGNING_KEY_WINDOWS_PASSPHRASE" /fd SHA256 /f "$env:RUNNER_TEMP\cert.pfx" "$BinaryFilePath" diff --git a/.github/win/windows-installer-v8-x64.iss b/.github/win/windows-installer-v8-x64.iss new file mode 100644 index 00000000000..c11acb04151 --- /dev/null +++ b/.github/win/windows-installer-v8-x64.iss @@ -0,0 +1,51 @@ +[Setup] +ChangesEnvironment=yes +AlwaysShowDirOnReadyPage=yes +AppName=Cloud Foundry CLI +AppVersion=VERSION +AppVerName=Cloud Foundry CLI version VERSION +AppPublisher=Cloud Foundry Foundation +ArchitecturesInstallIn64BitMode=x64 ia64 +ArchitecturesAllowed=x64 ia64 +PrivilegesRequired=none +DefaultDirName={pf}\Cloud Foundry +SetupIconFile=cf.ico +UninstallDisplayIcon={app}\cf.ico + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: IsAdminLoggedOn and Uninstall32Bit() and NeedsAddPath(ExpandConstant('{app}')) +Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: not IsAdminLoggedOn and Uninstall32Bit() and NeedsAddPath(ExpandConstant('{app}')) + +[Files] +Source: LICENSE; DestDir: "{app}" +Source: NOTICE; DestDir: "{app}" +Source: cf8.exe; DestDir: "{app}" +Source: cf.ico; DestDir: "{app}" + +[Run] +Filename: "{cmd}"; Parameters: "/C mklink ""{app}\cf.exe"" ""{app}\cf8.exe""" + +[UninstallDelete] +Type: files; Name: "{app}\cf.exe" +Type: dirifempty; Name: "{app}" + +[Code] +function Uninstall32Bit(): Boolean; +var + resultCode: Integer; + uninstallString: String; + uninstallStringPath: String; +begin + uninstallString := ''; + uninstallStringPath := 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Cloud Foundry CLI_is1'; + RegQueryStringValue(HKLM, uninstallStringPath, 'UninstallString', uninstallString); + + if uninstallString <> '' then + begin + uninstallString := RemoveQuotes(uninstallString); + Exec(uninstallString, '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART','', SW_HIDE, ewWaitUntilTerminated, resultCode) + end; + Result := true; +end; + +#include "common.iss" diff --git a/.github/win/windows-installer-v8-x86.iss b/.github/win/windows-installer-v8-x86.iss new file mode 100644 index 00000000000..aa3343d012b --- /dev/null +++ b/.github/win/windows-installer-v8-x86.iss @@ -0,0 +1,31 @@ +[Setup] +ChangesEnvironment=yes +AlwaysShowDirOnReadyPage=yes +AppName=Cloud Foundry CLI +AppVersion=VERSION +AppVerName=Cloud Foundry CLI version VERSION +AppPublisher=Cloud Foundry Foundation +PrivilegesRequired=none +DefaultDirName={pf}\Cloud Foundry +SetupIconFile=cf.ico +UninstallDisplayIcon={app}\cf.ico + +[Registry] +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: IsAdminLoggedOn and NeedsAddPath(ExpandConstant('{app}')) +Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: not IsAdminLoggedOn and NeedsAddPath(ExpandConstant('{app}')) + +[Files] +Source: LICENSE; DestDir: "{app}" +Source: NOTICE; DestDir: "{app}" +Source: cf8.exe; DestDir: "{app}" +Source: cf.ico; DestDir: "{app}" + +[Run] +Filename: "{cmd}"; Parameters: "/C mklink ""{app}\cf.exe"" ""{app}\cf8.exe""" + +[UninstallDelete] +Type: files; Name: "{app}\cf.exe" +Type: dirifempty; Name: "{app}" + +[Code] +#include "common.iss" diff --git a/.github/workflows/build-sign-upload.yml b/.github/workflows/build-sign-upload.yml new file mode 100644 index 00000000000..37bbdeaccdf --- /dev/null +++ b/.github/workflows/build-sign-upload.yml @@ -0,0 +1,880 @@ + +name: Build-Sign-Upload + +on: + push: + tags: + - 'v8.*' + +permissions: + contents: read + +defaults: + # top-level defaults subkeys apply to jobs + # run subkeys apply to all steps within all jobs + run: + shell: bash + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + if: ${{ github.action_repository != 'cloudfoundry/cli' }} + outputs: + secrets-environment: ${{ steps.set-secrets-environment.outputs.secrets-environment }} + build-version: ${{ steps.set-build-version.outputs.build-version }} + go-version: ${{ steps.set-go-version.outputs.go-version }} + steps: + # note the key must be 'id' and not 'name' here, to be accessed via the steps. syntax above + + - name: Set environment + id: set-secrets-environment + run: echo "::set-output name=secrets-environment::PROD" + + - name: Checkout cli + uses: actions/checkout@v2 + + - name: Check if BUILD_VERSION matches tag ${{ github.ref }} + run: | + echo "Git Ref: ${{ github.ref }}" + echo "BUILD_VERSION: $(cat BUILD_VERSION)" + + exit 0 + + - name: Set build version + id: set-build-version + run: | + version=$(cat BUILD_VERSION) + echo "::set-output name=build-version::$version" + + - name: Set go version + id: set-go-version + run: echo "::set-output name=go-version::1.17" + + # This is for debugging. It's equivalent to fly intecept + # - name: Setup upterm session + # env: + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # if: always() + # uses: lhotari/action-upterm@v1 + # timeout-minutes: 60 + + test-rpm-package: + name: Test RPM Artifacts + needs: build-linux + runs-on: ubuntu-latest + container: + image: fedora + steps: + + - name: Download Signed Linux Packages + uses: actions/download-artifact@v2 + with: + name: cf-cli-linux-rpm-packages + + - name: Display structure of downloaded files + run: ls -R + + - name: Test RPMs + run: | + rpm -q --qf 'FN:\t%{FILENAMES}\nNAME:\t%{NAME}\nPGP:\t%{SIGPGP:pgpsig}\nGPG:\t%{SIGGPG:pgpsig}\n' -p *.rpm + + test-deb-package: + name: Test Debian Artifacts + needs: build-linux + runs-on: ubuntu-latest + container: + image: ubuntu + steps: + + - name: Download Signed Linux Packages + uses: actions/download-artifact@v2 + with: + name: cf-cli-linux-deb-packages + + - name: Display structure of downloaded files + run: | + ls -R + ls *.deb | xargs -n1 dpkg --info + + test-macos: + name: Test macOS Artifacts + needs: build-macos + runs-on: macos-latest + steps: + + - name: Download Signed macOS Packages + uses: actions/download-artifact@v2 + with: + name: cf-cli-macos-packages + + - name: Inspect macOS packages + run: | + ls -R + pkgutil --check-signature * + + test-windows: + name: Test Windows Artifacts + needs: build-windows + runs-on: windows-latest + defaults: + run: + shell: pwsh + steps: + + - name: Download Signed Windows Binaries + uses: actions/download-artifact@v2 + with: + name: cf-cli-windows-binaries + + - name: Inspect Windows packages + run: | + Get-AuthenticodeSignature -Verbose -ErrorAction Stop .\cf-cli_win32.exe + Get-AuthenticodeSignature -Verbose -ErrorAction Stop .\cf-cli_winx64.exe + + - name: Download Signed Windows Binaries + uses: actions/download-artifact@v2 + with: + name: cf-cli-windows-packages + + - name: Inspect Windows files + run: | + Get-ChildItem -Force + + - name: View installer signature + run: | + Expand-Archive -DestinationPath winx64 -Path cf8-cli-installer_*_winx64.zip + Expand-Archive -DestinationPath win32 -Path cf8-cli-installer_*_win32.zip + + Get-AuthenticodeSignature -Verbose -ErrorAction Stop ".\winx64\cf8_installer.exe" + Get-AuthenticodeSignature -Verbose -ErrorAction Stop ".\win32\cf8_installer.exe" + + build-linux: + name: Build Linux + needs: + - setup + runs-on: ubuntu-latest + environment: ${{ needs.setup.outputs.secrets-environment }} + + env: + BUILD_VERSION: ${{ needs.setup.outputs.build-version }} + + steps: + + - name: Get Build Version + id: get_build_version + run: echo "BUILD_VERSION $BUILD_VERSION" + + - name: Checkout cli + uses: actions/checkout@v2 + + - name: Checkout cli-ci + uses: actions/checkout@v2 + with: + repository: cloudfoundry/cli-ci.git + path: cli-ci + ref: master + + - name: Install Linux Packages + run: sudo apt update && sudo apt install -y --no-install-recommends fakeroot + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ needs.setup.outputs.go-version }} + + - name: Print go environment + id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + go env + + - name: Go Assets Cache + uses: actions/cache@v2 + with: + path: | + ${{ steps.go-cache-paths.outputs.go-mod }} + ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Build Linux + run: | + make out/cf-cli_linux_i686 + make out/cf-cli_linux_x86-64 + + - name: Store Linux Binaries + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-linux-binaries + path: out/cf-cli_linux* + + - name: Build RedHat Packages + env: + SIGNING_KEY_GPG_ID: ${{ secrets.SIGNING_KEY_GPG_ID }} + run: | + set -ex + set -o pipefail + + root=$PWD + + cat<< EOF >~/.rpmmacros + $SIGNING_KEY_GPG_ID + EOF + + RPM_VERSION=${BUILD_VERSION//-/_} + + mkdir -pv $root/packaged + + echo "Build 32-bit RedHat package" + ( + pushd cli-ci/ci/installers/rpm + cp $root/out/cf-cli_linux_i686 cf8 + cp ../../license/NOTICE . + cp ../../license/LICENSE-WITH-3RD-PARTY-LICENSES LICENSE + cp ../completion/cf8 cf8.bash + echo "Version: ${RPM_VERSION}" > cf-cli.spec + cat cf8-cli.spec.template >> cf-cli.spec + rpmbuild --target i386 --define "_topdir $(pwd)/build" -bb cf-cli.spec + mv build/RPMS/i386/cf8-cli*.rpm $root/packaged/cf8-cli-installer_${BUILD_VERSION}_i686.rpm + popd + ) + + + echo "Build 64-bit RedHat package" + ( + pushd cli-ci/ci/installers/rpm + cp $root/out/cf-cli_linux_x86-64 cf8 + cp ../../license/NOTICE . + cp ../../license/LICENSE-WITH-3RD-PARTY-LICENSES LICENSE + cp ../completion/cf8 cf8.bash + echo "Version: ${RPM_VERSION}" > cf-cli.spec + cat cf8-cli.spec.template >> cf-cli.spec + rpmbuild --target x86_64 --define "_topdir $(pwd)/build" -bb cf-cli.spec + mv build/RPMS/x86_64/cf8-cli*.rpm $root/packaged/cf8-cli-installer_${BUILD_VERSION}_x86-64.rpm + popd + ) + + - name: Load GPG key + env: + SIGNING_KEY_GPG: ${{ secrets.SIGNING_KEY_GPG }} + run: | + echo -n "$SIGNING_KEY_GPG" | base64 --decode | gpg --no-tty --batch --pinentry-mode loopback --import + + - name: View GPG keys + run: | + gpg --list-keys + + - name: Sign RedHat Packages + env: + SIGNING_KEY_GPG_ID: ${{ secrets.SIGNING_KEY_GPG_ID }} + SIGNING_KEY_GPG_PASSPHRASE: ${{ secrets.SIGNING_KEY_GPG_PASSPHRASE }} + run: | + set -ex + set -o pipefail + + SUFFIX=8 + + mkdir signed-redhat-installer + + cat<< EOF >~/.rpmmacros + %_gpg_name $SIGNING_KEY_GPG_ID + EOF + + cp packaged/cf*.rpm signed-redhat-installer/ + + # TODO: consider to add --key-id + rpmsign --addsign signed-redhat-installer/*.rpm + + - name: Print RPM Signature + run: rpm -q --qf 'FN:\t%{FILENAMES}\nNAME:\t%{NAME}\nPGP:\t%{SIGPGP:pgpsig}\nGPG:\t%{SIGGPG:pgpsig}\n' -p *.rpm + working-directory: signed-redhat-installer + + - name: Store Signed Linux RPM Packages + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-linux-rpm-packages + path: signed-redhat-installer/*.rpm + + + - name: Build Debian Packages + run: | + set -ex + set -o pipefail + + root=$PWD + + mkdir -pv $root/packaged-deb + + echo "Build 32-bit Debian package" + ( + SIZE="$(BLOCKSIZE=1000 du $root/out/cf-cli_linux_i686 | cut -f 1)" + + pushd cli-ci/ci/installers/deb + mkdir -p cf/usr/bin cf/usr/share/doc/cf8-cli/ cf/DEBIAN cf/usr/share/bash-completion/completions + + cp copyright_preamble cf/DEBIAN/copyright + sed 's/^$/ ./' $root/LICENSE >> cf/DEBIAN/copyright + cat copyright_comment_header >> cf/DEBIAN/copyright + sed 's/^$/ ./' ../../license/3RD-PARTY-LICENSES >> cf/DEBIAN/copyright + + cp cf/DEBIAN/copyright cf/usr/share/doc/cf8-cli/copyright + + cp ../../license/NOTICE cf/usr/share/doc/cf8-cli + cp ../../license/LICENSE-WITH-3RD-PARTY-LICENSES cf/usr/share/doc/cf8-cli/LICENSE + + cp control_v8.template cf/DEBIAN/control + echo "Installed-Size: ${SIZE}" >> cf/DEBIAN/control + echo "Version: ${BUILD_VERSION}" >> cf/DEBIAN/control + echo "Architecture: i386" >> cf/DEBIAN/control + + cp ../completion/cf8 cf/usr/share/bash-completion/completions/cf8 + + cp $root/out/cf-cli_linux_i686 cf/usr/bin/cf8 + ln -frs cf/usr/bin/cf8 cf/usr/bin/cf + + fakeroot dpkg --build cf cf8-cli-installer_${BUILD_VERSION}_i686.deb + mv cf8-cli-installer_${BUILD_VERSION}_i686.deb $root/packaged-deb + rm -rf cf + popd + ) + + echo "Build 64-bit Debian package" + ( + SIZE="$(BLOCKSIZE=1000 du $root/out/cf-cli_linux_x86-64 | cut -f 1)" + + pushd cli-ci/ci/installers/deb + mkdir -p cf/usr/bin cf/usr/share/doc/cf8-cli/ cf/DEBIAN cf/usr/share/bash-completion/completions + + cp copyright_preamble cf/DEBIAN/copyright + sed 's/^$/ ./' $root/LICENSE >> cf/DEBIAN/copyright + cat copyright_comment_header >> cf/DEBIAN/copyright + sed 's/^$/ ./' ../../license/3RD-PARTY-LICENSES >> cf/DEBIAN/copyright + + cp cf/DEBIAN/copyright cf/usr/share/doc/cf8-cli/copyright + + cp ../../license/NOTICE cf/usr/share/doc/cf8-cli + cp ../../license/LICENSE-WITH-3RD-PARTY-LICENSES cf/usr/share/doc/cf8-cli/LICENSE + + cp control_v8.template cf/DEBIAN/control + echo "Installed-Size: ${SIZE}" >> cf/DEBIAN/control + echo "Version: ${BUILD_VERSION}" >> cf/DEBIAN/control + echo "Architecture: amd64" >> cf/DEBIAN/control + + cp ../completion/cf8 cf/usr/share/bash-completion/completions/cf8 + + cp $root/out/cf-cli_linux_x86-64 cf/usr/bin/cf8 + ln -frs cf/usr/bin/cf8 cf/usr/bin/cf + + fakeroot dpkg --build cf cf8-cli-installer_${BUILD_VERSION}_x86-64.deb + mv cf8-cli-installer_${BUILD_VERSION}_x86-64.deb $root/packaged-deb + popd + ) + + - name: Print DEB Packages Info + run: | + ls -R + for f in *.deb; do + echo $f + dpkg --info $f + done + working-directory: packaged-deb + + - name: Store Debian Packages + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-linux-deb-packages + path: packaged-deb/*.deb + + build-macos: + name: Build macOS + needs: + - setup + runs-on: macos-latest + environment: ${{ needs.setup.outputs.secrets-environment }} + steps: + + - name: Setup + run: | + echo "BUILD_VERSION=${{ needs.setup.outputs.build-version }}" >> $GITHUB_ENV + + - name: Get Build Version + id: get_build_version + run: echo "BUILD_VERSION $BUILD_VERSION" + + - name: Checkout cli + uses: actions/checkout@v2 + + - name: Checkout cli-ci + uses: actions/checkout@v2 + with: + repository: cloudfoundry/cli-ci.git + path: cli-ci + ref: master + + - name: Checkout bomutils + uses: actions/checkout@v2 + with: + repository: hogliux/bomutils.git + ref: 0.2 + path: bomutils + + - name: Build bomutils + working-directory: bomutils + run: make + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ needs.setup.outputs.go-version }} + + - name: Update Homebrew + run: | + brew tap pivotalsoftware/gon + brew update --preinstall + cat "$(brew --repository)/Library/Taps/pivotalsoftware/homebrew-gon/gon.rb" > .github/brew-formulae + + - name: Configure Homebrew cache + uses: actions/cache@v2 + with: + path: | + ~/Library/Caches/Homebrew/gon--* + ~/Library/Caches/Homebrew/downloads/*--gon-* + key: brew-${{ hashFiles('.github/brew-formulae') }} + restore-keys: brew- + + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew install pivotalsoftware/gon/gon coreutils + + - name: Print go environment + id: go-cache-paths + run: | + echo "::set-output name=go-build::$(go env GOCACHE)" + echo "::set-output name=go-mod::$(go env GOMODCACHE)" + go env + + - name: Go Assets Cache + uses: actions/cache@v2 + with: + path: | + ${{ steps.go-cache-paths.outputs.go-mod }} + ${{ steps.go-cache-paths.outputs.go-build }} + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Build macOS Binaries + run: | + make out/cf-cli_osx + make out/cf-cli_osx_arm + + - name: Store macOS Binaries + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-macos-binaries + path: out/cf-cli* + + - name: Build macOS Installer + run: | + set -ex + set -o pipefail + + root=$PWD + + mkdir -pv $root/packaged + + echo "Building OS X installer" + ( + SIZE="$(BLOCKSIZE=1000 du $root/out/cf-cli_osx | cut -f 1)" + + pushd cli-ci/ci/installers/osx_v8 + sed -i -e "s/VERSION/${BUILD_VERSION}/g" Distribution + sed -i -e "s/SIZE/${SIZE}/g" Distribution + mkdir -p cf-cli/usr/local/bin cf-cli/usr/local/share/doc/cf8-cli + + cp $root/out/cf-cli_osx cf-cli/usr/local/bin/cf8 + gln -frs cf-cli/usr/local/bin/cf8 cf-cli/usr/local/bin/cf + cp ../../license/NOTICE cf-cli/usr/local/share/doc/cf8-cli + cp ../../license/LICENSE-WITH-3RD-PARTY-LICENSES cf-cli/usr/local/share/doc/cf8-cli/LICENSE + chmod -R go-w cf-cli + pushd cf-cli + find usr | cpio -o --format=odc | gzip -c > ../Payload + popd + + $root/bomutils/build/bin/ls4mkbom cf-cli | sed 's/1000\/1000/0\/80/' > bom_list + mkbom -i bom_list Bom + mv Bom Payload com.cloudfoundry.cf8-cli.pkg + xar -c --compression none -f cf8-cli-installer_osx.pkg com.cloudfoundry.cf8-cli.pkg Distribution + mv cf8-cli-installer_osx.pkg $root/packaged/cf8-cli-installer_osx.pkg + popd + ) + + - name: Load macos key + env: + SIGNING_TEST_CA_MAC: ${{ secrets.SIGNING_TEST_CA_MAC }} + SIGNING_KEYCHAIN_PASSPHRASE: ${{ secrets.SIGNING_KEYCHAIN_PASSPHRASE }} + + SIGNING_KEY_MAC: ${{ secrets.SIGNING_KEY_MAC }} + SIGNING_KEY_MAC_ID: ${{ secrets.SIGNING_KEY_MAC_ID }} + SIGNING_KEY_MAC_PASSPHRASE: ${{ secrets.SIGNING_KEY_MAC_PASSPHRASE }} + SIGNING_KEY_MAC_PFX: ${{ secrets.SIGNING_KEY_MAC_PFX }} + + run: | + echo -n "$SIGNING_KEY_MAC_PFX" | base64 --decode > mac-signing-key.p12 + security list-keychains -d user -s login + + ORIGINAL_KEYCHAIN="$(security default-keychain | sed -e 's/[ "]*\([^"]*\)[ "]*/\1/')" + KEYCHAIN_PATH="$HOME/Library/Keychains/build.keychain-db" + + # Create build keychain + security create-keychain -p "$SIGNING_KEYCHAIN_PASSPHRASE" "$KEYCHAIN_PATH" + # trap "security delete-keychain $KEYCHAIN_PATH" 0 + + # Append build keychain to the user domain + security list-keychains -d user -s "$KEYCHAIN_PATH" $(security list-keychains -d user | sed s/\"//g) + + # Remove relock timeout + security set-keychain-settings "$KEYCHAIN_PATH" + + # Unlock build keychain + security unlock-keychain -p "$SIGNING_KEYCHAIN_PASSPHRASE" "$KEYCHAIN_PATH" + + # Add certificate to keychain + security import mac-signing-key.p12 -k "$KEYCHAIN_PATH" -P "$SIGNING_KEY_MAC_PASSPHRASE" -A -T $(which codesign) -T $(which productsign) + + # Enable codesigning from a non user interactive shell + security set-key-partition-list -S apple-tool:,apple:, -s -k "$SIGNING_KEYCHAIN_PASSPHRASE" -D "${IDENTITY_CERTIFICATE}" -t private "$KEYCHAIN_PATH" || echo set-key-partition-list private failed + rm mac-signing-key.p12 + + #TODO: clean keychain in a separate step + # Delete build keychain + # security delete-keychain "$KEYCHAIN_PATH" + + - name: Sign macOS + env: + SUFFIX: 8 + SIGNING_KEY_MAC_ID: ${{ secrets.SIGNING_KEY_MAC_ID }} + SIGNING_KEY_MAC_PASSPHRASE: ${{ secrets.SIGNING_KEY_MAC_PASSPHRASE }} + run: | + + root=$PWD + + mkdir -pv signed-osx-installer + + productsign --timestamp \ + --sign "$SIGNING_KEY_MAC_ID" \ + "$root/packaged/cf${SUFFIX}-cli-installer_osx.pkg" \ + "signed-osx-installer/cf${SUFFIX}-cli-installer_${BUILD_VERSION}_osx.pkg" + + - name: Store macOS Signed Packages + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-macos-packages + path: signed-osx-installer/*.pkg + + + build-windows: + name: Build Windows + needs: + - setup + runs-on: windows-2019 + environment: ${{ needs.setup.outputs.secrets-environment }} + defaults: + run: + shell: pwsh + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ needs.setup.outputs.go-version }} + + - name: Get build-time dependencies + run: | + choco install --no-progress --limit-output -y make + go install github.com/akavel/rsrc@v0.10.2 + + - name: Build CF CLI for Windows + run: | + Get-Command make + Get-Item Makefile + make out/cf-cli_win32.exe + make out/cf-cli_winx64.exe + + - name: write windows cert + run: | + $pass = convertto-securestring -string "$env:SIGNING_KEY_WINDOWS_PASSPHRASE" -asplaintext + [convert]::frombase64string($env:SIGNING_KEY_WINDOWS_PFX) | set-content -path $env:runner_temp\cert.pfx -asbytestream + + env: + SIGNING_KEY_WINDOWS_PFX: ${{ secrets.SIGNING_KEY_WINDOWS_PFX }} + SIGNING_KEY_WINDOWS_PASSPHRASE: ${{ secrets.SIGNING_KEY_WINDOWS_PASSPHRASE }} + + - name: Sign windows binaries + run: | + .\.github\win\sign-windows-binary.ps1 -BinaryFilePath out\cf-cli_win32.exe + .\.github\win\sign-windows-binary.ps1 -BinaryFilePath out\cf-cli_winx64.exe + env: + SIGNING_KEY_WINDOWS_PASSPHRASE: ${{ secrets.SIGNING_KEY_WINDOWS_PASSPHRASE }} + + - name: View binary signatures + run: | + Get-AuthenticodeSignature -Verbose -ErrorAction Stop .\out\cf-cli_win32.exe + Get-AuthenticodeSignature -Verbose -ErrorAction Stop .\out\cf-cli_winx64.exe + + - name: Make symlinks + run: | + New-Item -ItemType SymbolicLink -Target .\out\cf-cli_win32.exe -Path .\out\cf-cli_win32-link.exe + New-Item -ItemType SymbolicLink -Target .\out\cf-cli_winx64.exe -Path .\out\cf-cli_winx64-link.exe + + # This is for debugging windows + # - name: enable ssh + # if: always() + # run: | + # Get-WindowsCapability -Online + # $componentName = $(Get-WindowsCapability -Online |Where-Object Name -like 'OpenSSH.Server*').Name + # Add-WindowsCapability -Online -Name $componentName + # Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" + + # - name: ssh session + # if: always() + # run: | + # Start-Service sshd + # echo "IP address below:" + # Get-NetIPAddress | Select-Object -Property IPAddress + # sleep 3600 + # Stop-Service sshd + + - name: Save signed binaries as a GitHub Action Artifact + uses: actions/upload-artifact@v2 + with: + name: cf-cli-windows-binaries + if-no-files-found: error + path: out/cf-cli_win*.exe + + - name: Install innosetup + run: .\.github\win\install-innosetup.ps1 + + - name: Run innosetup + run: | + mkdir "$env:RUNNER_TEMP\winx64" + .\.github\win\run-innosetup.ps1 -InnoSetupConfig ".github\win\windows-installer-v8-x64.iss" -CfBinary "out\cf-cli_winx64.exe" -InstallerOutput "$env:RUNNER_TEMP\winx64\cf8_installer.exe" + mkdir "$env:RUNNER_TEMP\win32" + .\.github\win\run-innosetup.ps1 -InnoSetupConfig ".github\win\windows-installer-v8-x86.iss" -CfBinary "out\cf-cli_win32.exe" -InstallerOutput "$env:RUNNER_TEMP\win32\cf8_installer.exe" + + - name: Sign windows installer + run: | + .\.github\win\sign-windows-binary.ps1 -BinaryFilePath "$env:RUNNER_TEMP\winx64\cf8_installer.exe" + .\.github\win\sign-windows-binary.ps1 -BinaryFilePath "$env:RUNNER_TEMP\win32\cf8_installer.exe" + env: + SIGNING_KEY_WINDOWS_PASSPHRASE: ${{ secrets.SIGNING_KEY_WINDOWS_PASSPHRASE }} + + - name: View installer signature + run: | + Get-AuthenticodeSignature -Verbose -ErrorAction Stop "$env:RUNNER_TEMP\winx64\cf8_installer.exe" + Get-AuthenticodeSignature -Verbose -ErrorAction Stop "$env:RUNNER_TEMP\win32\cf8_installer.exe" + + - name: Arrange files for upload + # note the -Path flag takes comma-delimited args + run: | + Copy-Item -Destination "$env:RUNNER_TEMP\winx64" -Path .github\win\LICENSE,.github\win\NOTICE + Copy-Item -Destination "$env:RUNNER_TEMP\win32" -Path .github\win\LICENSE,.github\win\NOTICE + + - name: Zip windows artifact + run: | + # strip leading v to go from tag -> semver + $installer_release_version="$(cat BUILD_VERSION)".Replace("v", "") + pushd "$env:RUNNER_TEMP\winx64" + $installer_zip_filename="$env:RUNNER_TEMP\cf8-cli-installer_${installer_release_version}_winx64.zip" + Compress-Archive -DestinationPath "$installer_zip_filename" -Path * + popd + pushd "$env:RUNNER_TEMP\win32" + $installer_zip_filename="$env:RUNNER_TEMP\cf8-cli-installer_${installer_release_version}_win32.zip" + Compress-Archive -DestinationPath "$installer_zip_filename" -Path * + popd + Get-ChildItem "$env:RUNNER_TEMP" + + - name: Save installer and dist files as a GitHub Action Artifact + uses: actions/upload-artifact@v2 + with: + name: cf-cli-windows-packages + if-no-files-found: error + path: ${{ runner.temp }}/cf8-cli-installer*win*.zip + +################################# +######## Release Section ######## +################################# + + s3-upload: + name: Upload Artifacts to S3 bucket + if: ${{ github.ref_type == 'tag' }} + runs-on: ubuntu-latest + needs: + - test-rpm-package + - test-deb-package + - test-macos + - test-windows + environment: PROD + permissions: + actions: read + contents: read + steps: + - name: Checkout cli + uses: actions/checkout@v2 + - name: get semver version + # set environment var for subsequent steps. see: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable + run: | + INSTALLER_RELEASE_VERSION=$(cat BUILD_VERSION | tr -d v) + echo "INSTALLER_RELEASE_VERSION=${INSTALLER_RELEASE_VERSION}" >> $GITHUB_ENV + + - name: Download signed artifacts + uses: actions/download-artifact@v2 + with: + path: signed # download all artifacts to 'signed/' + + - name: Archive linux binaries for upload + run: | + + prepare_legal() { + cp ../../.github/license/LICENSE-WITH-3RD-PARTY-LICENSES LICENSE + cp ../../.github/license/CF_NOTICE NOTICE + } + + prepare_artifacts() { + chmod +x cf8 + ln -s cf8 cf + prepare_legal + } + + prepare_win_artifacts() { + cp cf8.exe cf.exe + prepare_legal + } + + pushd signed + mkdir linux_i686 linux_x86-64 + mv cf-cli-linux-binaries/cf-cli_linux_i686 linux_i686/cf8 + mv cf-cli-linux-binaries/cf-cli_linux_x86-64 linux_x86-64/cf8 + pushd linux_i686 + prepare_artifacts + tar -cvzf cf8-cli_${INSTALLER_RELEASE_VERSION}_linux_i686.tgz * + popd + pushd linux_x86-64 + prepare_artifacts + tar -cvzf cf8-cli_${INSTALLER_RELEASE_VERSION}_linux_x86-64.tgz * + popd + + mkdir osx + mv cf-cli-macos-binaries/cf-cli_osx osx/cf8 + pushd osx + prepare_artifacts + tar -cvzf cf8-cli_${INSTALLER_RELEASE_VERSION}_osx.tgz * + popd + + mkdir win32 winx64 + mv cf-cli-windows-binaries/cf-cli_win32.exe win32/cf8.exe + mv cf-cli-windows-binaries/cf-cli_winx64.exe winx64/cf8.exe + pushd win32 + prepare_win_artifacts + # -y flag avoids the default behavior of derefencing the link, so we archive the symlink as-is + zip -y cf8-cli_${INSTALLER_RELEASE_VERSION}_win32.zip * + popd + pushd winx64 + prepare_win_artifacts + # -y flag avoids the default behavior of derefencing the link, so we archive the symlink as-is + zip -y cf8-cli_${INSTALLER_RELEASE_VERSION}_winx64.zip * + popd + popd + env: + INSTALLER_RELEASE_VERSION: ${{ env.INSTALLER_RELEASE_VERSION }} + + - name: Rearrange artifacts before upload + run: | + mkdir upload + cp -t upload \ + signed/cf-cli-linux-rpm-packages/cf*rpm \ + signed/cf-cli-linux-deb-packages/cf*deb \ + signed/cf-cli-macos-packages/cf*pkg \ + signed/cf-cli-windows-packages/cf*zip \ + signed/linux_i686/*tgz \ + signed/linux_x86-64/*tgz \ + signed/osx/*tgz \ + signed/win32/*zip \ + signed/winx64/*zip + + - name: Upload installers to CLAW S3 bucket + if: ${{ github.ref_type == 'tag' }} + # forked for security considerations + uses: pivotalsoftware/s3-sync-action@v0.5.2 #pinned to no-default-region change + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + SOURCE_DIR: upload + DEST_DIR: "releases/v${{ env.INSTALLER_RELEASE_VERSION }}" + + - name: list S3 for human verification + uses: docker://amazon/aws-cli:latest + with: + args: s3 ls "${{ env.AWS_S3_BUCKET }}/releases/v${{ env.INSTALLER_RELEASE_VERSION }}/" + env: + AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + INSTALLER_RELEASE_VERSION: ${{ env.INSTALLER_RELEASE_VERSION }} + + - name: Instruct human to update CLAW + run: | + echo "Please go to https://github.com/cloudfoundry/CLAW/blob/develop/claw-variables.yml and add the following line to the file:" + echo + echo "- ${INSTALLER_RELEASE_VERSION}" + + + + github-release-draft: + name: Create GitHub Release Draft + if: ${{ github.ref_type == 'tag' }} + runs-on: ubuntu-latest + environment: PROD + permissions: + actions: read + contents: write + needs: + - test-rpm-package + - test-deb-package + - test-macos + - test-windows + steps: + - name: Download signed artifacts + uses: actions/download-artifact@v2 + with: + path: signed # download all artifacts to 'signed/' + + - name: Create draft release + uses: pivotalsoftware/action-gh-release@v1 + with: + draft: true + repository: ${{ secrets.GIT_RELEASE_TARGET_REPO }} # repo to draft a release under, in / format + token: ${{ secrets.GIT_REPO_ACCESS_TOKEN }} # only needed when pushing to a repo other than 'self' + fail_on_unmatched_files: true + files: | + signed/cf-cli-linux-binaries/cf-cli* + signed/cf-cli-linux-deb-packages/cf*deb + signed/cf-cli-linux-rpm-packages/cf*rpm + signed/cf-cli-macos-binaries/cf-cli* + signed/cf-cli-macos-packages/cf*pkg + signed/cf-cli-windows-binaries/cf-cli*.exe + signed/cf-cli-windows-packages/*.zip + + +# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell: diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index eb0e0323d1b..e404f2dc45a 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -12,6 +12,7 @@ jobs: analyze: name: Analyze runs-on: ubuntu-latest + if: ${{ github.action_repository == 'cloudfoundry/cli' }} permissions: actions: read contents: read @@ -33,3 +34,5 @@ jobs: - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + +# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell: diff --git a/.github/workflows/units.yml b/.github/workflows/units.yml index 5c6446e4f65..381e21aa522 100644 --- a/.github/workflows/units.yml +++ b/.github/workflows/units.yml @@ -13,101 +13,110 @@ defaults: shell: bash jobs: - lint: - name: Lint code + shared-values: + name: Shared Values runs-on: ubuntu-latest + outputs: + go-version: ${{ steps.set-go-version.outputs.go-version }} steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - - name: Run go fmt - run: go fmt && git diff --exit-code + - id: set-go-version + run: | + echo "::set-output name=go-version::1.17" - units-linux: - name: Units Linux + lint: + name: Lint code runs-on: ubuntu-latest + needs: shared-values steps: - - - name: Checkout + + - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go + + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 - - - name: Set up Test - run: | - go get -u github.com/onsi/ginkgo/ginkgo - go get github.com/onsi/gomega/matchers@v1.10.5 - - - name: Run Linux Units - run: make units - env: - ACK_GINKGO_RC: true + go-version: ${{ needs.shared-values.outputs.go-version }} + + - name: Run go fmt + run: go fmt && git diff --exit-code - units-macos: - name: Units OS X - runs-on: macos-latest + units: + name: Units + needs: shared-values + strategy: + matrix: + os: + - ubuntu-latest + - ubuntu-18.04 + - macos-latest + - macos-10.15 + runs-on: ${{ matrix.os }} steps: - - - name: Checkout + + - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go + + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 - - - name: Set up Test + go-version: ${{ needs.shared-values.outputs.go-version }} + + - name: Set up Test run: | go get -u github.com/onsi/ginkgo/ginkgo go get github.com/onsi/gomega/matchers@v1.10.5 - - - name: Run MacOS Units + + - name: Run Linux Units run: make units env: ACK_GINKGO_RC: true units-windows: name: Units Windows - runs-on: windows-latest + strategy: + matrix: + os: + - windows-2022 + - windows-2019 + - windows-2016 + runs-on: ${{ matrix.os }} + needs: shared-values + defaults: + run: + shell: pwsh steps: - - - name: Checkout + + - name: Checkout uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go + + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 - - - name: Set up Test + go-version: ${{ needs.shared-values.outputs.go-version }} + + - name: Set up Test run: | go get -u github.com/onsi/ginkgo/ginkgo go get github.com/onsi/gomega/matchers@v1.10.5 - - - name: Run Windows Units - shell: pwsh + + - name: Get build-time dependencies + run: | + choco install --no-progress --limit-output -y make + + - name: Run Windows Units + env: + ACK_GINKGO_RC: true run: > + # Get-Command make + # Get-Item Makefile + # make units-non-plugin + ginkgo -r -p -randomizeAllSpecs -randomizeSuites -skipPackage integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword -flakeAttempts=2 - env: - ACK_GINKGO_RC: true + +# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell: diff --git a/.github/workflows/update-repos.yml b/.github/workflows/update-repos.yml new file mode 100644 index 00000000000..c12e52459a3 --- /dev/null +++ b/.github/workflows/update-repos.yml @@ -0,0 +1,416 @@ +name: Update Repositories + +on: + workflow_dispatch: + inputs: + build_version: + description: 'Build Version' + required: true + default: '8.3.0' + type: string + +permissions: + contents: write + +defaults: + run: + shell: bash + +jobs: + shared-values: + name: Setup + runs-on: ubuntu-latest + if: ${{ github.action_repository != 'cloudfoundry/cli' }} + outputs: + build-version: ${{ steps.set-build-version.outputs.build-version }} + secrets-environment: ${{ steps.set-secrets-environment.outputs.secrets-environment }} + steps: + + - name: Set environment + id: set-secrets-environment + run: echo "::set-output name=secrets-environment::PROD" + + - name: Checkout cli + uses: actions/checkout@v2 + + - name: Set build version + id: set-build-version + run: | + version=$(cat BUILD_VERSION) + echo "::set-output name=build-version::$version" + + update-homebrew: + name: Update Homebrew Repository + runs-on: ubuntu-latest + needs: shared-values + environment: ${{ needs.shared-values.outputs.secrets-environment }} + env: + BUILD_VERSION: ${{ needs.shared-values.outputs.build-version }} + steps: + + - name: Checkout cli-ci + uses: actions/checkout@v2 + with: + repository: cloudfoundry/cli-ci.git + ref: master + path: cli-ci + + - name: Checkout homebrew-tap + uses: actions/checkout@v2 + with: + repository: cloudfoundry/homebrew-tap + ref: master + path: homebrew-tap + ssh-key: ${{ secrets.GIT_DEPLOY_HOMEBREW_TAP }} + + - name: Setup + run: | + mkdir cf8-cli-osx-tarball cf8-cli-linux-tarball + + - name: Calculate checksums + run: | + set -x + + curl -L "https://packages.cloudfoundry.org/stable?release=macosx64-binary&version=${BUILD_VERSION}&source=github-rel" \ + > cf8-cli-osx-tarball/cf8-cli_${BUILD_VERSION}_osx.tgz + + # Because CLAW always returns 200 we have to check if we got archive + file cf8-cli-osx-tarball/cf8-cli_${BUILD_VERSION}_osx.tgz | grep -q gzip || exit 1 + + curl -L "https://packages.cloudfoundry.org/stable?release=linux64-binary&version=${BUILD_VERSION}&source=github-rel" \ + > cf8-cli-linux-tarball/cf8-cli_${BUILD_VERSION}_linux64.tgz + + # Because CLAW always returns 200 we have to check if we got archive + file cf8-cli-linux-tarball/cf8-cli_${BUILD_VERSION}_linux64.tgz | grep -q gzip || exit 1 + + pushd cf8-cli-osx-tarball + CLI_OSX_SHA256=$(shasum -a 256 cf8-cli_*_osx.tgz | cut -d ' ' -f 1) + popd + + pushd cf8-cli-linux-tarball + CLI_LINUX_64_SHA256=$(shasum -a 256 cf8-cli_*_linux64.tgz | cut -d ' ' -f 1) + popd + + echo "CLI_OSX_SHA256=${CLI_OSX_SHA256}" >> $GITHUB_ENV + echo "CLI_LINUX_64_SHA256=${CLI_LINUX_64_SHA256}" >> $GITHUB_ENV + + - name: Generate Homebrew formula file + run: | + set -ex + + pushd homebrew-tap + cat < cf-cli@8.rb + require 'formula' + + class CfCliAT8 < Formula + homepage 'https://code.cloudfoundry.org/cli' + version '${BUILD_VERSION}' + + if OS.mac? + url 'https://packages.cloudfoundry.org/homebrew/cf8-${BUILD_VERSION}.tgz' + sha256 '${CLI_OSX_SHA256}' + elsif OS.linux? + url 'https://packages.cloudfoundry.org/stable?release=linux64-binary&version=${BUILD_VERSION}&source=homebrew' + sha256 '${CLI_LINUX_64_SHA256}' + end + + depends_on :arch => :x86_64 + + def install + bin.install 'cf8' + bin.install_symlink 'cf8' => 'cf' + (bash_completion/"cf8-cli").write <<-completion + $(cat ../cli-ci/ci/installers/completion/cf8) + completion + doc.install 'LICENSE' + doc.install 'NOTICE' + end + + test do + system "#{bin}/cf8" + end + end + EOF + + popd + + - name: Commit new homebrew formula + run: | + pushd homebrew-tap + git add cf-cli@8.rb + + if ! [ -z "$(git status --porcelain)"]; then + git config user.name github-actions + git config user.email github-actions@github.com + git commit -m "Release CF CLI $BUILD_VERSION" + else + echo "no new version to commit" + fi + + git push + + echo "::group::cf-cli@8.rb" + cat cf-cli@8.rb + echo "::endgroup::" + + echo "::group::git show" + git show + echo "::endgroup::" + + popd + + test-homebrew: + name: Test Homebrew Repository + runs-on: macos-latest + needs: + - shared-values + - update-homebrew + environment: ${{ needs.shared-values.outputs.secrets-environment }} + env: + BUILD_VERSION: ${{ needs.shared-values.outputs.build-version }} + steps: + + - name: Install CF CLI via Homebrew + run: | + set -evx + + brew install cloudfoundry/tap/cf-cli@8 + installed_cf_version=$(cf8 version) + + cf_location=$(which cf) + + echo $cf_location + echo $installed_cf_version + echo $BUILD_VERSION + + codesign --verify $cf_location || echo --- + + cf -v | grep "$BUILD_VERSION" + + update-deb: + name: Update Debian Repository + runs-on: ubuntu-latest + needs: shared-values + environment: ${{ needs.shared-values.outputs.secrets-environment }} + env: + BUILD_VERSION: ${{ needs.shared-values.outputs.build-version }} + AWS_BUCKET_NAME: cf-cli-debian-repo + AWS_DEFAULT_REGION: us-west-2 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + steps: + + - name: Setup + run: | + echo "BUILD_VERSION: $BUILD_VERSION" + echo "Environment: $ENVIRONMENT" + + - name: Checkout + uses: actions/checkout@v2 + + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.3 + - run: gem install deb-s3 + #RUN apt install -y ruby1.9.1 createrepo + + - name: Load GPG key + env: + SIGNING_KEY_GPG: ${{ secrets.SIGNING_KEY_GPG }} + SIGNING_KEY_GPG_PASSPHRASE: ${{ secrets.SIGNING_KEY_GPG_PASSPHRASE }} + run: | + echo -n "$SIGNING_KEY_GPG" | base64 --decode | gpg --no-tty --batch --pinentry-mode loopback --import + + - name: View GPG keys + run: gpg --list-keys + + - name: Configure GPG + run: | + echo "Configure GPG" + + # mkdir gpg-dir + # export GNUPGHOME=$PWD/gpg-dir + # chmod 700 $GNUPGHOME + # TODO: restore + # trap "rm -rf $GNUPGHOME" 0 + + cat >> ~/gpg.conf < installers/cf8-cli-installer_${BUILD_VERSION}_i686.deb + curl -L "https://cli.run.pivotal.io/stable?release=debian64&version=${BUILD_VERSION}&source=github-rel" > installers/cf8-cli-installer_${BUILD_VERSION}_x86-64.deb + + - name: Update Debian Repository + env: + DEBIAN_FRONTEND: noninteractive + SIGNING_KEY_GPG_ID: ${{ secrets.SIGNING_KEY_GPG_ID }} + run: | + deb-s3 upload installers/*.deb \ + --preserve-versions \ + --bucket=${AWS_BUCKET_NAME} \ + --sign=${SIGNING_KEY_GPG_ID} + + test-deb: + name: Test Debian Repository + runs-on: ubuntu-latest + needs: + - shared-values + - update-deb + environment: ${{ needs.shared-values.outputs.secrets-environment }} + env: + BUILD_VERSION: ${{ needs.shared-values.outputs.build-version }} + steps: + + - name: Install CF CLI via apt + run: | + set -o pipefail -e + + sudo apt update + sudo apt install -y wget gnupg + + wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - + echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list + + sudo apt update + sudo apt install -y cf8-cli + + which cf + + set -x + + cf -v + cf8 -v + + cf -v | grep "$BUILD_VERSION" + + update-rpm: + name: Update RPM Repository + runs-on: ubuntu-18.04 + environment: ${{ needs.shared-values.outputs.secrets-environment }} + needs: shared-values + env: + AWS_DEFAULT_REGION: us-east-1 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + steps: + + - name: Setup + env: + BUILD_VERSION: ${{ github.event.inputs.build_version }} + ENVIRONMENT: ${{ github.event.inputs.environment }} + run: | + echo "BUILD_VERSION: $BUILD_VERSION" + echo "Environment: $ENVIRONMENT" + + # TODO: fix backup + # - name: Download current RPM repodata + # env: + # AWS_DEFAULT_REGION: us-east-1 + # AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + # AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + # uses: docker://amazon/aws-cli:latest + # with: + # args: > + # s3 cp --recursive + # s3://cf-cli-rpm-repo/ + # backup + # TODO: fix https://aws.amazon.com/premiumsupport/knowledge-center/s3-access-denied-listobjects-sync/ + # + # - name: List assets + # run: | + # ls -R + # + # - name: Backup current Linux RPM repodata + # uses: actions/upload-artifact@v2 + # with: + # if-no-files-found: error + # name: cf-cli-linux-rpm-repodata-backup + # path: backup + + - name: Install Linux Packages + run: > + sudo apt update && + sudo apt install -y --no-install-recommends + gnupg createrepo + + - name: Download V8 RPMs + uses: docker://amazon/aws-cli:latest + with: + args: > + s3 sync --exclude "*" --include "releases/*/*installer*.rpm" + s3://v8-cf-cli-releases . + + - name: Download V7 RPMs + uses: docker://amazon/aws-cli:latest + with: + args: > + s3 sync --exclude "*" --include "releases/*/*installer*.rpm" + s3://v7-cf-cli-releases . + + - name: Download V6 RPMs + uses: docker://amazon/aws-cli:latest + with: + args: > + s3 sync --exclude "*" --include "releases/*/*installer*.rpm" + s3://cf-cli-releases . + + - name: Sign repo + run: | + createrepo --checksum=sha . + + - name: List assets + run: | + ls -R + + - name: Store Linux RPM repodata + uses: actions/upload-artifact@v2 + with: + if-no-files-found: error + name: cf-cli-linux-rpm-repodata + path: repodata + + - name: Upload RPM repodata + uses: docker://amazon/aws-cli:latest + with: + args: > + s3 sync --delete + repodata + s3://cf-cli-rpm-repo/repodata + + test-rpm-repo: + name: Test RPM Repository + needs: + - shared-values + - update-rpm + runs-on: ubuntu-latest + container: + image: fedora + environment: ${{ needs.shared-values.outputs.secrets-environment }} + env: + BUILD_VERSION: ${{ needs.shared-values.outputs.build-version }} + steps: + + - name: Configure Custom CF Repository + run: | + curl -sL -o /etc/yum.repos.d/cloudfoundry-cli.repo \ + https://packages.cloudfoundry.org/fedora/cloudfoundry-cli.repo + + - name: Install cf8-cli package + run: dnf install -y cf8-cli + + - name: Print CF CLI Versions + run: | + cf -v + cf8 -v + + - name: Test Version Match + run: cf -v | grep -q "$BUILD_VERSION" + +# vim: set sw=2 ts=2 sts=2 et tw=78 foldlevel=2 fdm=indent nospell: diff --git a/.gitignore b/.gitignore index 85d8d090b19..bdd84341efc 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,8 @@ tmp/ .hg/ +.envrc + *.test /tags diff --git a/Makefile b/Makefile index 195d9286aa3..aa70bbe8001 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -SHELL := env PATH=$(PATH) /bin/bash CF_DIAL_TIMEOUT ?= 15 NODES ?= 10 PACKAGES ?= api actor command types util version integration/helpers @@ -17,15 +16,13 @@ REQUIRED_FOR_STATIC_BINARY =-a -tags "netgo" -installsuffix netgo GOSRC = $(shell find . -name "*.go" ! -name "*test.go" ! -name "*fake*" ! -path "./integration/*") UNAME_S := $(shell uname -s) - -TARGET = v7 SLOW_SPEC_THRESHOLD=120 -GINKGO_FLAGS=-r -randomizeAllSpecs -requireSuite -GINKGO_INT_FLAGS=$(GINKGO_FLAGS) -slowSpecThreshold $(SLOW_SPEC_THRESHOLD) +GINKGO_FLAGS ?= -r -randomizeAllSpecs -requireSuite +GINKGO_INT_FLAGS = $(GINKGO_FLAGS) -slowSpecThreshold $(SLOW_SPEC_THRESHOLD) ginkgo_int = ginkgo $(GINKGO_INT_FLAGS) -GINKGO_UNITS_FLAGS=$(GINKGO_FLAGS) -randomizeSuites -p +GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomizeSuites -p ginkgo_units = ginkgo $(GINKGO_UNITS_FLAGS) GOFLAGS := -mod=mod @@ -88,7 +85,7 @@ integration-shared-experimental: build integration-cleanup ## Run experimental i ive: integration-versioned-experimental integration-experimental-versioned: integration-versioned-experimental integration-versioned-experimental: build integration-cleanup ## Run experimental integration tests that are specific to your CLI version - $(ginkgo_int) -nodes $(NODES) integration/$(TARGET)/experimental + $(ginkgo_int) -nodes $(NODES) integration/v7/experimental ig: integration-global integration-global: build integration-cleanup integration-shared-global integration-global-versioned ## Run all unparallelizable integration tests that make cross-cutting changes to their test CF foundation @@ -101,7 +98,7 @@ integration-shared-global: build integration-cleanup ## Serially run integration ivg: integration-versioned-global integration-global-versioned: integration-versioned-global integration-versioned-global: build integration-cleanup ## Serially run integration tests that make cross-cutting changes to their test CF foundation and are specific to your CLI version - $(ginkgo_int) integration/$(TARGET)/global + $(ginkgo_int) integration/v7/global ii: integration-isolated integration-isolated: build integration-cleanup integration-shared-isolated integration-isolated-versioned ## Run all parallel-enabled integration tests, both versioned and shared across versions @@ -121,14 +118,14 @@ integration-shared-performance: build integration-cleanup ivi: integration-versioned-isolated integration-isolated-versioned: integration-versioned-isolated integration-versioned-isolated: build integration-cleanup ## Run all parallel-enabled integration tests, both versioned and shared across versions - $(ginkgo_int) -nodes $(NODES) integration/$(TARGET)/isolated + $(ginkgo_int) -nodes $(NODES) integration/v7/isolated integration-plugin: build integration-cleanup ## Run all plugin-related integration tests $(ginkgo_int) -nodes $(NODES) integration/shared/plugin ip: integration-push integration-push: build integration-cleanup ## Run all push-related integration tests - $(ginkgo_int) -nodes $(NODES) integration/$(TARGET)/push + $(ginkgo_int) -nodes $(NODES) integration/v7/push integration-selfcontained: build $(ginkgo_int) -nodes $(NODES) integration/v7/selfcontained diff --git a/bin/bump-version b/bin/bump-version index 7bb7882877a..b4693dc4e90 100755 --- a/bin/bump-version +++ b/bin/bump-version @@ -1,13 +1,17 @@ #!/usr/bin/env bash -set -e +set -eo pipefail component=$1 +script_dir=$(dirname $0) +version_file="$script_dir/../BUILD_VERSION" -old_version=$(cat BUILD_VERSION) +old_version=$(cat $version_file) major=$(echo $old_version | cut -d'.' -f 1) minor=$(echo $old_version | cut -d'.' -f 2) -patch=$(echo $old_version | cut -d'.' -f 3) +patchAndSuffix=$(echo $old_version | cut -d'.' -f 3) +patch=$(echo $patchAndSuffix | cut -d'-' -f 1) +suffix=$(echo $patchAndSuffix | cut -s -d'-' -f 2) case "$component" in major ) @@ -28,14 +32,19 @@ case "$component" in exit 1 ;; esac +set -u version=$major.$minor.$patch +if [ ! -z "$suffix" ]; then + version="${version}-${suffix}" +fi + echo "Updating BUILD_VERSION file to $version" -echo $version > BUILD_VERSION +echo $version > $version_file echo "Committing change" git reset . -git add BUILD_VERSION +git add $version_file git commit -m "Bump version to $version" diff --git a/bin/generate-release-notes b/bin/generate-release-notes index f1aad7ebcc5..0d7d8649681 100755 --- a/bin/generate-release-notes +++ b/bin/generate-release-notes @@ -5,7 +5,7 @@ VERSION=$(cat BUILD_VERSION) cat <<-NOTES Package Manager Installation ---------- -- [apt-get, yum, homebrew](https://github.com/cloudfoundry/cli#installing-using-a-package-manager) +- [apt-get, yum, homebrew](https://github.com/cloudfoundry/cli#getting-started) Installers ----------