From 4fd6fb262989b3f4e384e1e0a6ef15d4e0be9d78 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Tue, 23 Jan 2024 18:53:22 -0700
Subject: [PATCH 01/10] (chore): cleanup ado, add badge
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
README.md | 2 +-
build/README.md | 30 --
build/atom-template.xml | 25 --
build/azure-pipelines.canary.yml | 23 --
build/azure-pipelines.install.yml | 26 --
build/azure-pipelines.integration.yml | 74 ----
build/azure-pipelines.pr-automatic.yml | 219 ------------
build/azure-pipelines.release-template.yml | 318 ------------------
build/azure-pipelines.release.yml | 19 --
build/azure-pipelines.test-release.yml | 17 -
build/doc-only-build.sh | 12 -
build/images/README.md | 11 -
build/images/agent/Dockerfile | 12 -
build/images/client/Dockerfile | 24 --
build/images/server/Dockerfile | 28 --
build/images/workshop/Dockerfile | 27 --
build/protoc.Dockerfile | 5 -
.../testdata/bundles/mysql/.cnab/bundle.json | 1 -
build/testdata/bundles/mysql/.gitignore | 2 -
build/testdata/bundles/mysql/helpers.sh | 15 -
build/testdata/bundles/mysql/porter.yaml | 80 -----
.../bundles/wordpress/.cnab/bundle.json | 1 -
build/testdata/bundles/wordpress/.gitignore | 2 -
build/testdata/bundles/wordpress/helpers.sh | 14 -
build/testdata/bundles/wordpress/porter.yaml | 76 -----
build/testdata/bundles/wordpressv2/helpers.sh | 14 -
.../testdata/bundles/wordpressv2/porter.yaml | 80 -----
build/testdata/credentials/ci.json | 11 -
build/testdata/schema.json | 5 -
29 files changed, 1 insertion(+), 1172 deletions(-)
delete mode 100644 build/README.md
delete mode 100644 build/atom-template.xml
delete mode 100644 build/azure-pipelines.canary.yml
delete mode 100644 build/azure-pipelines.install.yml
delete mode 100644 build/azure-pipelines.integration.yml
delete mode 100644 build/azure-pipelines.pr-automatic.yml
delete mode 100644 build/azure-pipelines.release-template.yml
delete mode 100644 build/azure-pipelines.release.yml
delete mode 100644 build/azure-pipelines.test-release.yml
delete mode 100755 build/doc-only-build.sh
delete mode 100644 build/images/README.md
delete mode 100644 build/images/agent/Dockerfile
delete mode 100644 build/images/client/Dockerfile
delete mode 100644 build/images/server/Dockerfile
delete mode 100644 build/images/workshop/Dockerfile
delete mode 100644 build/protoc.Dockerfile
delete mode 100644 build/testdata/bundles/mysql/.cnab/bundle.json
delete mode 100644 build/testdata/bundles/mysql/.gitignore
delete mode 100755 build/testdata/bundles/mysql/helpers.sh
delete mode 100644 build/testdata/bundles/mysql/porter.yaml
delete mode 100644 build/testdata/bundles/wordpress/.cnab/bundle.json
delete mode 100644 build/testdata/bundles/wordpress/.gitignore
delete mode 100755 build/testdata/bundles/wordpress/helpers.sh
delete mode 100644 build/testdata/bundles/wordpress/porter.yaml
delete mode 100755 build/testdata/bundles/wordpressv2/helpers.sh
delete mode 100644 build/testdata/bundles/wordpressv2/porter.yaml
delete mode 100644 build/testdata/credentials/ci.json
delete mode 100644 build/testdata/schema.json
diff --git a/README.md b/README.md
index 487e4aaa4..d5ba8558a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[](https://www.cncf.io/projects/porter/)
-[](https://dev.azure.com/getporter/porter/_build/latest?definitionId=26&branchName=main)
+[](https://github.com/getporter/porter/actions/workflows/porter.yml)
diff --git a/build/README.md b/build/README.md
deleted file mode 100644
index 64255900c..000000000
--- a/build/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-These are assets used by the CI build.
-
-* testdata - test data used for the integration tests, such as credentials and test bundles.
-* images - source for any docker images that we publish.
-
-## Azure Pipelines
-
-See all Porter related [pipelines across all repositories](https://dev.azure.com/getporter/porter/_build).
-
-Our pipeline is broken into a few discrete builds so that we can control how and when they are triggered:
-
-* **porter-release: azure-pipelines.release.yml**: Publishes tagged releases. Does not run tests.
- This can be tested in a pull request using `/azp run test-porter-release`.
- [View Latest Builds](https://dev.azure.com/getporter/porter/_build?definitionId=2)
-* **porter-canary: azure-pipelines.canary.yml**: Validates canary releases, running the full test suite.
- [View Latest Builds](https://dev.azure.com/getporter/porter/_build?definitionId=26)
-* **porter-check-install: azure-pipelines.install.yml**: Validates our installation scripts against canary and tag releases.
- [View Latest Builds](https://dev.azure.com/getporter/porter/_build?definitionId=3)
-* **porter: azure-pipelines.pr-automatic.yml**: Validates everything we can without a live environment.
- [View Latest Builds](https://dev.azure.com/getporter/porter/_build?definitionId=18)
-* **porter-integration: azure-pipelines.integration.yml**: Runs the full integration test suite.
- Only runs when requested with `/azp run porter-integration` because they are slow.
- [View Latest Builds](https://dev.azure.com/getporter/porter/_build?definitionId=25)
-
-### Documentation Only Builds
-
-The `porter` and `porter-integration` builds [detect if the build is
-documentation only](doc-only-build.sh) and will short circuit the build. They
-look for changes to the website, markdown files, workshop materials and
-repository metadata files that do not affect the build.
\ No newline at end of file
diff --git a/build/atom-template.xml b/build/atom-template.xml
deleted file mode 100644
index 40fd06bd5..000000000
--- a/build/atom-template.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
- https://getporter.org/mixins
- Porter Mixins
- {{Updated}}
-
-
- Porter Authors
- https://getporter.org/mixins
-
- {{#Mixins}}
-
- {{/Mixins}}
- {{#Entries}}
-
- https://cdn.porter.sh/mixins/{{Mixin}}/{{Version}}
- {{Mixin}} @ {{Version}}
- {{Updated}}
-
- {{Version}}
- {{#Files}}
-
- {{/Files}}
-
- {{/Entries}}
-
diff --git a/build/azure-pipelines.canary.yml b/build/azure-pipelines.canary.yml
deleted file mode 100644
index 16215baa5..000000000
--- a/build/azure-pipelines.canary.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-trigger:
- branches:
- include:
- - refs/heads/main
- - refs/heads/release/*
-
-# Do not run on pull requests
-pr: none
-
-parameters:
- - name: shouldPublish
- type: boolean
- default: true
- - name: skipTests
- type: boolean
- default: false
-
-extends:
- template: azure-pipelines.release-template.yml
- parameters:
- skipTests: ${{parameters.skipTests}}
- shouldPublish: ${{parameters.shouldPublish}}
- registry: ghcr.io/getporter
diff --git a/build/azure-pipelines.install.yml b/build/azure-pipelines.install.yml
deleted file mode 100644
index f2a2daea8..000000000
--- a/build/azure-pipelines.install.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-trigger:
- branches:
- include:
- - refs/heads/main
-
-jobs:
-- job: linux
- pool:
- vmImage: 'ubuntu-latest'
- steps:
- - bash: scripts/test/test-linux-install.sh
- displayName: 'Test Install Script'
-
-- job: windows
- pool:
- vmImage: 'windows-latest'
- steps:
- - powershell: scripts\test\test-windows-install.ps1
- displayName: 'Test Install Script'
-
-- job: macos
- pool:
- vmImage: 'macOS-latest'
- steps:
- - bash: scripts/test/test-mac-install.sh
- displayName: 'Test Install Script'
diff --git a/build/azure-pipelines.integration.yml b/build/azure-pipelines.integration.yml
deleted file mode 100644
index c95d4b964..000000000
--- a/build/azure-pipelines.integration.yml
+++ /dev/null
@@ -1,74 +0,0 @@
-# Run integration tests
-# /azp run porter-integration
-
-# The integration tests are run in the canary build. This is just for running integration tests manually for pull requests.
-trigger: none
-
-# Only test a PR when requested with a GitHub comment, /azp run porter-integration
-pr:
- autoCancel: true # Cancel an outdated build when people push new changes to their PR
-
-pool:
- vmImage: "ubuntu-latest"
-
-variables: # these are really constants
- GOVERSION: "1.20.7"
- # Cache go modules and the results of go build/test
- # Increment the version number prefix of the key and restoreKey to clear the cache
- GOCACHE: $(Pipeline.Workspace)/.cache/go-build/
- GOCACHE_KEY: 'v3 | go-build | "$(Agent.OS)" | go.sum'
- GOCACHE_RESTOREKEYS: |
- v3 | go-build | "$(Agent.OS)"
- v3 | go-build | "$(Agent.OS)" | go.sum
- GOMODCACHE: /home/vsts/go/pkg/mod
- GOMODCACHE_KEY: 'v4 | go-pkg | "$(Agent.OS)" | go.sum'
- GOMODCACHE_RESTOREKEYS: |
- v4 | go-pkg | "$(Agent.OS)"
- v4 | go-pkg | "$(Agent.OS)" | go.sum
-
-stages:
-- stage: Setup
- jobs:
- - job: pr_type
- displayName: "Determine PR Type"
- steps:
- - bash: ./build/doc-only-build.sh
- name: BUILD
- displayName: "Is Doc Only?"
-
-- stage: Validate
- dependsOn: Setup
- condition: and(succeeded(), eq(dependencies.Setup.outputs['pr_type.BUILD.DOCS_ONLY'], 'false'))
- jobs:
- - job: integration_test
- displayName: "Integration Test"
- steps:
- # We log in here because TestRegistry integration test needs a valid docker session
- # This unfortunately means that this pipeline must be manually triggered for non-maintainers
- - task: Docker@2
- displayName: Docker Login
- inputs:
- command: login
- containerRegistry: ghcr.io/getporter
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: $(GOVERSION)
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage build
- displayName: "Native Build"
- - bash: mage -v TestIntegration
- displayName: "Integration Test"
diff --git a/build/azure-pipelines.pr-automatic.yml b/build/azure-pipelines.pr-automatic.yml
deleted file mode 100644
index d93500334..000000000
--- a/build/azure-pipelines.pr-automatic.yml
+++ /dev/null
@@ -1,219 +0,0 @@
-# Go
-# Build your Go project.
-# Add steps that test, save build artifacts, deploy, and more:
-# https://docs.microsoft.com/azure/devops/pipelines/languages/go
-
-trigger: none
-pr:
- autoCancel: true
-
-pool:
- vmImage: "ubuntu-latest"
-
-variables:
- GOVERSION: "1.20.7"
- # Cache go modules and the results of go build/test
- # Increment the version number prefix of the key and restoreKey to clear the cache
- GOCACHE: $(Pipeline.Workspace)/.cache/go-build/
- GOCACHE_KEY: 'v3 | go-build | "$(Agent.OS)" | go.sum'
- GOCACHE_RESTOREKEYS: |
- v3 | go-build | "$(Agent.OS)"
- v3 | go-build | "$(Agent.OS)" | go.sum
- # Use separate cache for the xbuild jobs, since they generate different outputs
- GOXCACHE_KEY: 'v3 | go-xbuild | "$(Agent.OS)" | go.sum'
- GOXCACHE_RESTOREKEYS: |
- v3 | go-xbuild | "$(Agent.OS)"
- v3 | go-xbuild | "$(Agent.OS)" | go.sum
- GOMODCACHE: /home/vsts/go/pkg/mod
- GOMODCACHE_KEY: 'v4 | go-pkg | "$(Agent.OS)" | go.sum'
- GOMODCACHE_RESTOREKEYS: |
- v4 | go-pkg | "$(Agent.OS)"
- v4 | go-pkg | "$(Agent.OS)" | go.sum
-
-stages:
- - stage: Setup
- jobs:
- - job: pr_type
- displayName: "Determine PR Type"
- steps:
- - bash: ./build/doc-only-build.sh
- name: BUILD
- displayName: "Is Doc Only?"
-
- - stage: Validate
- dependsOn: Setup
- condition: and(succeeded(), eq(dependencies.Setup.outputs['pr_type.BUILD.DOCS_ONLY'], 'false'))
- jobs:
- - job: build
- displayName: "Native Compile"
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage build
- displayName: "Native Build"
- - task: PublishPipelineArtifact@0
- displayName: "Publish Native Binaries"
- inputs:
- targetPath: $(System.DefaultWorkingDirectory)/bin
- archiveFilePatterns: "**"
- artifactName: "build-bin"
- - job: xbuild
- displayName: "Cross Compile"
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- # Use special cache keys just for cross-compiled binaries
- key: "$(GOXCACHE_KEY)"
- restoreKeys: $(GOXCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage XBuildAll
- displayName: "Cross Compile"
- - task: PublishPipelineArtifact@0
- displayName: "Publish Release Binaries"
- inputs:
- targetPath: $(System.DefaultWorkingDirectory)/bin
- archiveFilePatterns: "**"
- artifactName: "xbuild-bin"
- - job: unit_test
- displayName: "Unit Test"
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage TestUnit
- displayName: "Unit Test"
- - job: VetLint
- displayName: "Vet and Lint"
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage Vet
- displayName: "Vet"
- - bash: mage Lint
- displayName: "Lint"
- - job: build_docker
- dependsOn: xbuild
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- - task: DownloadPipelineArtifact@2
- displayName: "Download Cross-Compiled Porter Binaries"
- inputs:
- source: current
- artifact: xbuild-bin
- path: bin
- - script: go run mage.go ConfigureAgent UseXBuildBinaries
- displayName: "Setup Bin"
- - script: mage BuildImages
- displayName: "Build Docker Images"
- - job: smoke_test
- displayName: "Run smoke tests on"
- dependsOn: xbuild
- strategy:
- matrix:
- # Skip windows smoke tests until we fix the windows agent
- #windows:
- # poolName: "windows"
- # vmImage: ""
- # GOMODCACHE: "C:/Users/porterci/go/pkg/mod"
- linux:
- poolName: "Azure Pipelines"
- vmImage: "ubuntu-latest"
- pool:
- name: $(poolName)
- vmImage: $(vmImage)
- steps:
- - task: DownloadPipelineArtifact@2
- displayName: "Download Cross-Compiled Porter Binaries"
- inputs:
- source: current
- artifact: xbuild-bin
- path: bin
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: "$(GOVERSION)"
- # On windows, restoring the cache fails because go wrote the files as readonly, undo that before restoring the cached go mod directory
- - task: CmdLine@2
- displayName: Windows Cache Prep
- condition: eq(variables.poolName, 'windows')
- inputs:
- script: "attrib -r $(GOMODCACHE)/*.* /s"
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent UseXBuildBinaries
- displayName: "Configure Agent"
- - script: mage -v TestSmoke
- displayName: "Run Smoke Tests"
diff --git a/build/azure-pipelines.release-template.yml b/build/azure-pipelines.release-template.yml
deleted file mode 100644
index 69cc16ccb..000000000
--- a/build/azure-pipelines.release-template.yml
+++ /dev/null
@@ -1,318 +0,0 @@
-variables: # these are really constants
- vmImage: "ubuntu-latest"
- GOVERSION: "1.20.7"
- # Cache go modules and the results of go build/test
- # Increment the version number prefix of the key and restoreKey to clear the cache
- GOCACHE: $(Pipeline.Workspace)/.cache/go-build/
- GOCACHE_KEY: 'v3 | go-build | "$(Agent.OS)" | go.sum'
- GOCACHE_RESTOREKEYS: |
- v3 | go-build | "$(Agent.OS)"
- v3 | go-build | "$(Agent.OS)" | go.sum
- # Use separate cache for the xbuild jobs, since they generate different outputs
- GOXCACHE_KEY: 'v3 | go-xbuild | "$(Agent.OS)" | go.sum'
- GOXCACHE_RESTOREKEYS: |
- v3 | go-xbuild | "$(Agent.OS)"
- v3 | go-xbuild | "$(Agent.OS)" | go.sum
- GOMODCACHE: /home/vsts/go/pkg/mod
- GOMODCACHE_KEY: 'v4 | go-pkg | "$(Agent.OS)" | go.sum'
- GOMODCACHE_RESTOREKEYS: |
- v4 | go-pkg | "$(Agent.OS)"
- v4 | go-pkg | "$(Agent.OS)" | go.sum
-
-parameters:
- - name: goVersion
- type: string
- default: "1.20.7"
- - name: registry
- type: string
- default: ghcr.io/getporter/test
- values:
- - ghcr.io/getporter
- - ghcr.io/getporter/test
- - name: shouldPublish
- type: boolean
- default: false
- - name: skipTests
- type: boolean
- default: false
-
-stages:
- - stage: Validate
- jobs:
- - job: build
- displayName: "Native Compile"
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage build
- displayName: "Native Build"
- - task: PublishPipelineArtifact@0
- displayName: "Publish Native Binaries"
- inputs:
- targetPath: $(System.DefaultWorkingDirectory)/bin
- archiveFilePatterns: "**"
- artifactName: "build-bin"
- - job: xbuild
- displayName: "Cross Compile"
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- # Use special cache keys just for cross-compiled binaries
- key: "$(GOXCACHE_KEY)"
- restoreKeys: $(GOXCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage XBuildAll
- displayName: "Cross Compile"
- - task: PublishPipelineArtifact@0
- displayName: "Publish Release Binaries"
- inputs:
- targetPath: $(System.DefaultWorkingDirectory)/bin
- archiveFilePatterns: "**"
- artifactName: "xbuild-bin"
- - job: VetLint
- displayName: "Vet and Lint"
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage Vet
- displayName: "Vet"
- - bash: mage Lint
- displayName: "Lint"
- - job: unit_test
- displayName: "Unit Test"
- condition: not(${{ parameters.skipTests }})
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent
- displayName: "Configure Agent"
- - bash: mage TestUnit
- displayName: "Unit Test"
- - job: integration_test
- displayName: "Integration Test"
- dependsOn: build
- condition: and(succeeded('build'), not(${{ parameters.skipTests }}))
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: DownloadPipelineArtifact@2
- displayName: "Download Bin"
- inputs:
- source: current
- artifact: build-bin
- path: bin
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- # We log in here because TestRegistry integration test needs a valid docker session
- # This unfortunately means that this pipeline must be manually triggered for non-maintainers
- - task: Docker@2
- displayName: Docker Login
- inputs:
- command: login
- containerRegistry: ghcr.io/getporter
- - script: go run mage.go ConfigureAgent SetBinExecutable
- displayName: "Configure Agent"
- - script: mage -v TestIntegration
- displayName: "Integration Test"
- - job: smoke_test
- displayName: "Run smoke tests on"
- dependsOn: xbuild
- condition: and(succeeded(), not(${{ parameters.skipTests }}))
- strategy:
- matrix:
- # Skip windows smoke tests until we can fix the windows agent
- #windows:
- # poolName: "windows"
- # vmImage: ""
- # GOMODCACHE: "C:/Users/porterci/go/pkg/mod"
- linux:
- poolName: "Azure Pipelines"
- vmImage: "ubuntu-latest"
- pool:
- name: $(poolName)
- vmImage: $(vmImage)
- steps:
- - task: DownloadPipelineArtifact@2
- displayName: "Download Cross-Compiled Porter Binaries"
- inputs:
- source: current
- artifact: xbuild-bin
- path: bin
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - script: go run mage.go ConfigureAgent UseXBuildBinaries
- displayName: "Setup Bin"
- - script: mage -v TestSmoke
- displayName: "Run Smoke Tests"
-
- - stage: Publish
- dependsOn: Validate
- condition: and(succeeded(), ${{ parameters.shouldPublish }})
- jobs:
- - job: publish_binaries
- displayName: "Publish Binaries"
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - task: DownloadPipelineArtifact@2
- displayName: "Download Cross-Compiled Porter Binaries"
- inputs:
- source: current
- artifact: xbuild-bin
- path: bin
- - script: go run mage.go ConfigureAgent UseXBuildBinaries
- displayName: "Setup Bin"
- - script: |
- mage PublishPorter PublishMixins
- env:
- GITHUB_TOKEN: $(GITHUB_TOKEN)
- displayName: "Publish Porter Binaries"
-
- - job: publish_docker
- displayName: "Publish Docker Images"
- pool:
- vmImage: ${{variables.vmImage}}
- steps:
- - task: GoTool@0
- displayName: "Set Go Version"
- inputs:
- version: ${{parameters.goVersion}}
- - task: Cache@2
- displayName: Cache Go Packages
- inputs:
- key: "$(GOMODCACHE_KEY)"
- restoreKeys: $(GOMODCACHE_RESTOREKEYS)
- path: $(GOMODCACHE)
- - task: Cache@2
- displayName: Cache Go Build
- inputs:
- key: "$(GOCACHE_KEY)"
- restoreKeys: $(GOCACHE_RESTOREKEYS)
- path: $(GOCACHE)
- - task: DownloadPipelineArtifact@2
- displayName: "Download Cross-Compiled Porter Binaries"
- inputs:
- source: current
- artifact: xbuild-bin
- path: bin
- - script: go run mage.go ConfigureAgent UseXBuildBinaries
- displayName: "Setup Bin"
- - task: Docker@1
- displayName: Docker Login
- inputs:
- containerRegistryType: Container Registry
- dockerRegistryEndpoint: ${{parameters.registry}} # Log in with the saved credentials for the destination registry
- command: login
- - script: PORTER_REGISTRY=${{parameters.registry}} mage PublishImages
- displayName: "Publish Docker Images to ${{parameters.registry}}"
diff --git a/build/azure-pipelines.release.yml b/build/azure-pipelines.release.yml
deleted file mode 100644
index 4cc16f10a..000000000
--- a/build/azure-pipelines.release.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-trigger:
- tags:
- include:
- - "v*"
- exclude:
- # We tag a release for canary-v1 or latest-v1 because of how we host our binaries with GitHub releases.
- # Do not trigger another release when we create these tags during the release process, preventing an infinite recursion of release builds.
- - "latest*"
- - "canary*"
-
-# Do not run on pull requests
-pr: none
-
-extends:
- template: azure-pipelines.release-template.yml
- parameters:
- skipTests: true
- shouldPublish: true
- registry: ghcr.io/getporter
diff --git a/build/azure-pipelines.test-release.yml b/build/azure-pipelines.test-release.yml
deleted file mode 100644
index f882c67bd..000000000
--- a/build/azure-pipelines.test-release.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# Do not run on push
-trigger: none
-
-parameters:
- - name: shouldPublish
- type: boolean
- default: true
- - name: skipTests
- type: boolean
- default: true
-
-extends:
- template: azure-pipelines.release-template.yml
- parameters:
- skipTests: ${{ parameters.skipTests }}
- shouldPublish: ${{ parameters.shouldPublish }}
- registry: ghcr.io/getporter/test
diff --git a/build/doc-only-build.sh b/build/doc-only-build.sh
deleted file mode 100755
index 10bac64bd..000000000
--- a/build/doc-only-build.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-# Return non-zero for a doc only build, and 0 for a builds that touch code.
-DOCS_REGEX='(LICENSE|netlify.toml)|(\.md$)|(^docs/)|(^.github/)|(^workshop/)'
-if [[ -z "$(git diff --name-only HEAD HEAD~ | grep -vE $DOCS_REGEX)" ]]; then
- echo "This is a doc-only build"
- echo "##vso[task.setvariable variable=DOCS_ONLY;isOutput=true]true"
-else
- echo "A full build must be run, code has been changed"
- echo "##vso[task.setvariable variable=DOCS_ONLY;isOutput=true]false"
-fi
diff --git a/build/images/README.md b/build/images/README.md
deleted file mode 100644
index 73ae10a07..000000000
--- a/build/images/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Porter Docker Images
-
-* client - This provides the porter client installed in a container. See the
- [Porter Client Docker Image][client] documentation for examples of how to
- use it.
-* workshop - This is a container suitable for teaching a workshop on Porter. See
- the [Porter Workshop Docker Image][workshop] documentation for examples of
- how to use it.
-
-[client]: https://getporter.org/docker-images/client/
-[workshop]: https://getporter.org/docker-images/workshop/
diff --git a/build/images/agent/Dockerfile b/build/images/agent/Dockerfile
deleted file mode 100644
index 66a07cc58..000000000
--- a/build/images/agent/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-ARG PORTER_VERSION
-ARG REGISTRY
-FROM $REGISTRY/porter:$PORTER_VERSION
-
-# This is where files that need to be copied into /app/.porter/ should be mounted
-VOLUME /porter-config
-
-ENV PORTER_HOME /app/.porter
-COPY --chown=65532:0 --chmod=770 bin/dev/agent-linux-amd64 /app/.porter/agent
-
-USER 65532
-ENTRYPOINT ["/app/.porter/agent"]
diff --git a/build/images/client/Dockerfile b/build/images/client/Dockerfile
deleted file mode 100644
index e600d6437..000000000
--- a/build/images/client/Dockerfile
+++ /dev/null
@@ -1,24 +0,0 @@
-FROM alpine:3 as builder
-WORKDIR /app/.porter
-
-RUN mkdir runtimes && \
- mkdir -p mixins/exec/runtimes
-
-# Only install porter and the exec mixin, everything else
-# must be mounted into the container
-COPY bin/dev/porter-linux-amd64 porter
-COPY bin/mixins/exec/dev/exec-linux-amd64 mixins/exec/exec
-RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
- ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
-
-# Copy the porter installation into a distroless container
-# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
-# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
-FROM gcr.io/distroless/static
-WORKDIR /app
-COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
-ENV PATH "$PATH:/app/.porter"
-
-# Run as a nonroot user
-USER 65532
-ENTRYPOINT ["/app/.porter/porter"]
diff --git a/build/images/server/Dockerfile b/build/images/server/Dockerfile
deleted file mode 100644
index f9a19bf0b..000000000
--- a/build/images/server/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-FROM alpine:3 as builder
-ARG TARGETARCH
-WORKDIR /app/.porter
-
-RUN mkdir runtimes && \
- mkdir -p mixins/exec/runtimes
-
-# Install porter-api-server, agent, and the exec mixin, everything else
-COPY bin/dev/porter-api-server-linux-$TARGETARCH porter
-COPY bin/dev/agent-linux-$TARGETARCH agent
-COPY bin/mixins/exec/dev/exec-linux-$TARGETARCH mixins/exec/exec
-RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
- ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
-
-# Copy the porter installation into a distroless container
-# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
-# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
-FROM gcr.io/distroless/static
-WORKDIR /app
-COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
-ENV PATH "$PATH:/app/.porter"
-# This is where files that need to be copied into /app/.porter/ should be mounted
-VOLUME /porter-config
-ENV PORTER_HOME /app/.porter
-
-# Run as a nonroot user
-USER 65532
-ENTRYPOINT ["/app/.porter/agent"]
\ No newline at end of file
diff --git a/build/images/workshop/Dockerfile b/build/images/workshop/Dockerfile
deleted file mode 100644
index 6a2ebe9ee..000000000
--- a/build/images/workshop/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-FROM docker:dind
-
-ENV HELM_VER v2.17.0
-
-RUN mkdir -p /root/.porter/runtimes && \
- mkdir -p /root/.porter/mixins/exec/runtimes
-
-RUN apk add bash \
- git \
- curl \
- bash-completion \
- jq \
- ca-certificates && \
- curl -o helm.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
- tar -xzf helm.tgz && \
- mv linux-amd64/helm /usr/local/bin && \
- rm helm.tgz && \
- helm init --client-only && \
- mkdir -p /workshop
-
-COPY bin/dev/porter-linux-amd64 /root/.porter/porter
-COPY bin/mixins/exec/dev/exec-linux-amd64 /root/.porter/mixins/exec/exec
-RUN ln -s /root/.porter/porter /root/.porter/runtimes/porter-runtime && \
- ln -s /root/.porter/mixins/exec/exec /root/.porter/mixins/exec/runtimes/exec-runtime && \
- ln -s /root/.porter/porter /usr/local/bin/porter
-
-WORKDIR /workshop
diff --git a/build/protoc.Dockerfile b/build/protoc.Dockerfile
deleted file mode 100644
index 6ad558086..000000000
--- a/build/protoc.Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM golang:1.20
-RUN apt-get update && apt-get -y install protobuf-compiler
-RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
-RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
-WORKDIR /proto
diff --git a/build/testdata/bundles/mysql/.cnab/bundle.json b/build/testdata/bundles/mysql/.cnab/bundle.json
deleted file mode 100644
index 59e6a30fd..000000000
--- a/build/testdata/bundles/mysql/.cnab/bundle.json
+++ /dev/null
@@ -1 +0,0 @@
-{"actions":{"ping":{"description":"ping","modifies":true}},"credentials":{"kubeconfig":{"path":"/home/nonroot/.kube/config","required":true}},"custom":{"sh.porter":{"commit":"43d077da","manifest":"bWl4aW5zOgotIGV4ZWMKLSBoZW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mdlOiB0cnVlCiAgICByZWxlYXNlczoKICAgICAgLSAie3sgYnVuZGxlLnBhcmFtZXRlcnMubXlzcWwtbmFtZSB9fSIKCm91dHB1dHM6CiAgLSBuYW1lOiBteXNxbC1wYXNzd29yZAogICAgZGVzY3JpcHRpb246ICJUaGUgbXlzcWwgZGF0YWJhc2UgcGFzc3dvcmQiCiAgICB0eXBlOiBzdHJpbmcKICAgIGRlZmF1bHQ6ICJkZWZhdWx0LXBhc3N3b3JkIgogICAgYXBwbHlUbzoKICAgICAgLSBpbnN0YWxsCiAgICAgIC0gdXBncmFkZQogICAgc2Vuc2l0aXZlOiB0cnVlCiAgLSBuYW1lOiBteXNxbC1yb290LXBhc3N3b3JkCiAgICBkZXNjcmlwdGlvbjogIlRoZSBteXNxbCByb290IHVzZXIgcGFzc3dvcmQiCiAgICBkZWZhdWx0OiAiZGVmYXVsdC1yb290LXBhc3N3b3JkIgogICAgdHlwZTogc3RyaW5nCiAgICBhcHBseVRvOgogICAgICAtIGluc3RhbGwKICAgICAgLSB1cGdyYWRlCiAgICBzZW5zaXRpdmU6IHRydWUK","manifestDigest":"44f4b4714d3a2ac978803ab19137b859350b30e1f06013a30a5ba65d422e6c19","mixins":{"exec":{},"helm3":{}},"version":"v0.38.6"},"sh.porter.file-parameters":{}},"definitions":{"database-name-parameter":{"default":"mydb","type":"string"},"mysql-name-parameter":{"default":"porter-ci-mysql","type":"string"},"mysql-password-output":{"default":"default-password","description":"The mysql database password","type":"string","writeOnly":true},"mysql-root-password-output":{"default":"default-root-password","description":"The mysql root user password","type":"string","writeOnly":true},"mysql-user-parameter":{"default":"mysql-admin","type":"string"},"namespace-parameter":{"default":"mysql","type":"string"},"porter-debug-parameter":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-debug","default":false,"description":"Print debug information from Porter when executing the bundle","type":"boolean"}},"description":"","invocationImages":[{"image":"localhost:5000/mysql-installer:v0.1.4","imageType":"docker"}],"name":"mysql","outputs":{"mysql-password":{"applyTo":["install","upgrade"],"definition":"mysql-password-output","description":"The mysql database password","path":"/cnab/app/outputs/mysql-password"},"mysql-root-password":{"applyTo":["install","upgrade"],"definition":"mysql-root-password-output","description":"The mysql root user password","path":"/cnab/app/outputs/mysql-root-password"}},"parameters":{"database-name":{"definition":"database-name-parameter","destination":{"env":"DATABASE_NAME"}},"mysql-name":{"definition":"mysql-name-parameter","destination":{"env":"MYSQL_NAME"}},"mysql-user":{"definition":"mysql-user-parameter","destination":{"env":"MYSQL_USER"}},"namespace":{"definition":"namespace-parameter","destination":{"env":"NAMESPACE"}},"porter-debug":{"definition":"porter-debug-parameter","description":"Print debug information from Porter when executing the bundle","destination":{"env":"PORTER_DEBUG"}}},"requiredExtensions":["sh.porter.file-parameters"],"schemaVersion":"v1.0.0","version":"0.1.4"}
\ No newline at end of file
diff --git a/build/testdata/bundles/mysql/.gitignore b/build/testdata/bundles/mysql/.gitignore
deleted file mode 100644
index ea5d8c03a..000000000
--- a/build/testdata/bundles/mysql/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Dockerfile
-.cnab
diff --git a/build/testdata/bundles/mysql/helpers.sh b/build/testdata/bundles/mysql/helpers.sh
deleted file mode 100755
index 5a5fe8cc9..000000000
--- a/build/testdata/bundles/mysql/helpers.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-install() {
- mkdir -p /cnab/app/outputs
- echo "topsecret" >> /cnab/app/outputs/mysql-root-password
- echo "moresekrets" >> /cnab/app/outputs/mysql-password
-}
-
-ping() {
- echo ping
-}
-
-# Call the requested function and pass the arguments as-is
-"$@"
diff --git a/build/testdata/bundles/mysql/porter.yaml b/build/testdata/bundles/mysql/porter.yaml
deleted file mode 100644
index c8b892fb4..000000000
--- a/build/testdata/bundles/mysql/porter.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-schemaVersion: 1.0.1
-name: mysql
-version: 0.1.4
-registry: "localhost:5000"
-
-mixins:
- - exec
- - helm3:
- repositories:
- bitnami:
- url: "https://charts.bitnami.com/bitnami"
-
-credentials:
-- name: kubeconfig
- path: /home/nonroot/.kube/config
-
-parameters:
-- name: database-name
- type: string
- default: mydb
- env: DATABASE_NAME
-- name: mysql-user
- type: string
- default: mysql-admin
- env: MYSQL_USER
-- name: namespace
- type: string
- default: 'mysql'
-- name: mysql-name
- type: string
- default: porter-ci-mysql
-- name: probe-timeout
- description: Timeout for liveness and readiness probes
- type: integer
- default: 1
-
-install:
-- exec:
- command: ./helpers.sh
- arguments:
- - install
-
-ping:
- - exec:
- description: "Ping"
- command: ./helpers.sh
- arguments:
- - ping
-
-upgrade:
- - exec:
- command: ./helpers.sh
- arguments:
- - install
-
-uninstall:
- - exec:
- command: echo
- arguments:
- - uninstall mysql
-
-outputs:
- - name: mysql-password
- description: "The mysql database password"
- type: string
- default: "default-password"
- applyTo:
- - install
- - upgrade
- sensitive: true
- path: /cnab/app/outputs/mysql-password
- - name: mysql-root-password
- description: "The mysql root user password"
- default: "default-root-password"
- type: string
- applyTo:
- - install
- - upgrade
- sensitive: true
- path: /cnab/app/outputs/mysql-root-password
diff --git a/build/testdata/bundles/wordpress/.cnab/bundle.json b/build/testdata/bundles/wordpress/.cnab/bundle.json
deleted file mode 100644
index 5ee7d4fe4..000000000
--- a/build/testdata/bundles/wordpress/.cnab/bundle.json
+++ /dev/null
@@ -1 +0,0 @@
-{"actions":{"ping":{"description":"ping","modifies":true}},"credentials":{"kubeconfig":{"path":"/home/nonroot/.kube/config","required":true}},"custom":{"io.cnab.dependencies":{"requires":{"mysql":{"bundle":"localhost:5000/mysql:v0.1.4","name":"mysql"}},"sequence":["mysql"]},"io.cnab.parameter-sources":{"porter-mysql-mysql-password-dep-output":{"priority":["dependencies.output"],"sources":{"dependencies.output":{"dependency":"mysql","name":"mysql-password"}}}},"sh.porter":{"commit":"43d077da","manifest":"bWl4aW5zOgotIGV4ZWMKLSBoZWxtMzoKICAgIHJlcG9zaXRvcmllczoKICAgICAgYml0bmFta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ZXNzCiAgICAgIHZlcnNpb246ICI5LjkuMyIKICAgICAgb3V0cHV0czoKICAgICAgICAtIG5hbWU6IHdvcmRwcmVzcy1wYXNzd29yZAogICAgICAgICAgc2VjcmV0OiAie3sgYnVuZGxlLnBhcmFtZXRlcnMud29yZHByZXNzLW5hbWUgfX0iCiAgICAgICAgICBrZXk6IHdvcmRwcmVzcy1wYXNzd29yZAoKcGluZzoKICAtIGV4ZWM6CiAgICAgIGRlc2NyaXB0aW9uOiAiUGluZyIKICAgICAgY29tbWFuZDogLi9oZWxwZXJzLnNoCiAgICAgIGFyZ3VtZW50czoKICAgICAgICAtIHBpbmcKCnVuaW5zdGFsbDoKICAtIGhlbG0zOgogICAgICBkZXNjcmlwdGlvbjogIlVuaW5zdGFsbCBXb3JkcHJlc3MiCiAgICAgIHB1cmdlOiB0cnVlCiAgICAgIHJlbGVhc2VzOiAKICAgICAgICAtICJ7eyBidW5kbGUucGFyYW1ldGVycy53b3JkcHJlc3MtbmFtZSB9fSIKCm91dHB1dHM6CiAgLSBuYW1lOiB3b3JkcHJlc3MtcGFzc3dvcmQKICAgIGRlc2NyaXB0aW9uOiAiVGhlIFdvcmRwcmVzcyBpbnN0YWxsYXRpb24gcGFzc3dvcmQiCiAgICB0eXBlOiBzdHJpbmcKICAgIGRlZmF1bHQ6ICJkZWZhdWx0LXBhc3N3b3JkIgogICAgYXBwbHlUbzoKICAgICAgLSAiaW5zdGFsbCIKICAgICAgLSAidXBncmFkZSIKICAgIHNlbnNpdGl2ZTogdHJ1ZQ==","manifestDigest":"530a3ed951de0c810cce7a0771e1aef4462e416a39c0c11ebac9a8d4ee7d6387","mixins":{"exec":{},"helm3":{}},"version":"v0.38.6"},"sh.porter.file-parameters":{}},"definitions":{"namespace-parameter":{"default":"wordpress","type":"string"},"porter-debug-parameter":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-debug","default":false,"description":"Print debug information from Porter when executing the bundle","type":"boolean"},"porter-mysql-mysql-password-dep-output":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-parameter-source-definition"},"wordpress-name-parameter":{"default":"porter-ci-wordpress","type":"string"},"wordpress-password-output":{"default":"default-password","description":"The Wordpress installation password","type":"string","writeOnly":true},"wordpress-password-parameter":{"type":"string","writeOnly":true}},"description":"","invocationImages":[{"image":"localhost:5000/wordpress-installer:v0.1.4","imageType":"docker"}],"name":"wordpress","outputs":{"wordpress-password":{"applyTo":["install","upgrade"],"definition":"wordpress-password-output","description":"The Wordpress installation password","path":"/cnab/app/outputs/wordpress-password"}},"parameters":{"namespace":{"definition":"namespace-parameter","destination":{"env":"NAMESPACE"}},"porter-debug":{"definition":"porter-debug-parameter","description":"Print debug information from Porter when executing the bundle","destination":{"env":"PORTER_DEBUG"}},"porter-mysql-mysql-password-dep-output":{"definition":"porter-mysql-mysql-password-dep-output","description":"Wires up the mysql dependency mysql-password output for use as a parameter. Porter internal parameter that should not be set manually.","destination":{"env":"PORTER_MYSQL_MYSQL_PASSWORD_DEP_OUTPUT"}},"wordpress-name":{"definition":"wordpress-name-parameter","destination":{"env":"WORDPRESS_NAME"}},"wordpress-password":{"applyTo":["install","upgrade"],"definition":"wordpress-password-parameter","destination":{"env":"WORDPRESS_PASSWORD"},"required":true}},"requiredExtensions":["sh.porter.file-parameters","io.cnab.dependencies","io.cnab.parameter-sources"],"schemaVersion":"v1.0.0","version":"0.1.4"}
\ No newline at end of file
diff --git a/build/testdata/bundles/wordpress/.gitignore b/build/testdata/bundles/wordpress/.gitignore
deleted file mode 100644
index ea5d8c03a..000000000
--- a/build/testdata/bundles/wordpress/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Dockerfile
-.cnab
diff --git a/build/testdata/bundles/wordpress/helpers.sh b/build/testdata/bundles/wordpress/helpers.sh
deleted file mode 100755
index c8d1b00a7..000000000
--- a/build/testdata/bundles/wordpress/helpers.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-install() {
- mkdir -p /cnab/app/outputs
- echo "topsecret-blog" >> /cnab/app/outputs/wordpress-password
-}
-
-ping() {
- echo ping
-}
-
-# Call the requested function and pass the arguments as-is
-"$@"
diff --git a/build/testdata/bundles/wordpress/porter.yaml b/build/testdata/bundles/wordpress/porter.yaml
deleted file mode 100644
index d26eea0cf..000000000
--- a/build/testdata/bundles/wordpress/porter.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
-schemaVersion: 1.0.1
-name: wordpress
-version: 0.1.4
-registry: "localhost:5000"
-
-mixins:
- - exec
- - helm3:
- repositories:
- bitnami:
- url: "https://charts.bitnami.com/bitnami"
-
-dependencies:
- requires:
- - name: mysql
- bundle:
- reference: localhost:5000/mysql:v0.1.4
- parameters:
- database-name: wordpress
- mysql-user: wordpress
- namespace: wordpress
-
-credentials:
-- name: kubeconfig
- path: /home/nonroot/.kube/config
-
-parameters:
-- name: wordpress-name
- type: string
- default: porter-ci-wordpress
- env: WORDPRESS_NAME
-- name: wordpress-password
- type: string
- sensitive: true
- applyTo:
- - install
- - upgrade
-- name: namespace
- type: string
- default: 'wordpress'
-
-install:
- - exec:
- command: ./helpers.sh
- arguments:
- - install
-
-upgrade:
- - exec:
- command: ./helpers.sh
- arguments:
- - install
-
-ping:
- - exec:
- description: "Ping"
- command: ./helpers.sh
- arguments:
- - ping
-
-uninstall:
- - exec:
- command: echo
- arguments:
- - uninstalled
-
-outputs:
- - name: wordpress-password
- description: "The Wordpress installation password"
- type: string
- default: "default-password"
- applyTo:
- - "install"
- - "upgrade"
- sensitive: true
- path: /cnab/app/outputs/wordpress-password
diff --git a/build/testdata/bundles/wordpressv2/helpers.sh b/build/testdata/bundles/wordpressv2/helpers.sh
deleted file mode 100755
index c8d1b00a7..000000000
--- a/build/testdata/bundles/wordpressv2/helpers.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-install() {
- mkdir -p /cnab/app/outputs
- echo "topsecret-blog" >> /cnab/app/outputs/wordpress-password
-}
-
-ping() {
- echo ping
-}
-
-# Call the requested function and pass the arguments as-is
-"$@"
diff --git a/build/testdata/bundles/wordpressv2/porter.yaml b/build/testdata/bundles/wordpressv2/porter.yaml
deleted file mode 100644
index de23eb347..000000000
--- a/build/testdata/bundles/wordpressv2/porter.yaml
+++ /dev/null
@@ -1,80 +0,0 @@
-schemaVersion: 1.1.0
-name: wordpress
-version: 0.1.4
-registry: "localhost:5000"
-
-mixins:
- - exec
- - helm3:
- repositories:
- bitnami:
- url: "https://charts.bitnami.com/bitnami"
-
-dependencies:
- requires:
- - name: mysql
- bundle:
- reference: localhost:5000/mysql:v0.1.4
- sharing:
- mode: true
- group:
- name: myapp
- parameters:
- database-name: wordpress
- mysql-user: wordpress
- namespace: wordpress
-
-credentials:
-- name: kubeconfig
- path: /home/nonroot/.kube/config
-
-parameters:
-- name: wordpress-name
- type: string
- default: porter-ci-wordpress
- env: WORDPRESS_NAME
-- name: wordpress-password
- type: string
- sensitive: true
- applyTo:
- - install
- - upgrade
-- name: namespace
- type: string
- default: 'wordpress'
-
-install:
- - exec:
- command: ./helpers.sh
- arguments:
- - install
-
-upgrade:
- - exec:
- command: ./helpers.sh
- arguments:
- - install
-
-ping:
- - exec:
- description: "Ping"
- command: ./helpers.sh
- arguments:
- - ping
-
-uninstall:
- - exec:
- command: echo
- arguments:
- - uninstall wordpress
-
-outputs:
- - name: wordpress-password
- description: "The Wordpress installation password"
- type: string
- default: "default-password"
- applyTo:
- - "install"
- - "upgrade"
- sensitive: true
- path: /cnab/app/outputs/wordpress-password
diff --git a/build/testdata/credentials/ci.json b/build/testdata/credentials/ci.json
deleted file mode 100644
index c5ddc79fc..000000000
--- a/build/testdata/credentials/ci.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "ci",
- "credentials": [
- {
- "name": "kubeconfig",
- "source": {
- "path": "KUBECONFIGPATH"
- }
- }
- ]
-}
\ No newline at end of file
diff --git a/build/testdata/schema.json b/build/testdata/schema.json
deleted file mode 100644
index b3401958c..000000000
--- a/build/testdata/schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "installations": "1.0.0",
- "credentials": "1.0.0",
- "parameters": "1.0.0"
-}
\ No newline at end of file
From d64977ec923c2e32a68be30dfc2c80ad57db4aed Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Tue, 23 Jan 2024 18:55:30 -0700
Subject: [PATCH 02/10] keep some things just in case
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
.github/images/README.md | 11 +++++++++++
.github/images/agent/Dockerfile | 12 ++++++++++++
.github/images/client/Dockerfile | 24 ++++++++++++++++++++++++
.github/images/server/Dockerfile | 28 ++++++++++++++++++++++++++++
.github/images/workshop/Dockerfile | 27 +++++++++++++++++++++++++++
.github/workflows/atom-template.xml | 25 +++++++++++++++++++++++++
.github/workflows/doc-only-build.sh | 12 ++++++++++++
.github/workflows/protoc.Dockerfile | 5 +++++
8 files changed, 144 insertions(+)
create mode 100644 .github/images/README.md
create mode 100644 .github/images/agent/Dockerfile
create mode 100644 .github/images/client/Dockerfile
create mode 100644 .github/images/server/Dockerfile
create mode 100644 .github/images/workshop/Dockerfile
create mode 100644 .github/workflows/atom-template.xml
create mode 100755 .github/workflows/doc-only-build.sh
create mode 100644 .github/workflows/protoc.Dockerfile
diff --git a/.github/images/README.md b/.github/images/README.md
new file mode 100644
index 000000000..73ae10a07
--- /dev/null
+++ b/.github/images/README.md
@@ -0,0 +1,11 @@
+# Porter Docker Images
+
+* client - This provides the porter client installed in a container. See the
+ [Porter Client Docker Image][client] documentation for examples of how to
+ use it.
+* workshop - This is a container suitable for teaching a workshop on Porter. See
+ the [Porter Workshop Docker Image][workshop] documentation for examples of
+ how to use it.
+
+[client]: https://getporter.org/docker-images/client/
+[workshop]: https://getporter.org/docker-images/workshop/
diff --git a/.github/images/agent/Dockerfile b/.github/images/agent/Dockerfile
new file mode 100644
index 000000000..66a07cc58
--- /dev/null
+++ b/.github/images/agent/Dockerfile
@@ -0,0 +1,12 @@
+ARG PORTER_VERSION
+ARG REGISTRY
+FROM $REGISTRY/porter:$PORTER_VERSION
+
+# This is where files that need to be copied into /app/.porter/ should be mounted
+VOLUME /porter-config
+
+ENV PORTER_HOME /app/.porter
+COPY --chown=65532:0 --chmod=770 bin/dev/agent-linux-amd64 /app/.porter/agent
+
+USER 65532
+ENTRYPOINT ["/app/.porter/agent"]
diff --git a/.github/images/client/Dockerfile b/.github/images/client/Dockerfile
new file mode 100644
index 000000000..e600d6437
--- /dev/null
+++ b/.github/images/client/Dockerfile
@@ -0,0 +1,24 @@
+FROM alpine:3 as builder
+WORKDIR /app/.porter
+
+RUN mkdir runtimes && \
+ mkdir -p mixins/exec/runtimes
+
+# Only install porter and the exec mixin, everything else
+# must be mounted into the container
+COPY bin/dev/porter-linux-amd64 porter
+COPY bin/mixins/exec/dev/exec-linux-amd64 mixins/exec/exec
+RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
+ ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
+
+# Copy the porter installation into a distroless container
+# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
+# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
+FROM gcr.io/distroless/static
+WORKDIR /app
+COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
+ENV PATH "$PATH:/app/.porter"
+
+# Run as a nonroot user
+USER 65532
+ENTRYPOINT ["/app/.porter/porter"]
diff --git a/.github/images/server/Dockerfile b/.github/images/server/Dockerfile
new file mode 100644
index 000000000..f9a19bf0b
--- /dev/null
+++ b/.github/images/server/Dockerfile
@@ -0,0 +1,28 @@
+FROM alpine:3 as builder
+ARG TARGETARCH
+WORKDIR /app/.porter
+
+RUN mkdir runtimes && \
+ mkdir -p mixins/exec/runtimes
+
+# Install porter-api-server, agent, and the exec mixin, everything else
+COPY bin/dev/porter-api-server-linux-$TARGETARCH porter
+COPY bin/dev/agent-linux-$TARGETARCH agent
+COPY bin/mixins/exec/dev/exec-linux-$TARGETARCH mixins/exec/exec
+RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
+ ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
+
+# Copy the porter installation into a distroless container
+# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
+# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
+FROM gcr.io/distroless/static
+WORKDIR /app
+COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
+ENV PATH "$PATH:/app/.porter"
+# This is where files that need to be copied into /app/.porter/ should be mounted
+VOLUME /porter-config
+ENV PORTER_HOME /app/.porter
+
+# Run as a nonroot user
+USER 65532
+ENTRYPOINT ["/app/.porter/agent"]
\ No newline at end of file
diff --git a/.github/images/workshop/Dockerfile b/.github/images/workshop/Dockerfile
new file mode 100644
index 000000000..6a2ebe9ee
--- /dev/null
+++ b/.github/images/workshop/Dockerfile
@@ -0,0 +1,27 @@
+FROM docker:dind
+
+ENV HELM_VER v2.17.0
+
+RUN mkdir -p /root/.porter/runtimes && \
+ mkdir -p /root/.porter/mixins/exec/runtimes
+
+RUN apk add bash \
+ git \
+ curl \
+ bash-completion \
+ jq \
+ ca-certificates && \
+ curl -o helm.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
+ tar -xzf helm.tgz && \
+ mv linux-amd64/helm /usr/local/bin && \
+ rm helm.tgz && \
+ helm init --client-only && \
+ mkdir -p /workshop
+
+COPY bin/dev/porter-linux-amd64 /root/.porter/porter
+COPY bin/mixins/exec/dev/exec-linux-amd64 /root/.porter/mixins/exec/exec
+RUN ln -s /root/.porter/porter /root/.porter/runtimes/porter-runtime && \
+ ln -s /root/.porter/mixins/exec/exec /root/.porter/mixins/exec/runtimes/exec-runtime && \
+ ln -s /root/.porter/porter /usr/local/bin/porter
+
+WORKDIR /workshop
diff --git a/.github/workflows/atom-template.xml b/.github/workflows/atom-template.xml
new file mode 100644
index 000000000..40fd06bd5
--- /dev/null
+++ b/.github/workflows/atom-template.xml
@@ -0,0 +1,25 @@
+
+ https://getporter.org/mixins
+ Porter Mixins
+ {{Updated}}
+
+
+ Porter Authors
+ https://getporter.org/mixins
+
+ {{#Mixins}}
+
+ {{/Mixins}}
+ {{#Entries}}
+
+ https://cdn.porter.sh/mixins/{{Mixin}}/{{Version}}
+ {{Mixin}} @ {{Version}}
+ {{Updated}}
+
+ {{Version}}
+ {{#Files}}
+
+ {{/Files}}
+
+ {{/Entries}}
+
diff --git a/.github/workflows/doc-only-build.sh b/.github/workflows/doc-only-build.sh
new file mode 100755
index 000000000..10bac64bd
--- /dev/null
+++ b/.github/workflows/doc-only-build.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# Return non-zero for a doc only build, and 0 for a builds that touch code.
+DOCS_REGEX='(LICENSE|netlify.toml)|(\.md$)|(^docs/)|(^.github/)|(^workshop/)'
+if [[ -z "$(git diff --name-only HEAD HEAD~ | grep -vE $DOCS_REGEX)" ]]; then
+ echo "This is a doc-only build"
+ echo "##vso[task.setvariable variable=DOCS_ONLY;isOutput=true]true"
+else
+ echo "A full build must be run, code has been changed"
+ echo "##vso[task.setvariable variable=DOCS_ONLY;isOutput=true]false"
+fi
diff --git a/.github/workflows/protoc.Dockerfile b/.github/workflows/protoc.Dockerfile
new file mode 100644
index 000000000..6ad558086
--- /dev/null
+++ b/.github/workflows/protoc.Dockerfile
@@ -0,0 +1,5 @@
+FROM golang:1.20
+RUN apt-get update && apt-get -y install protobuf-compiler
+RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
+RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
+WORKDIR /proto
From 268cc594dcce98a79fc0f2fa9e1439060138b142 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Wed, 24 Jan 2024 16:23:06 -0700
Subject: [PATCH 03/10] whoops
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
build/testdata/bundles/mysql/.gitignore | 2 +
build/testdata/bundles/mysql/helpers.sh | 15 ++++
build/testdata/bundles/mysql/porter.yaml | 80 +++++++++++++++++++
build/testdata/bundles/wordpress/.gitignore | 2 +
build/testdata/bundles/wordpress/helpers.sh | 14 ++++
build/testdata/bundles/wordpress/porter.yaml | 76 ++++++++++++++++++
build/testdata/bundles/wordpressv2/helpers.sh | 14 ++++
.../testdata/bundles/wordpressv2/porter.yaml | 80 +++++++++++++++++++
build/testdata/credentials/ci.json | 11 +++
build/testdata/schema.json | 5 ++
10 files changed, 299 insertions(+)
create mode 100644 build/testdata/bundles/mysql/.gitignore
create mode 100755 build/testdata/bundles/mysql/helpers.sh
create mode 100644 build/testdata/bundles/mysql/porter.yaml
create mode 100644 build/testdata/bundles/wordpress/.gitignore
create mode 100755 build/testdata/bundles/wordpress/helpers.sh
create mode 100644 build/testdata/bundles/wordpress/porter.yaml
create mode 100755 build/testdata/bundles/wordpressv2/helpers.sh
create mode 100644 build/testdata/bundles/wordpressv2/porter.yaml
create mode 100644 build/testdata/credentials/ci.json
create mode 100644 build/testdata/schema.json
diff --git a/build/testdata/bundles/mysql/.gitignore b/build/testdata/bundles/mysql/.gitignore
new file mode 100644
index 000000000..ea5d8c03a
--- /dev/null
+++ b/build/testdata/bundles/mysql/.gitignore
@@ -0,0 +1,2 @@
+Dockerfile
+.cnab
diff --git a/build/testdata/bundles/mysql/helpers.sh b/build/testdata/bundles/mysql/helpers.sh
new file mode 100755
index 000000000..5a5fe8cc9
--- /dev/null
+++ b/build/testdata/bundles/mysql/helpers.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+install() {
+ mkdir -p /cnab/app/outputs
+ echo "topsecret" >> /cnab/app/outputs/mysql-root-password
+ echo "moresekrets" >> /cnab/app/outputs/mysql-password
+}
+
+ping() {
+ echo ping
+}
+
+# Call the requested function and pass the arguments as-is
+"$@"
diff --git a/build/testdata/bundles/mysql/porter.yaml b/build/testdata/bundles/mysql/porter.yaml
new file mode 100644
index 000000000..c8b892fb4
--- /dev/null
+++ b/build/testdata/bundles/mysql/porter.yaml
@@ -0,0 +1,80 @@
+schemaVersion: 1.0.1
+name: mysql
+version: 0.1.4
+registry: "localhost:5000"
+
+mixins:
+ - exec
+ - helm3:
+ repositories:
+ bitnami:
+ url: "https://charts.bitnami.com/bitnami"
+
+credentials:
+- name: kubeconfig
+ path: /home/nonroot/.kube/config
+
+parameters:
+- name: database-name
+ type: string
+ default: mydb
+ env: DATABASE_NAME
+- name: mysql-user
+ type: string
+ default: mysql-admin
+ env: MYSQL_USER
+- name: namespace
+ type: string
+ default: 'mysql'
+- name: mysql-name
+ type: string
+ default: porter-ci-mysql
+- name: probe-timeout
+ description: Timeout for liveness and readiness probes
+ type: integer
+ default: 1
+
+install:
+- exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+ping:
+ - exec:
+ description: "Ping"
+ command: ./helpers.sh
+ arguments:
+ - ping
+
+upgrade:
+ - exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+uninstall:
+ - exec:
+ command: echo
+ arguments:
+ - uninstall mysql
+
+outputs:
+ - name: mysql-password
+ description: "The mysql database password"
+ type: string
+ default: "default-password"
+ applyTo:
+ - install
+ - upgrade
+ sensitive: true
+ path: /cnab/app/outputs/mysql-password
+ - name: mysql-root-password
+ description: "The mysql root user password"
+ default: "default-root-password"
+ type: string
+ applyTo:
+ - install
+ - upgrade
+ sensitive: true
+ path: /cnab/app/outputs/mysql-root-password
diff --git a/build/testdata/bundles/wordpress/.gitignore b/build/testdata/bundles/wordpress/.gitignore
new file mode 100644
index 000000000..ea5d8c03a
--- /dev/null
+++ b/build/testdata/bundles/wordpress/.gitignore
@@ -0,0 +1,2 @@
+Dockerfile
+.cnab
diff --git a/build/testdata/bundles/wordpress/helpers.sh b/build/testdata/bundles/wordpress/helpers.sh
new file mode 100755
index 000000000..c8d1b00a7
--- /dev/null
+++ b/build/testdata/bundles/wordpress/helpers.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+install() {
+ mkdir -p /cnab/app/outputs
+ echo "topsecret-blog" >> /cnab/app/outputs/wordpress-password
+}
+
+ping() {
+ echo ping
+}
+
+# Call the requested function and pass the arguments as-is
+"$@"
diff --git a/build/testdata/bundles/wordpress/porter.yaml b/build/testdata/bundles/wordpress/porter.yaml
new file mode 100644
index 000000000..d26eea0cf
--- /dev/null
+++ b/build/testdata/bundles/wordpress/porter.yaml
@@ -0,0 +1,76 @@
+schemaVersion: 1.0.1
+name: wordpress
+version: 0.1.4
+registry: "localhost:5000"
+
+mixins:
+ - exec
+ - helm3:
+ repositories:
+ bitnami:
+ url: "https://charts.bitnami.com/bitnami"
+
+dependencies:
+ requires:
+ - name: mysql
+ bundle:
+ reference: localhost:5000/mysql:v0.1.4
+ parameters:
+ database-name: wordpress
+ mysql-user: wordpress
+ namespace: wordpress
+
+credentials:
+- name: kubeconfig
+ path: /home/nonroot/.kube/config
+
+parameters:
+- name: wordpress-name
+ type: string
+ default: porter-ci-wordpress
+ env: WORDPRESS_NAME
+- name: wordpress-password
+ type: string
+ sensitive: true
+ applyTo:
+ - install
+ - upgrade
+- name: namespace
+ type: string
+ default: 'wordpress'
+
+install:
+ - exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+upgrade:
+ - exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+ping:
+ - exec:
+ description: "Ping"
+ command: ./helpers.sh
+ arguments:
+ - ping
+
+uninstall:
+ - exec:
+ command: echo
+ arguments:
+ - uninstalled
+
+outputs:
+ - name: wordpress-password
+ description: "The Wordpress installation password"
+ type: string
+ default: "default-password"
+ applyTo:
+ - "install"
+ - "upgrade"
+ sensitive: true
+ path: /cnab/app/outputs/wordpress-password
diff --git a/build/testdata/bundles/wordpressv2/helpers.sh b/build/testdata/bundles/wordpressv2/helpers.sh
new file mode 100755
index 000000000..c8d1b00a7
--- /dev/null
+++ b/build/testdata/bundles/wordpressv2/helpers.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+install() {
+ mkdir -p /cnab/app/outputs
+ echo "topsecret-blog" >> /cnab/app/outputs/wordpress-password
+}
+
+ping() {
+ echo ping
+}
+
+# Call the requested function and pass the arguments as-is
+"$@"
diff --git a/build/testdata/bundles/wordpressv2/porter.yaml b/build/testdata/bundles/wordpressv2/porter.yaml
new file mode 100644
index 000000000..de23eb347
--- /dev/null
+++ b/build/testdata/bundles/wordpressv2/porter.yaml
@@ -0,0 +1,80 @@
+schemaVersion: 1.1.0
+name: wordpress
+version: 0.1.4
+registry: "localhost:5000"
+
+mixins:
+ - exec
+ - helm3:
+ repositories:
+ bitnami:
+ url: "https://charts.bitnami.com/bitnami"
+
+dependencies:
+ requires:
+ - name: mysql
+ bundle:
+ reference: localhost:5000/mysql:v0.1.4
+ sharing:
+ mode: true
+ group:
+ name: myapp
+ parameters:
+ database-name: wordpress
+ mysql-user: wordpress
+ namespace: wordpress
+
+credentials:
+- name: kubeconfig
+ path: /home/nonroot/.kube/config
+
+parameters:
+- name: wordpress-name
+ type: string
+ default: porter-ci-wordpress
+ env: WORDPRESS_NAME
+- name: wordpress-password
+ type: string
+ sensitive: true
+ applyTo:
+ - install
+ - upgrade
+- name: namespace
+ type: string
+ default: 'wordpress'
+
+install:
+ - exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+upgrade:
+ - exec:
+ command: ./helpers.sh
+ arguments:
+ - install
+
+ping:
+ - exec:
+ description: "Ping"
+ command: ./helpers.sh
+ arguments:
+ - ping
+
+uninstall:
+ - exec:
+ command: echo
+ arguments:
+ - uninstall wordpress
+
+outputs:
+ - name: wordpress-password
+ description: "The Wordpress installation password"
+ type: string
+ default: "default-password"
+ applyTo:
+ - "install"
+ - "upgrade"
+ sensitive: true
+ path: /cnab/app/outputs/wordpress-password
diff --git a/build/testdata/credentials/ci.json b/build/testdata/credentials/ci.json
new file mode 100644
index 000000000..c5ddc79fc
--- /dev/null
+++ b/build/testdata/credentials/ci.json
@@ -0,0 +1,11 @@
+{
+ "name": "ci",
+ "credentials": [
+ {
+ "name": "kubeconfig",
+ "source": {
+ "path": "KUBECONFIGPATH"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/build/testdata/schema.json b/build/testdata/schema.json
new file mode 100644
index 000000000..b3401958c
--- /dev/null
+++ b/build/testdata/schema.json
@@ -0,0 +1,5 @@
+{
+ "installations": "1.0.0",
+ "credentials": "1.0.0",
+ "parameters": "1.0.0"
+}
\ No newline at end of file
From db47a7a88667e2fb5af226e76f60fd175893bea6 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Sat, 27 Jan 2024 15:18:13 -0700
Subject: [PATCH 04/10] add images back, and update some of the files
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
.../build_azure_pipelinesrelease_template.yml | 4 +--
.github/workflows/porter-canary.yml | 4 +--
.github/workflows/test-porter-release.yml | 4 +--
.../testporterbot.porter-release.yml | 4 +--
build/images/README.md | 11 ++++++++
build/images/agent/Dockerfile | 12 ++++++++
build/images/client/Dockerfile | 24 ++++++++++++++++
build/images/server/Dockerfile | 28 +++++++++++++++++++
build/images/workshop/Dockerfile | 27 ++++++++++++++++++
build/protoc.Dockerfile | 5 ++++
10 files changed, 115 insertions(+), 8 deletions(-)
create mode 100644 build/images/README.md
create mode 100644 build/images/agent/Dockerfile
create mode 100644 build/images/client/Dockerfile
create mode 100644 build/images/server/Dockerfile
create mode 100644 build/images/workshop/Dockerfile
create mode 100644 build/protoc.Dockerfile
diff --git a/.github/workflows/build_azure_pipelinesrelease_template.yml b/.github/workflows/build_azure_pipelinesrelease_template.yml
index 515827f45..bf841a4df 100644
--- a/.github/workflows/build_azure_pipelinesrelease_template.yml
+++ b/.github/workflows/build_azure_pipelinesrelease_template.yml
@@ -78,7 +78,7 @@ jobs:
Validate-unit_test:
name: Unit Test
runs-on: ubuntu-latest
- if: !(inputs.skipTests)
+ if: ! ${{inputs.skipTests}}
steps:
- name: checkout
uses: actions/checkout@v4.1.0
@@ -125,7 +125,7 @@ jobs:
- Validate-xbuild
runs-on:
- self-hosted
- if: success() && !(inputs.skipTests)
+ if: success() && ! ${{inputs.skipTests}}
steps:
- name: checkout
uses: actions/checkout@v4.1.0
diff --git a/.github/workflows/porter-canary.yml b/.github/workflows/porter-canary.yml
index b89303b79..b8ee5945e 100644
--- a/.github/workflows/porter-canary.yml
+++ b/.github/workflows/porter-canary.yml
@@ -23,5 +23,5 @@ jobs:
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter
- shouldPublish: "${{inputs.shouldPublish}}"
- skipTests: "${{inputs.skipTests}}"
+ shouldPublish: ${{inputs.shouldPublish}}
+ skipTests: ${{inputs.skipTests}}
diff --git a/.github/workflows/test-porter-release.yml b/.github/workflows/test-porter-release.yml
index 403aa2ff2..4d1dc1829 100644
--- a/.github/workflows/test-porter-release.yml
+++ b/.github/workflows/test-porter-release.yml
@@ -22,5 +22,5 @@ jobs:
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter/test
- shouldPublish: "${{ inputs.shouldPublish }}"
- skipTests: "${{ inputs.skipTests }}"
+ shouldPublish: ${{ inputs.shouldPublish }}
+ skipTests: ${{ inputs.skipTests }}
\ No newline at end of file
diff --git a/.github/workflows/testporterbot.porter-release.yml b/.github/workflows/testporterbot.porter-release.yml
index d4acb0e7e..d04e1ae83 100644
--- a/.github/workflows/testporterbot.porter-release.yml
+++ b/.github/workflows/testporterbot.porter-release.yml
@@ -19,5 +19,5 @@ jobs:
uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter/test
- shouldPublish: "${{ inputs.shouldPublish }}"
- skipTests: "${{ inputs.skipTests }}"
+ shouldPublish: ${{ inputs.shouldPublish }}
+ skipTests: ${{ inputs.skipTests }}
\ No newline at end of file
diff --git a/build/images/README.md b/build/images/README.md
new file mode 100644
index 000000000..73ae10a07
--- /dev/null
+++ b/build/images/README.md
@@ -0,0 +1,11 @@
+# Porter Docker Images
+
+* client - This provides the porter client installed in a container. See the
+ [Porter Client Docker Image][client] documentation for examples of how to
+ use it.
+* workshop - This is a container suitable for teaching a workshop on Porter. See
+ the [Porter Workshop Docker Image][workshop] documentation for examples of
+ how to use it.
+
+[client]: https://getporter.org/docker-images/client/
+[workshop]: https://getporter.org/docker-images/workshop/
diff --git a/build/images/agent/Dockerfile b/build/images/agent/Dockerfile
new file mode 100644
index 000000000..66a07cc58
--- /dev/null
+++ b/build/images/agent/Dockerfile
@@ -0,0 +1,12 @@
+ARG PORTER_VERSION
+ARG REGISTRY
+FROM $REGISTRY/porter:$PORTER_VERSION
+
+# This is where files that need to be copied into /app/.porter/ should be mounted
+VOLUME /porter-config
+
+ENV PORTER_HOME /app/.porter
+COPY --chown=65532:0 --chmod=770 bin/dev/agent-linux-amd64 /app/.porter/agent
+
+USER 65532
+ENTRYPOINT ["/app/.porter/agent"]
diff --git a/build/images/client/Dockerfile b/build/images/client/Dockerfile
new file mode 100644
index 000000000..e600d6437
--- /dev/null
+++ b/build/images/client/Dockerfile
@@ -0,0 +1,24 @@
+FROM alpine:3 as builder
+WORKDIR /app/.porter
+
+RUN mkdir runtimes && \
+ mkdir -p mixins/exec/runtimes
+
+# Only install porter and the exec mixin, everything else
+# must be mounted into the container
+COPY bin/dev/porter-linux-amd64 porter
+COPY bin/mixins/exec/dev/exec-linux-amd64 mixins/exec/exec
+RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
+ ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
+
+# Copy the porter installation into a distroless container
+# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
+# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
+FROM gcr.io/distroless/static
+WORKDIR /app
+COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
+ENV PATH "$PATH:/app/.porter"
+
+# Run as a nonroot user
+USER 65532
+ENTRYPOINT ["/app/.porter/porter"]
diff --git a/build/images/server/Dockerfile b/build/images/server/Dockerfile
new file mode 100644
index 000000000..f9a19bf0b
--- /dev/null
+++ b/build/images/server/Dockerfile
@@ -0,0 +1,28 @@
+FROM alpine:3 as builder
+ARG TARGETARCH
+WORKDIR /app/.porter
+
+RUN mkdir runtimes && \
+ mkdir -p mixins/exec/runtimes
+
+# Install porter-api-server, agent, and the exec mixin, everything else
+COPY bin/dev/porter-api-server-linux-$TARGETARCH porter
+COPY bin/dev/agent-linux-$TARGETARCH agent
+COPY bin/mixins/exec/dev/exec-linux-$TARGETARCH mixins/exec/exec
+RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
+ ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
+
+# Copy the porter installation into a distroless container
+# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
+# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
+FROM gcr.io/distroless/static
+WORKDIR /app
+COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
+ENV PATH "$PATH:/app/.porter"
+# This is where files that need to be copied into /app/.porter/ should be mounted
+VOLUME /porter-config
+ENV PORTER_HOME /app/.porter
+
+# Run as a nonroot user
+USER 65532
+ENTRYPOINT ["/app/.porter/agent"]
\ No newline at end of file
diff --git a/build/images/workshop/Dockerfile b/build/images/workshop/Dockerfile
new file mode 100644
index 000000000..6a2ebe9ee
--- /dev/null
+++ b/build/images/workshop/Dockerfile
@@ -0,0 +1,27 @@
+FROM docker:dind
+
+ENV HELM_VER v2.17.0
+
+RUN mkdir -p /root/.porter/runtimes && \
+ mkdir -p /root/.porter/mixins/exec/runtimes
+
+RUN apk add bash \
+ git \
+ curl \
+ bash-completion \
+ jq \
+ ca-certificates && \
+ curl -o helm.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
+ tar -xzf helm.tgz && \
+ mv linux-amd64/helm /usr/local/bin && \
+ rm helm.tgz && \
+ helm init --client-only && \
+ mkdir -p /workshop
+
+COPY bin/dev/porter-linux-amd64 /root/.porter/porter
+COPY bin/mixins/exec/dev/exec-linux-amd64 /root/.porter/mixins/exec/exec
+RUN ln -s /root/.porter/porter /root/.porter/runtimes/porter-runtime && \
+ ln -s /root/.porter/mixins/exec/exec /root/.porter/mixins/exec/runtimes/exec-runtime && \
+ ln -s /root/.porter/porter /usr/local/bin/porter
+
+WORKDIR /workshop
diff --git a/build/protoc.Dockerfile b/build/protoc.Dockerfile
new file mode 100644
index 000000000..6ad558086
--- /dev/null
+++ b/build/protoc.Dockerfile
@@ -0,0 +1,5 @@
+FROM golang:1.20
+RUN apt-get update && apt-get -y install protobuf-compiler
+RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
+RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
+WORKDIR /proto
From 4e0b52ad44f3c24b820699c9484f10ba323bfd11 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Sat, 27 Jan 2024 15:43:54 -0700
Subject: [PATCH 05/10] why r u mad
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
build/testdata/bundles/mysql/.gitignore | 2 --
1 file changed, 2 deletions(-)
diff --git a/build/testdata/bundles/mysql/.gitignore b/build/testdata/bundles/mysql/.gitignore
index ea5d8c03a..e69de29bb 100644
--- a/build/testdata/bundles/mysql/.gitignore
+++ b/build/testdata/bundles/mysql/.gitignore
@@ -1,2 +0,0 @@
-Dockerfile
-.cnab
From 79cefaa289e687001bb7f8945c958b4d8776bd26 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Sat, 27 Jan 2024 16:08:23 -0700
Subject: [PATCH 06/10] readd bundle.json
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
build/testdata/bundles/mysql/.cnab/bundle.json | 1 +
build/testdata/bundles/wordpress/.cnab/bundle.json | 1 +
2 files changed, 2 insertions(+)
create mode 100755 build/testdata/bundles/mysql/.cnab/bundle.json
create mode 100644 build/testdata/bundles/wordpress/.cnab/bundle.json
diff --git a/build/testdata/bundles/mysql/.cnab/bundle.json b/build/testdata/bundles/mysql/.cnab/bundle.json
new file mode 100755
index 000000000..59e6a30fd
--- /dev/null
+++ b/build/testdata/bundles/mysql/.cnab/bundle.json
@@ -0,0 +1 @@
+{"actions":{"ping":{"description":"ping","modifies":true}},"credentials":{"kubeconfig":{"path":"/home/nonroot/.kube/config","required":true}},"custom":{"sh.porter":{"commit":"43d077da","manifest":"bWl4aW5zOgotIGV4ZWMKLSBoZWxtMzoKICAgIHJlcG9zaXRvcmllczoKICAgICAgYml0bmFtaToKICAgICAgICB1cmw6ICJodHRwczovL2NoYXJ0cy5iaXRuYW1pLmNvbS9iaXRuYW1pIgoKbmFtZTogbXlzcWwKdmVyc2lvbjogIjAuMS40IgpyZWdpc3RyeTogImxvY2FsaG9zdDo1MDAwIgoKY3JlZGVudGlhbHM6Ci0gbmFtZToga3ViZWNvbmZpZwogIHBhdGg6IC9yb290Ly5rdWJlL2NvbmZpZwoKcGFyYW1ldGVyczoKLSBuYW1lOiBkYXRhYmFzZS1uYW1lCiAgdHlwZTogc3RyaW5nCiAgZGVmYXVsdDogbXlkYgogIGVudjogREFUQUJBU0VfTkFNRQotIG5hbWU6IG15c3FsLXVzZXIKICB0eXBlOiBzdHJpbmcKICBkZWZhdWx0OiBteXNxbC1hZG1pbgogIGVudjogTVlTUUxfVVNFUgotIG5hbWU6IG5hbWVzcGFjZQogIHR5cGU6IHN0cmluZwogIGRlZmF1bHQ6ICdteXNxbCcKLSBuYW1lOiBteXNxbC1uYW1lCiAgdHlwZTogc3RyaW5nCiAgZGVmYXVsdDogcG9ydGVyLWNpLW15c3FsCgppbnN0YWxsOgotIGhlbG0zOg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wKICAgICAgdmVyc2lvbjogNi4xNC4xMgogICAgICBvdXRwdXRzOgogICAgICAtIG5hbWU6IG15c3FsLXJvb3QtcGFzc3dvcmQKICAgICAgICBzZWNyZXQ6ICJ7eyBidW5kbGUucGFyYW1ldGVycy5teXNxbC1uYW1lIH19IgogICAgICAgIGtleTogbXlzcWwtcm9vdC1wYXNzd29yZAogICAgICAtIG5hbWU6IG15c3FsLXBhc3N3b3JkCiAgICAgICAgc2VjcmV0OiAie3sgYnVuZGxlLnBhcmFtZXRlcnMubXlzcWwtbmFtZSB9fSIKICAgICAgICBrZXk6IG15c3FsLXBhc3N3b3JkCgp1bmluc3RhbGw6Ci0gaGVsbTM6CiAgICBkZXNjcmlwdGlvbjogIlVuaW5zdGFsbCBNeVNRTCIKICAgIHB1cmdlOiB0cnVlCiAgICByZWxlYXNlczoKICAgICAgLSAie3sgYnVuZGxlLnBhcmFtZXRlcnMubXlzcWwtbmFtZSB9fSIKCm91dHB1dHM6CiAgLSBuYW1lOiBteXNxbC1wYXNzd29yZAogICAgZGVzY3JpcHRpb246ICJUaGUgbXlzcWwgZGF0YWJhc2UgcGFzc3dvcmQiCiAgICB0eXBlOiBzdHJpbmcKICAgIGRlZmF1bHQ6ICJkZWZhdWx0LXBhc3N3b3JkIgogICAgYXBwbHlUbzoKICAgICAgLSBpbnN0YWxsCiAgICAgIC0gdXBncmFkZQogICAgc2Vuc2l0aXZlOiB0cnVlCiAgLSBuYW1lOiBteXNxbC1yb290LXBhc3N3b3JkCiAgICBkZXNjcmlwdGlvbjogIlRoZSBteXNxbCByb290IHVzZXIgcGFzc3dvcmQiCiAgICBkZWZhdWx0OiAiZGVmYXVsdC1yb290LXBhc3N3b3JkIgogICAgdHlwZTogc3RyaW5nCiAgICBhcHBseVRvOgogICAgICAtIGluc3RhbGwKICAgICAgLSB1cGdyYWRlCiAgICBzZW5zaXRpdmU6IHRydWUK","manifestDigest":"44f4b4714d3a2ac978803ab19137b859350b30e1f06013a30a5ba65d422e6c19","mixins":{"exec":{},"helm3":{}},"version":"v0.38.6"},"sh.porter.file-parameters":{}},"definitions":{"database-name-parameter":{"default":"mydb","type":"string"},"mysql-name-parameter":{"default":"porter-ci-mysql","type":"string"},"mysql-password-output":{"default":"default-password","description":"The mysql database password","type":"string","writeOnly":true},"mysql-root-password-output":{"default":"default-root-password","description":"The mysql root user password","type":"string","writeOnly":true},"mysql-user-parameter":{"default":"mysql-admin","type":"string"},"namespace-parameter":{"default":"mysql","type":"string"},"porter-debug-parameter":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-debug","default":false,"description":"Print debug information from Porter when executing the bundle","type":"boolean"}},"description":"","invocationImages":[{"image":"localhost:5000/mysql-installer:v0.1.4","imageType":"docker"}],"name":"mysql","outputs":{"mysql-password":{"applyTo":["install","upgrade"],"definition":"mysql-password-output","description":"The mysql database password","path":"/cnab/app/outputs/mysql-password"},"mysql-root-password":{"applyTo":["install","upgrade"],"definition":"mysql-root-password-output","description":"The mysql root user password","path":"/cnab/app/outputs/mysql-root-password"}},"parameters":{"database-name":{"definition":"database-name-parameter","destination":{"env":"DATABASE_NAME"}},"mysql-name":{"definition":"mysql-name-parameter","destination":{"env":"MYSQL_NAME"}},"mysql-user":{"definition":"mysql-user-parameter","destination":{"env":"MYSQL_USER"}},"namespace":{"definition":"namespace-parameter","destination":{"env":"NAMESPACE"}},"porter-debug":{"definition":"porter-debug-parameter","description":"Print debug information from Porter when executing the bundle","destination":{"env":"PORTER_DEBUG"}}},"requiredExtensions":["sh.porter.file-parameters"],"schemaVersion":"v1.0.0","version":"0.1.4"}
\ No newline at end of file
diff --git a/build/testdata/bundles/wordpress/.cnab/bundle.json b/build/testdata/bundles/wordpress/.cnab/bundle.json
new file mode 100644
index 000000000..5ee7d4fe4
--- /dev/null
+++ b/build/testdata/bundles/wordpress/.cnab/bundle.json
@@ -0,0 +1 @@
+{"actions":{"ping":{"description":"ping","modifies":true}},"credentials":{"kubeconfig":{"path":"/home/nonroot/.kube/config","required":true}},"custom":{"io.cnab.dependencies":{"requires":{"mysql":{"bundle":"localhost:5000/mysql:v0.1.4","name":"mysql"}},"sequence":["mysql"]},"io.cnab.parameter-sources":{"porter-mysql-mysql-password-dep-output":{"priority":["dependencies.output"],"sources":{"dependencies.output":{"dependency":"mysql","name":"mysql-password"}}}},"sh.porter":{"commit":"43d077da","manifest":"bWl4aW5zOgotIGV4ZWMKLSBoZWxtMzoKICAgIHJlcG9zaXRvcmllczoKICAgICAgYml0bmFtaToKICAgICAgICB1cmw6ICJodHRwczovL2NoYXJ0cy5iaXRuYW1pLmNvbS9iaXRuYW1pIgoKbmFtZTogd29yZHByZXNzCnZlcnNpb246IDAuMS40CnJlZ2lzdHJ5OiAibG9jYWxob3N0OjUwMDAiCgpkZXBlbmRlbmNpZXM6CiAgLSBuYW1lOiBteXNxbAogICAgcmVmZXJlbmNlOiBsb2NhbGhvc3Q6NTAwMC9teXNxbDp2MC4xLjQKICAgIHBhcmFtZXRlcnM6CiAgICAgIGRhdGFiYXNlLW5hbWU6IHdvcmRwcmVzcwogICAgICBteXNxbC11c2VyOiB3b3JkcHJlc3MKICAgICAgbmFtZXNwYWNlOiB3b3JkcHJlc3MKCmNyZWRlbnRpYWxzOgotIG5hbWU6IGt1YmVjb25maWcKICBwYXRoOiAvcm9vdC8ua3ViZS9jb25maWcKCnBhcmFtZXRlcnM6Ci0gbmFtZTogd29yZHByZXNzLW5hbWUKICB0eXBlOiBzdHJpbmcKICBkZWZhdWx0OiBwb3J0ZXItY2ktd29yZHByZXNzCiAgZW52OiBXT1JEUFJFU1NfTkFNRQotIG5hbWU6IHdvcmRwcmVzcy1wYXNzd29yZAogIHR5cGU6IHN0cmluZwogIHNlbnNpdGl2ZTogdHJ1ZQogIGFwcGx5VG86CiAgICAtIGluc3RhbGwKICAgIC0gdXBncmFkZQotIG5hbWU6IG5hbWVzcGFjZQogIHR5cGU6IHN0cmluZwogIGRlZmF1bHQ6ICd3b3JkcHJlc3MnCgppbnN0YWxsO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pdGl2ZTogdHJ1ZQ==","manifestDigest":"530a3ed951de0c810cce7a0771e1aef4462e416a39c0c11ebac9a8d4ee7d6387","mixins":{"exec":{},"helm3":{}},"version":"v0.38.6"},"sh.porter.file-parameters":{}},"definitions":{"namespace-parameter":{"default":"wordpress","type":"string"},"porter-debug-parameter":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-debug","default":false,"description":"Print debug information from Porter when executing the bundle","type":"boolean"},"porter-mysql-mysql-password-dep-output":{"$comment":"porter-internal","$id":"https://getporter.org/generated-bundle/#porter-parameter-source-definition"},"wordpress-name-parameter":{"default":"porter-ci-wordpress","type":"string"},"wordpress-password-output":{"default":"default-password","description":"The Wordpress installation password","type":"string","writeOnly":true},"wordpress-password-parameter":{"type":"string","writeOnly":true}},"description":"","invocationImages":[{"image":"localhost:5000/wordpress-installer:v0.1.4","imageType":"docker"}],"name":"wordpress","outputs":{"wordpress-password":{"applyTo":["install","upgrade"],"definition":"wordpress-password-output","description":"The Wordpress installation password","path":"/cnab/app/outputs/wordpress-password"}},"parameters":{"namespace":{"definition":"namespace-parameter","destination":{"env":"NAMESPACE"}},"porter-debug":{"definition":"porter-debug-parameter","description":"Print debug information from Porter when executing the bundle","destination":{"env":"PORTER_DEBUG"}},"porter-mysql-mysql-password-dep-output":{"definition":"porter-mysql-mysql-password-dep-output","description":"Wires up the mysql dependency mysql-password output for use as a parameter. Porter internal parameter that should not be set manually.","destination":{"env":"PORTER_MYSQL_MYSQL_PASSWORD_DEP_OUTPUT"}},"wordpress-name":{"definition":"wordpress-name-parameter","destination":{"env":"WORDPRESS_NAME"}},"wordpress-password":{"applyTo":["install","upgrade"],"definition":"wordpress-password-parameter","destination":{"env":"WORDPRESS_PASSWORD"},"required":true}},"requiredExtensions":["sh.porter.file-parameters","io.cnab.dependencies","io.cnab.parameter-sources"],"schemaVersion":"v1.0.0","version":"0.1.4"}
\ No newline at end of file
From 7c1838dca259730d8ea7c5793efff20c72f9f03b Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Sat, 27 Jan 2024 18:11:51 -0700
Subject: [PATCH 07/10] remove .github/images and keep testdata/images
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
.github/images/README.md | 11 -----------
.github/images/agent/Dockerfile | 12 ------------
.github/images/client/Dockerfile | 24 ------------------------
.github/images/server/Dockerfile | 28 ----------------------------
.github/images/workshop/Dockerfile | 27 ---------------------------
5 files changed, 102 deletions(-)
delete mode 100644 .github/images/README.md
delete mode 100644 .github/images/agent/Dockerfile
delete mode 100644 .github/images/client/Dockerfile
delete mode 100644 .github/images/server/Dockerfile
delete mode 100644 .github/images/workshop/Dockerfile
diff --git a/.github/images/README.md b/.github/images/README.md
deleted file mode 100644
index 73ae10a07..000000000
--- a/.github/images/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Porter Docker Images
-
-* client - This provides the porter client installed in a container. See the
- [Porter Client Docker Image][client] documentation for examples of how to
- use it.
-* workshop - This is a container suitable for teaching a workshop on Porter. See
- the [Porter Workshop Docker Image][workshop] documentation for examples of
- how to use it.
-
-[client]: https://getporter.org/docker-images/client/
-[workshop]: https://getporter.org/docker-images/workshop/
diff --git a/.github/images/agent/Dockerfile b/.github/images/agent/Dockerfile
deleted file mode 100644
index 66a07cc58..000000000
--- a/.github/images/agent/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-ARG PORTER_VERSION
-ARG REGISTRY
-FROM $REGISTRY/porter:$PORTER_VERSION
-
-# This is where files that need to be copied into /app/.porter/ should be mounted
-VOLUME /porter-config
-
-ENV PORTER_HOME /app/.porter
-COPY --chown=65532:0 --chmod=770 bin/dev/agent-linux-amd64 /app/.porter/agent
-
-USER 65532
-ENTRYPOINT ["/app/.porter/agent"]
diff --git a/.github/images/client/Dockerfile b/.github/images/client/Dockerfile
deleted file mode 100644
index e600d6437..000000000
--- a/.github/images/client/Dockerfile
+++ /dev/null
@@ -1,24 +0,0 @@
-FROM alpine:3 as builder
-WORKDIR /app/.porter
-
-RUN mkdir runtimes && \
- mkdir -p mixins/exec/runtimes
-
-# Only install porter and the exec mixin, everything else
-# must be mounted into the container
-COPY bin/dev/porter-linux-amd64 porter
-COPY bin/mixins/exec/dev/exec-linux-amd64 mixins/exec/exec
-RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
- ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
-
-# Copy the porter installation into a distroless container
-# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
-# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
-FROM gcr.io/distroless/static
-WORKDIR /app
-COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
-ENV PATH "$PATH:/app/.porter"
-
-# Run as a nonroot user
-USER 65532
-ENTRYPOINT ["/app/.porter/porter"]
diff --git a/.github/images/server/Dockerfile b/.github/images/server/Dockerfile
deleted file mode 100644
index f9a19bf0b..000000000
--- a/.github/images/server/Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-FROM alpine:3 as builder
-ARG TARGETARCH
-WORKDIR /app/.porter
-
-RUN mkdir runtimes && \
- mkdir -p mixins/exec/runtimes
-
-# Install porter-api-server, agent, and the exec mixin, everything else
-COPY bin/dev/porter-api-server-linux-$TARGETARCH porter
-COPY bin/dev/agent-linux-$TARGETARCH agent
-COPY bin/mixins/exec/dev/exec-linux-$TARGETARCH mixins/exec/exec
-RUN ln -s /app/.porter/porter runtimes/porter-runtime && \
- ln -s /app/.porter/mixins/exec/exec mixins/exec/runtimes/exec-runtime
-
-# Copy the porter installation into a distroless container
-# Explicitly not using the nonroot tag because we don't want the user to exist so it is placed in the root group
-# This allows us to run with a random UID, and access a mounted docker socket (which is only accessible via the root group)
-FROM gcr.io/distroless/static
-WORKDIR /app
-COPY --from=builder --chown=65532:0 --chmod=770 /app/.porter /app/.porter
-ENV PATH "$PATH:/app/.porter"
-# This is where files that need to be copied into /app/.porter/ should be mounted
-VOLUME /porter-config
-ENV PORTER_HOME /app/.porter
-
-# Run as a nonroot user
-USER 65532
-ENTRYPOINT ["/app/.porter/agent"]
\ No newline at end of file
diff --git a/.github/images/workshop/Dockerfile b/.github/images/workshop/Dockerfile
deleted file mode 100644
index 6a2ebe9ee..000000000
--- a/.github/images/workshop/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-FROM docker:dind
-
-ENV HELM_VER v2.17.0
-
-RUN mkdir -p /root/.porter/runtimes && \
- mkdir -p /root/.porter/mixins/exec/runtimes
-
-RUN apk add bash \
- git \
- curl \
- bash-completion \
- jq \
- ca-certificates && \
- curl -o helm.tgz https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz && \
- tar -xzf helm.tgz && \
- mv linux-amd64/helm /usr/local/bin && \
- rm helm.tgz && \
- helm init --client-only && \
- mkdir -p /workshop
-
-COPY bin/dev/porter-linux-amd64 /root/.porter/porter
-COPY bin/mixins/exec/dev/exec-linux-amd64 /root/.porter/mixins/exec/exec
-RUN ln -s /root/.porter/porter /root/.porter/runtimes/porter-runtime && \
- ln -s /root/.porter/mixins/exec/exec /root/.porter/mixins/exec/runtimes/exec-runtime && \
- ln -s /root/.porter/porter /usr/local/bin/porter
-
-WORKDIR /workshop
From 9baebc14934a95c1e4275312150fb2051ec184ad Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Mon, 29 Jan 2024 16:46:21 -0700
Subject: [PATCH 08/10] oh this is why it was failing
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
.github/workflows/porter-install-check.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/porter-install-check.yml b/.github/workflows/porter-install-check.yml
index 1c0656cd5..be1f0588f 100644
--- a/.github/workflows/porter-install-check.yml
+++ b/.github/workflows/porter-install-check.yml
@@ -25,8 +25,7 @@ jobs:
shell: powershell
macos:
runs-on:
- - self-hosted
- - macOS-latest
+ - macos-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
From 623cb06b12f4356c0777ed1c57ac100bebf0b4cd Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Mon, 29 Jan 2024 16:57:39 -0700
Subject: [PATCH 09/10] set if false explicitly
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
.github/workflows/build_azure_pipelinesrelease_template.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build_azure_pipelinesrelease_template.yml b/.github/workflows/build_azure_pipelinesrelease_template.yml
index bf841a4df..2533fef5e 100644
--- a/.github/workflows/build_azure_pipelinesrelease_template.yml
+++ b/.github/workflows/build_azure_pipelinesrelease_template.yml
@@ -78,7 +78,7 @@ jobs:
Validate-unit_test:
name: Unit Test
runs-on: ubuntu-latest
- if: ! ${{inputs.skipTests}}
+ if: ${{inputs.skipTests == false}}
steps:
- name: checkout
uses: actions/checkout@v4.1.0
@@ -125,7 +125,7 @@ jobs:
- Validate-xbuild
runs-on:
- self-hosted
- if: success() && ! ${{inputs.skipTests}}
+ if: success() && ${{inputs.skipTests == false}}
steps:
- name: checkout
uses: actions/checkout@v4.1.0
From 395ed9da3da58fe52d8091ac36520a8f45783155 Mon Sep 17 00:00:00 2001
From: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
Date: Wed, 31 Jan 2024 11:25:58 -0600
Subject: [PATCH 10/10] rm azure
Signed-off-by: Sarah Christoff <28318173+schristoff@users.noreply.github.com>
---
...ase_template.yml => build_pipelinesrelease_template.yml} | 2 +-
.github/workflows/porter-canary.yml | 6 +++---
.github/workflows/porter-release.yml | 4 ++--
.github/workflows/test-porter-release.yml | 6 +++---
.github/workflows/testporterbot.porter-release.yml | 6 +++---
5 files changed, 12 insertions(+), 12 deletions(-)
rename .github/workflows/{build_azure_pipelinesrelease_template.yml => build_pipelinesrelease_template.yml} (99%)
diff --git a/.github/workflows/build_azure_pipelinesrelease_template.yml b/.github/workflows/build_pipelinesrelease_template.yml
similarity index 99%
rename from .github/workflows/build_azure_pipelinesrelease_template.yml
rename to .github/workflows/build_pipelinesrelease_template.yml
index 2533fef5e..2d88f921c 100644
--- a/.github/workflows/build_azure_pipelinesrelease_template.yml
+++ b/.github/workflows/build_pipelinesrelease_template.yml
@@ -1,5 +1,5 @@
# Environment variables defined in a calling workflow are not accessible to this reusable workflow. Refer to the documentation for further details on this limitation.
-name: build_azure_pipelinesrelease_template
+name: build_pipelinesrelease_template
on:
workflow_call:
inputs:
diff --git a/.github/workflows/porter-canary.yml b/.github/workflows/porter-canary.yml
index b8ee5945e..79a159c23 100644
--- a/.github/workflows/porter-canary.yml
+++ b/.github/workflows/porter-canary.yml
@@ -18,9 +18,9 @@ on:
branches:
- split-builds
jobs:
- build_azure_pipelinesrelease_template:
- name: build_azure_pipelinesrelease_template
- uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
+ build_pipelinesrelease_template:
+ name: build_pipelinesrelease_template
+ uses: "./.github/workflows/build_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter
shouldPublish: ${{inputs.shouldPublish}}
diff --git a/.github/workflows/porter-release.yml b/.github/workflows/porter-release.yml
index e188f284b..3e85f99f5 100644
--- a/.github/workflows/porter-release.yml
+++ b/.github/workflows/porter-release.yml
@@ -6,9 +6,9 @@ on:
- "!latest*"
- "!canary*"
jobs:
- build_azure_pipelinesrelease_template:
+ build_pipelinesrelease_template:
name: build_azure_pipelinesrelease_template
- uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
+ uses: "./.github/workflows/build_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter
shouldPublish: true
diff --git a/.github/workflows/test-porter-release.yml b/.github/workflows/test-porter-release.yml
index 4d1dc1829..177fee700 100644
--- a/.github/workflows/test-porter-release.yml
+++ b/.github/workflows/test-porter-release.yml
@@ -17,9 +17,9 @@ env:
PORTER_PACKAGES_REMOTE: https://github.com/carolynvs/porter-packages.git
PORTER_RELEASE_REPOSITORY: github.com/carolynvs/porter
jobs:
- build_azure_pipelinesrelease_template:
- name: build_azure_pipelinesrelease_template
- uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
+ build_pipelinesrelease_template:
+ name: build_pipelinesrelease_template
+ uses: "./.github/workflows/build_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter/test
shouldPublish: ${{ inputs.shouldPublish }}
diff --git a/.github/workflows/testporterbot.porter-release.yml b/.github/workflows/testporterbot.porter-release.yml
index d04e1ae83..2a1eb2544 100644
--- a/.github/workflows/testporterbot.porter-release.yml
+++ b/.github/workflows/testporterbot.porter-release.yml
@@ -14,9 +14,9 @@ on:
branches:
- release/v1
jobs:
- build_azure_pipelinesrelease_template:
- name: build_azure_pipelinesrelease_template
- uses: "./.github/workflows/build_azure_pipelinesrelease_template.yml"
+ build_pipelinesrelease_template:
+ name: build_pipelinesrelease_template
+ uses: "./.github/workflows/build_pipelinesrelease_template.yml"
with:
registry: ghcr.io/getporter/test
shouldPublish: ${{ inputs.shouldPublish }}