Skip to content

Commit

Permalink
Remove commented parts
Browse files Browse the repository at this point in the history
Signed-off-by: Giovanni Liva <[email protected]>
  • Loading branch information
thisthat committed Nov 28, 2022
1 parent 1ac1605 commit d1ee972
Showing 1 changed file with 154 additions and 154 deletions.
308 changes: 154 additions & 154 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,164 +91,164 @@ jobs:
flags: ${{ matrix.config.name }}


# build_image:
# name: Build Docker Image
# needs: prepare_ci_run
# runs-on: ubuntu-22.04
# env:
# BRANCH: ${{ needs.prepare_ci_run.outputs.BRANCH }}
# DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }}
# BUILD_TIME: ${{ needs.prepare_ci_run.outputs.BUILD_TIME }}
# GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }}
# RELEASE_REGISTRY: "localhost:5000/keptn"
# strategy:
# matrix:
# config:
# - name: "keptn-lifecycle-operator"
# folder: "operator/"
# - name: "scheduler"
# folder: "scheduler/"
# - name: "functions-runtime"
# folder: "functions-runtime/"
# steps:
# - name: Check out code
# uses: actions/checkout@v3
#
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v2
#
# - name: Build Docker Image
# uses: docker/build-push-action@v3
# with:
# context: ${{ matrix.config.folder }}
# platforms: linux/amd64
# target: production
# tags: |
# ${{ env.RELEASE_REGISTRY }}/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
# build-args: |
# GIT_HASH=${{ env.GIT_SHA }}
# RELEASE_VERSION=dev-${{ env.DATETIME }}
# BUILD_TIME=${{ env.BUILD_TIME }}
# CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
# SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
# builder: ${{ steps.buildx.outputs.name }}
# push: false
# cache-from: type=gha, scope=${{ github.workflow }}
# cache-to: type=gha, scope=${{ github.workflow }}
# outputs: type=docker,dest=/tmp/${{ matrix.config.name }}-image.tar
#
# - name: Upload image as artifact
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.config.name }}-image.tar
# path: /tmp/${{ matrix.config.name }}-image.tar
#
# - name: Install controller-gen
# if: matrix.config.name == 'keptn-lifecycle-operator'
# working-directory: ./${{ matrix.config.folder }}
# run: make controller-gen
#
# - name: Generate release.yaml
# if: matrix.config.name != 'functions-runtime'
# working-directory: ./${{ matrix.config.folder }}
# env:
# TAG: dev-${{ env.DATETIME }}
# run: make release-manifests
#
# - name: Upload release.yaml for tests
# if: matrix.config.name != 'functions-runtime'
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.config.name }}-manifest-test
# path: ${{ matrix.config.folder }}/config/rendered/release.yaml
build_image:
name: Build Docker Image
needs: prepare_ci_run
runs-on: ubuntu-22.04
env:
BRANCH: ${{ needs.prepare_ci_run.outputs.BRANCH }}
DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }}
BUILD_TIME: ${{ needs.prepare_ci_run.outputs.BUILD_TIME }}
GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }}
RELEASE_REGISTRY: "localhost:5000/keptn"
strategy:
matrix:
config:
- name: "keptn-lifecycle-operator"
folder: "operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "functions-runtime"
folder: "functions-runtime/"
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.config.folder }}
platforms: linux/amd64
target: production
tags: |
${{ env.RELEASE_REGISTRY }}/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
build-args: |
GIT_HASH=${{ env.GIT_SHA }}
RELEASE_VERSION=dev-${{ env.DATETIME }}
BUILD_TIME=${{ env.BUILD_TIME }}
CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
builder: ${{ steps.buildx.outputs.name }}
push: false
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
outputs: type=docker,dest=/tmp/${{ matrix.config.name }}-image.tar

- name: Upload image as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.name }}-image.tar
path: /tmp/${{ matrix.config.name }}-image.tar

- name: Install controller-gen
if: matrix.config.name == 'keptn-lifecycle-operator'
working-directory: ./${{ matrix.config.folder }}
run: make controller-gen

- name: Generate release.yaml
if: matrix.config.name != 'functions-runtime'
working-directory: ./${{ matrix.config.folder }}
env:
TAG: dev-${{ env.DATETIME }}
run: make release-manifests

- name: Upload release.yaml for tests
if: matrix.config.name != 'functions-runtime'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.name }}-manifest-test
path: ${{ matrix.config.folder }}/config/rendered/release.yaml

component_tests:
name: Component Tests
needs: prepare_ci_run
uses: ./.github/workflows/component-test.yml


# integration_tests:
# name: Integration Tests
# needs: [ prepare_ci_run, build_image ]
# uses: ./.github/workflows/integration-test.yml
#
# e2e_tests:
# name: End to End Tests
# needs: [ prepare_ci_run, build_image ]
# uses: ./.github/workflows/e2e-test.yml
#
# performance_tests:
# name: Performance Tests
# needs: [ prepare_ci_run, build_image ]
# uses: ./.github/workflows/performance-test.yml
#
# upload_images:
# name: Upload images to ghcr registry
# needs: [prepare_ci_run, test, component_tests, integration_tests, e2e_tests, performance_tests]
# if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true' # only run on push to main/maintenance branches
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# config:
# - name: "keptn-lifecycle-operator"
# folder: "operator/"
# - name: "scheduler"
# folder: "scheduler/"
# - name: "functions-runtime"
# folder: "functions-runtime/"
# permissions:
# packages: write # Needed for pushing images to the registry
# steps:
# - name: Check out code
# uses: actions/checkout@v3
#
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: "ghcr.io"
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v2
#
# - name: Build Docker Image
# uses: docker/build-push-action@v3
# with:
# context: ${{ matrix.config.folder }}
# platforms: linux/amd64,linux/arm64
# target: production
# tags: |
# ghcr.io/keptn/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
# build-args: |
# GIT_HASH=${{ env.GIT_SHA }}
# RELEASE_VERSION=dev-${{ env.DATETIME }}
# BUILD_TIME=${{ env.BUILD_TIME }}
# CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
# SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
# builder: ${{ steps.buildx.outputs.name }}
# push: true
# cache-from: type=gha, scope=${{ github.workflow }}
# cache-to: type=gha, scope=${{ github.workflow }}
#
# - name: Install controller-gen
# if: matrix.config.name == 'keptn-lifecycle-operator'
# working-directory: ./${{ matrix.config.folder }}
# run: make controller-gen
#
# - name: Generate release.yaml
# if: matrix.config.name != 'functions-runtime'
# working-directory: ./${{ matrix.config.folder }}
# env:
# TAG: dev-${{ env.DATETIME }}
# run: make release-manifests
#
# - name: Upload release.yaml
# if: matrix.config.name != 'functions-runtime'
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.config.name }}-manifest
# path: ${{ matrix.config.folder }}/config/rendered/release.yaml
integration_tests:
name: Integration Tests
needs: [ prepare_ci_run, build_image ]
uses: ./.github/workflows/integration-test.yml

e2e_tests:
name: End to End Tests
needs: [ prepare_ci_run, build_image ]
uses: ./.github/workflows/e2e-test.yml

performance_tests:
name: Performance Tests
needs: [ prepare_ci_run, build_image ]
uses: ./.github/workflows/performance-test.yml

upload_images:
name: Upload images to ghcr registry
needs: [prepare_ci_run, test, component_tests, integration_tests, e2e_tests, performance_tests]
if: github.event_name == 'push' && needs.prepare_ci_run.outputs.NON_FORKED_AND_NON_ROBOT_RUN == 'true' # only run on push to main/maintenance branches
runs-on: ubuntu-22.04
strategy:
matrix:
config:
- name: "keptn-lifecycle-operator"
folder: "operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "functions-runtime"
folder: "functions-runtime/"
permissions:
packages: write # Needed for pushing images to the registry
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: "ghcr.io"
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker Image
uses: docker/build-push-action@v3
with:
context: ${{ matrix.config.folder }}
platforms: linux/amd64,linux/arm64
target: production
tags: |
ghcr.io/keptn/${{ matrix.config.name }}:dev-${{ env.DATETIME }}
build-args: |
GIT_HASH=${{ env.GIT_SHA }}
RELEASE_VERSION=dev-${{ env.DATETIME }}
BUILD_TIME=${{ env.BUILD_TIME }}
CONTROLLER_TOOLS_VERSION=${{ env.CONTROLLER_TOOLS_VERSION }}
SCHEDULER_COMPATIBLE_K8S_VERSION=${{ env.SCHEDULER_COMPATIBLE_K8S_VERSION }}
builder: ${{ steps.buildx.outputs.name }}
push: true
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}

- name: Install controller-gen
if: matrix.config.name == 'keptn-lifecycle-operator'
working-directory: ./${{ matrix.config.folder }}
run: make controller-gen

- name: Generate release.yaml
if: matrix.config.name != 'functions-runtime'
working-directory: ./${{ matrix.config.folder }}
env:
TAG: dev-${{ env.DATETIME }}
run: make release-manifests

- name: Upload release.yaml
if: matrix.config.name != 'functions-runtime'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.name }}-manifest
path: ${{ matrix.config.folder }}/config/rendered/release.yaml

0 comments on commit d1ee972

Please sign in to comment.