Skip to content

Commit

Permalink
Merge branch 'main' into feat/3178/use-our-own-images
Browse files Browse the repository at this point in the history
  • Loading branch information
kichristensen authored Dec 15, 2024
2 parents 0c3fe33 + 4899aa2 commit 06850e1
Show file tree
Hide file tree
Showing 185 changed files with 4,100 additions and 1,004 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_pipelinesrelease_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
goVersion:
required: false
default: 1.21.3
default: 1.23.3
type: string
registry:
required: false
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
run: mage build
shell: bash
- name: Publish Native Binaries
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4.4.0
with:
name: build-bin
path: "${{ github.workspace }}/bin"
Expand All @@ -56,7 +56,7 @@ jobs:
run: mage XBuildAll
shell: bash
- name: Publish Release Binaries
uses: actions/upload-artifact@v4.0.0
uses: actions/upload-artifact@v4.4.0
with:
name: xbuild-bin
path: "${{ github.workspace }}/bin"
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
with:
go-version: ${{ inputs.goVersion }}
- name: Download Cross-Compiled Porter Binaries
uses: actions/download-artifact@v4.1.0
uses: actions/download-artifact@v4.1.8
with:
name: xbuild-bin
path: bin
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
with:
go-version: ${{ inputs.goVersion }}
- name: Download Cross-Compiled Porter Binaries
uses: actions/download-artifact@v4.1.0
uses: actions/download-artifact@v4.1.8
with:
name: xbuild-bin
path: bin
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
with:
go-version: ${{ inputs.goVersion }}
- name: Download Cross-Compiled Porter Binaries
uses: actions/download-artifact@v4.1.0
uses: actions/download-artifact@v4.1.8
with:
name: xbuild-bin
path: bin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-docs-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Check Website Links
on: pull_request

env:
GOVERSION: 1.21.3
GOVERSION: 1.23.3

jobs:
htmltest:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integ-reuseable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
type: string
default: ghcr.io
env:
GOVERSION: 1.21.3
GOVERSION: 1.23.3
PORTER_INTEG_FILE: ${{inputs.test_name}}.go

jobs:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/porter-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
branches:
- main
- release/*

# This configuration ensures that multiple canary releases don't run at the same time:
# - The 'group' combines the workflow name and git reference to create a unique identifier
# - 'cancel-in-progress: false' means if a new release is triggered, it will wait in line
# instead of canceling any running release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build_pipelinesrelease_template:
name: build_pipelinesrelease_template
Expand Down
62 changes: 61 additions & 1 deletion .github/workflows/porter-integration-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main

env:
GOVERSION: 1.21.3
GOVERSION: 1.23.3

jobs:
archive_integration_test:
Expand Down Expand Up @@ -154,3 +154,63 @@ jobs:
PORTER_INTEG_FILE: signing_test.go
run: go run mage.go -v TestIntegration
shell: bash
upgrade_test_integ:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GOVERSION }}"
cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
env:
PORTER_INTEG_FILE: upgrade_test.go
run: go run mage.go -v TestIntegration
shell: bash
plugin_log_level_test_integ:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GOVERSION }}"
cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
env:
PORTER_INTEG_FILE: plugin_log_level_test.go
run: go run mage.go -v TestIntegration
shell: bash
62 changes: 61 additions & 1 deletion .github/workflows/porter-integration-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
default: ghcr.io

env:
GOVERSION: 1.21.3
GOVERSION: 1.23.3

jobs:
archive_integration_test:
Expand Down Expand Up @@ -193,3 +193,63 @@ jobs:
PORTER_INTEG_FILE: signing_test.go
run: go run mage.go -v TestIntegration
shell: bash
upgrade_test_integ:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GOVERSION }}"
cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
env:
PORTER_INTEG_FILE: upgrade_test.go
run: go run mage.go -v TestIntegration
shell: bash
plugin_log_level_test_integ:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v4
with:
go-version: "${{ env.GOVERSION }}"
cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
env:
PORTER_INTEG_FILE: plugin_log_level_test.go
run: go run mage.go -v TestIntegration
shell: bash
8 changes: 8 additions & 0 deletions .github/workflows/porter-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ on:
- "!latest*"
- "!canary*"

# This configuration ensures that multiple releases don't run at the same time:
# - The 'group' combines the workflow name and git reference to create a unique identifier
# - 'cancel-in-progress: false' means if a new release is triggered, it will wait in line
# instead of canceling any running release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build_pipelinesrelease_template:
name: build_pipelinesrelease_template
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/porter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
paths-ignore:
- 'docs/**'
env:
GOVERSION: 1.21.3
GOVERSION: 1.23.3

jobs:
Build:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
fi
shell: bash
- name: Publish Native Binaries
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.4.0
with:
name: build-bin
path: "${{ github.workspace }}/bin"
Expand All @@ -58,7 +58,7 @@ jobs:
run: go run mage.go -v XBuildAll
shell: bash
- name: Publish Release Binaries
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.4.0
with:
name: xbuild-bin
path: "${{ github.workspace }}/bin"
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
cache: true
- run: go version
- name: Download Cross-Compiled Porter Binaries
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v4.1.8
with:
name: xbuild-bin
path: bin
Expand All @@ -129,7 +129,7 @@ jobs:
- name: checkout
uses: actions/checkout@v3.5.0
- name: Download Cross-Compiled Porter Binaries
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v4.1.8
with:
name: xbuild-bin
path: bin
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ dependency injection and testing strategies.
this repository
* **docs**: our website
* **pkg**
* **build**: implements building the invocation image.
* **build**: implements building the bundle image.
* **cache**: handles the cache of bundles that have been pulled by commands
like `porter install --reference`.
* **cnab**: deals with the CNAB spec
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTION_LADDER.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ for at least 2 (two) releases, so they can get comfortable with the release proc

## Inactivity
It is important for maintainers to stay active to set an example and show commitment to the project.
Inactivity is harmful to the project as it may lead to unexpected delays, contributor attrition, and a lost of trust in the project.
Inactivity is harmful to the project as it may lead to unexpected delays, contributor attrition, and a loss of trust in the project.

* Inactivity is measured by:
* Periods of no contributions for longer than 6 months, where contributions must include maintainer-level tasks:
Expand Down
6 changes: 6 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ and we will add you. **All** contributors belong here. 💯
- [David Gannon](https://github.com/dgannon991)
- [guangwu guo](https://github.com/testwill)
- [Eric Herrmann](https://github.com/egherrmann)
- [Alex Dejanu](https://github.com/dejanu)
- [Leo Bergnéhr](https://github.com/lbergnehr)
- [John Cudd](https://github.com/jmcudd)
- [Robin Brämer](https://github.com/robinbraemer)
- [Geeta Chavan](https://github.com/geetachavan1)
- [Stephen Augustus](https://github.com/justaugustus)
2 changes: 1 addition & 1 deletion cmd/exec/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func buildBuildCommand(m *exec.Mixin) *cobra.Command {
cmd := &cobra.Command{
Use: "build",
Short: "Generate Dockerfile lines for the bundle invocation image",
Short: "Generate Dockerfile lines for the bundle image",
Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintln(m.Config.Out, "# exec mixin has no buildtime dependencies")
},
Expand Down
16 changes: 10 additions & 6 deletions cmd/porter/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func buildBundleBuildCommand(p *porter.Porter) *cobra.Command {
cmd := &cobra.Command{
Use: "build",
Short: "Build a bundle",
Long: `Builds the bundle in the current directory by generating a Dockerfile and a CNAB bundle.json, and then building the invocation image.
Long: `Builds the bundle in the current directory by generating a Dockerfile and a CNAB bundle.json, and then building the bundle image.
The docker driver builds the bundle image using the local Docker host. To use a remote Docker host, set the following environment variables:
DOCKER_HOST (required)
Expand Down Expand Up @@ -85,20 +85,23 @@ The docker driver builds the bundle image using the local Docker host. To use a
f.StringVarP(&opts.Dir, "dir", "d", "",
"Path to the build context directory where all bundle assets are located. Defaults to the current directory.")
f.StringVar(&opts.Driver, "driver", porter.BuildDriverDefault,
fmt.Sprintf("Driver for building the invocation image. Allowed values are: %s", strings.Join(porter.BuildDriverAllowedValues, ", ")))
fmt.Sprintf("Driver for building the bundle image. Allowed values are: %s", strings.Join(porter.BuildDriverAllowedValues, ", ")))
_ = f.MarkHidden("driver") // Hide the driver flag since there aren't any choices to make right now
f.StringArrayVar(&opts.BuildArgs, "build-arg", nil,
"Set build arguments in the template Dockerfile (format: NAME=VALUE). May be specified multiple times. Max length is 5,000 characters.")
f.StringArrayVar(&opts.BuildContexts, "build-context", nil,
"Define additional build context with specified contents (format: NAME=PATH). May be specified multiple times.")
f.StringArrayVar(&opts.SSH, "ssh", nil,
"SSH agent socket or keys to expose to the build (format: default|<id>[=<socket>|<key>[,<key>]]). May be specified multiple times.")
f.StringArrayVar(&opts.Secrets, "secret", nil,
"Secret file to expose to the build (format: id=mysecret,src=/local/secret). Custom values are accessible as build arguments in the template Dockerfile and in the manifest using template variables. May be specified multiple times.")
f.BoolVar(&opts.NoCache, "no-cache", false,
"Do not use the Docker cache when building the bundle's invocation image.")
"Do not use the Docker cache when building the bundle image.")
f.StringArrayVar(&opts.Customs, "custom", nil,
"Define an individual key-value pair for the custom section in the form of NAME=VALUE. Use dot notation to specify a nested custom field. May be specified multiple times. Max length is 5,000 characters when used as a build argument.")
f.BoolVar(&opts.InsecureRegistry, "insecure-registry", false,
"Don't require TLS when pulling referenced images")
f.BoolVar(&opts.PreserveTags, "preserve-tags", false, "Preserve the original tag name on referenced images")

// Allow configuring the --driver flag with build-driver, to avoid conflicts with other commands
cmd.Flag("driver").Annotations = map[string][]string{
Expand Down Expand Up @@ -143,9 +146,9 @@ func buildBundlePublishCommand(p *porter.Porter) *cobra.Command {
cmd := cobra.Command{
Use: "publish",
Short: "Publish a bundle",
Long: `Publishes a bundle by pushing the invocation image and bundle to a registry.
Long: `Publishes a bundle by pushing the bundle image and bundle to a registry.
Note: if overrides for registry/tag/reference are provided, this command only re-tags the invocation image and bundle; it does not re-build the bundle.`,
Note: if overrides for registry/tag/reference are provided, this command only re-tags the bundle image and bundle; it does not re-build the bundle.`,
Example: ` porter bundle publish
porter bundle publish --file myapp/porter.yaml
porter bundle publish --dir myapp
Expand Down Expand Up @@ -178,6 +181,7 @@ Note: if overrides for registry/tag/reference are provided, this command only re
}
f.BoolVar(&opts.AutoBuildDisabled, "autobuild-disabled", false, "Do not automatically build the bundle from source when the last build is out-of-date.")
f.BoolVar(&opts.SignBundle, "sign-bundle", false, "Sign the bundle using the configured signing plugin")
f.BoolVar(&opts.PreserveTags, "preserve-tags", false, "Preserve the original tag name on referenced images")

return &cmd
}
Expand All @@ -188,7 +192,7 @@ func buildBundleArchiveCommand(p *porter.Porter) *cobra.Command {
cmd := cobra.Command{
Use: "archive FILENAME --reference PUBLISHED_BUNDLE",
Short: "Archive a bundle from a reference",
Long: "Archives a bundle by generating a gzipped tar archive containing the bundle, invocation image and any referenced images.",
Long: "Archives a bundle by generating a gzipped tar archive containing the bundle, bundle image and any referenced images.",
Example: ` porter bundle archive mybun.tgz --reference ghcr.io/getporter/examples/porter-hello:v0.2.0
porter bundle archive mybun.tgz --reference localhost:5000/ghcr.io/getporter/examples/porter-hello:v0.2.0 --force
porter bundle archive mybun.tgz --compression NoCompression --reference ghcr.io/getporter/examples/porter-hello:v0.2.0
Expand Down
Loading

0 comments on commit 06850e1

Please sign in to comment.