Skip to content

Commit

Permalink
Merge branch 'main' into manisbindra/add-install-uninstall-local-volu…
Browse files Browse the repository at this point in the history
…me-mount-feature
  • Loading branch information
schristoff authored Feb 7, 2024
2 parents 86dcb73 + 07ad7bb commit 3392e34
Show file tree
Hide file tree
Showing 39 changed files with 831 additions and 884 deletions.
File renamed without changes.
36 changes: 0 additions & 36 deletions .github/workflows/build-publish-from-fork.yaml

This file was deleted.

187 changes: 187 additions & 0 deletions .github/workflows/build_pipelinesrelease_template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# 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_pipelinesrelease_template
on:
workflow_call:
inputs:
goVersion:
required: false
default: 1.20.7
type: string
registry:
required: false
default: ghcr.io/getporter/test
type: string
shouldPublish:
required: false
default: false
type: boolean
skipTests:
required: false
default: false
type: boolean
jobs:
Validate-build:
name: Native Compile
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Configure Agent
run: go run mage.go ConfigureAgent
- name: Native Build
run: mage build
shell: bash
- name: Publish Native Binaries
uses: actions/[email protected]
with:
name: build-bin
path: "${{ github.workspace }}/bin"
Validate-xbuild:
name: Cross Compile
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Configure Agent
run: go run mage.go ConfigureAgent
- name: Cross Compile
run: mage XBuildAll
shell: bash
- name: Publish Release Binaries
uses: actions/[email protected]
with:
name: xbuild-bin
path: "${{ github.workspace }}/bin"
Validate-VetLint:
name: Vet and Lint
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Configure Agent
run: go run mage.go ConfigureAgent
- name: Vet
run: mage Vet
shell: bash
- name: Lint
run: mage Lint
shell: bash
Validate-unit_test:
name: Unit Test
runs-on: ubuntu-latest
if: ${{inputs.skipTests == false}}
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Configure Agent
run: go run mage.go ConfigureAgent
- name: Unit Test
run: mage TestUnit
shell: bash
Validate-integration_test:
name: Integration Test
needs:
- Validate-build
uses: "./.github/workflows/porter-integration-release.yml"
with:
registry: ${{inputs.registry}}
Validate-smoke_test:
name: Run smoke tests on
needs:
- Validate-xbuild
runs-on: ubuntu-latest
if: success() && ${{inputs.skipTests == false}}
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Download Cross-Compiled Porter Binaries
uses: actions/[email protected]
with:
name: xbuild-bin
path: bin
- name: Setup Bin
run: go run mage.go ConfigureAgent UseXBuildBinaries
- name: Run Smoke Tests
run: mage -v TestSmoke
publish_binaries:
name: Publish Binaries
needs:
- Validate-build
- Validate-xbuild
- Validate-VetLint
- Validate-unit_test
- Validate-integration_test
- Validate-smoke_test
runs-on: ubuntu-latest
permissions: write-all
if: success() && inputs.shouldPublish
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Download Cross-Compiled Porter Binaries
uses: actions/[email protected]
with:
name: xbuild-bin
path: bin
- name: Setup Bin
run: go run mage.go ConfigureAgent UseXBuildBinaries
- name: Publish Porter Binaries
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
VERSION: ${{github.ref_name}}
run: mage PublishPorter PublishMixins
publish-ghcr:
env:
DOCKER_REGISTRY: ${{inputs.registry}}
DOCKER_USERNAME: getporterbot
VERSION: ${{github.ref_name}}
name: Publish Docker Images
needs:
- Validate-build
- Validate-xbuild
- Validate-VetLint
- Validate-unit_test
- Validate-integration_test
- Validate-smoke_test
runs-on: ubuntu-latest
permissions: write-all
if: success() && inputs.shouldPublish
steps:
- name: checkout
uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version: "${{ inputs.GOVERSION }}"
- name: Download Cross-Compiled Porter Binaries
uses: actions/[email protected]
with:
name: xbuild-bin
path: bin
- name: Setup Bin
run: go run mage.go ConfigureAgent UseXBuildBinaries
- name: Login to Container Registry
uses: docker/[email protected]
with:
registry: "${{inputs.registry}}"
username: "${{ github.actor }}"
password: "${{ secrets.GITHUB_TOKEN }}"
- name: Publish Docker Images to ${{inputs.registry}}
run: PORTER_REGISTRY=${{inputs.registry}} mage PublishImages
2 changes: 1 addition & 1 deletion .github/workflows/check-licenses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/close-issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
- release/*

jobs:
closeIssue:
closeIssueOnPrMergeTrigger:
runs-on: ubuntu-latest
steps:
- name: Closes issues related to a merged pull request.
uses: ldez/gha-mjolnir@v1.1.0
uses: ldez/gha-mjolnir@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
fetch-depth: 0 # Get all git history
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
Expand Down
File renamed without changes.
45 changes: 45 additions & 0 deletions .github/workflows/integ-reuseable-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: integ reusable workflow

on:
workflow_call:
inputs:
test_name:
type: string
required: true
registry:
type: string
required: true
default: ghcr.io
env:
GOVERSION: 1.20.7
PORTER_INTEG_FILE: ${{inputs.test_name}}.go

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- 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/[email protected]
with:
registry: ${{inputs.registry}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Agent
run: go run mage.go build
shell: bash
- name: Integration Test
run: go run mage.go -v TestIntegration
shell: bash
27 changes: 27 additions & 0 deletions .github/workflows/porter-canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: porter/porter-canary
on:
workflow_dispatch:
inputs:
shouldPublish:
default: true
type: boolean
required: false
skipTests:
default: false
type: boolean
required: false
push:
branches:
- main
- release/*
pull_request:
branches:
- split-builds
jobs:
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}}
34 changes: 34 additions & 0 deletions .github/workflows/porter-install-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: porter/porter-install-check
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: Test Install Script
run: scripts/test/test-linux-install.sh
shell: bash
windows:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: Test Install Script
run: scripts\test\test-windows-install.ps1
shell: powershell
macos:
runs-on:
- macos-latest
steps:
- name: checkout
uses: actions/[email protected]
- name: Test Install Script
run: scripts/test/test-mac-install.sh
shell: bash
Loading

0 comments on commit 3392e34

Please sign in to comment.