diff --git a/build/atom-template.xml b/.github/workflows/atom-template.xml
similarity index 100%
rename from build/atom-template.xml
rename to .github/workflows/atom-template.xml
diff --git a/.github/workflows/build_azure_pipelinesrelease_template.yml b/.github/workflows/build_pipelinesrelease_template.yml
similarity index 97%
rename from .github/workflows/build_azure_pipelinesrelease_template.yml
rename to .github/workflows/build_pipelinesrelease_template.yml
index 515827f45..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:
@@ -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
diff --git a/build/doc-only-build.sh b/.github/workflows/doc-only-build.sh
similarity index 100%
rename from build/doc-only-build.sh
rename to .github/workflows/doc-only-build.sh
diff --git a/.github/workflows/porter-canary.yml b/.github/workflows/porter-canary.yml
index b89303b79..79a159c23 100644
--- a/.github/workflows/porter-canary.yml
+++ b/.github/workflows/porter-canary.yml
@@ -18,10 +18,10 @@ 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}}"
- skipTests: "${{inputs.skipTests}}"
+ shouldPublish: ${{inputs.shouldPublish}}
+ skipTests: ${{inputs.skipTests}}
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
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/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
diff --git a/.github/workflows/test-porter-release.yml b/.github/workflows/test-porter-release.yml
index 403aa2ff2..177fee700 100644
--- a/.github/workflows/test-porter-release.yml
+++ b/.github/workflows/test-porter-release.yml
@@ -17,10 +17,10 @@ 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 }}"
- 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..2a1eb2544 100644
--- a/.github/workflows/testporterbot.porter-release.yml
+++ b/.github/workflows/testporterbot.porter-release.yml
@@ -14,10 +14,10 @@ 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 }}"
- skipTests: "${{ inputs.skipTests }}"
+ shouldPublish: ${{ inputs.shouldPublish }}
+ skipTests: ${{ inputs.skipTests }}
\ No newline at end of file
diff --git a/README.md b/README.md
index 487e4aaa4..d5ba8558a 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
[![CNCF Sandbox Project](docs/static/images/cncf-sandbox-badge.svg)](https://www.cncf.io/projects/porter/)
-[![Build Status](https://dev.azure.com/getporter/porter/_apis/build/status/porter-canary?branchName=main)](https://dev.azure.com/getporter/porter/_build/latest?definitionId=26&branchName=main)
+[![Build Status](https://github.com/getporter/porter/actions/workflows/porter.yml/badge.svg)](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/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/testdata/bundles/mysql/.cnab/bundle.json b/build/testdata/bundles/mysql/.cnab/bundle.json
old mode 100644
new mode 100755
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