Skip to content

Commit

Permalink
use Dockerfile from code-generator for building controller image (#167)
Browse files Browse the repository at this point in the history
Issue #, if available: aws-controllers-k8s/community#1112

Description of changes:
* use Dockerfile from code-generator for building controller image
* This helps in maintaining only single Dockerfile for building ACK controller images

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
vijtrip2 authored Dec 28, 2021
1 parent 75752b2 commit 8dc93e3
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 51 deletions.
49 changes: 0 additions & 49 deletions cd/controller/Dockerfile

This file was deleted.

3 changes: 2 additions & 1 deletion cd/scripts/release-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CD_DIR=$DIR/..
TEST_INFRA_DIR=$CD_DIR/..
WORKSPACE_DIR=$TEST_INFRA_DIR/..
SERVICE_CONTROLLER_DIR="$WORKSPACE_DIR/$AWS_SERVICE-controller"
CODE_GEN_DIR="$WORKSPACE_DIR/code-generator"

# Check all the dependencies are present in container.
source "$TEST_INFRA_DIR"/scripts/lib/common.sh
Expand Down Expand Up @@ -116,7 +117,7 @@ if ! (echo "$VERSION" | grep -Eq "stable$"); then
SERVICE_CONTROLLER_GIT_COMMIT=$(git rev-parse HEAD)
QUIET=${QUIET:-"false"}
BUILD_DATE=$(date +%Y-%m-%dT%H:%M)
CONTROLLER_IMAGE_DOCKERFILE_PATH=$CD_DIR/controller/Dockerfile
CONTROLLER_IMAGE_DOCKERFILE_PATH=$CODE_GEN_DIR/Dockerfile

DEFAULT_DOCKER_REPOSITORY="public.ecr.aws/aws-controllers-k8s/$AWS_SERVICE-controller"
DOCKER_REPOSITORY=${DOCKER_REPOSITORY:-"$DEFAULT_DOCKER_REPOSITORY"}
Expand Down
4 changes: 4 additions & 0 deletions prow/jobs/jinja/postsubmits/controller_release.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down
70 changes: 69 additions & 1 deletion prow/jobs/jobs.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Autogenerated. Do NOT update Manually.
# Last generated on 2021-12-07 14:15:19.851246.
# Last generated on 2021-12-28 13:36:49.688687.
periodics:
- name: periodic-close
interval: 6h
Expand Down Expand Up @@ -280,6 +280,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -430,6 +434,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -580,6 +588,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -730,6 +742,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -880,6 +896,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1030,6 +1050,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1180,6 +1204,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1330,6 +1358,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1480,6 +1512,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1630,6 +1666,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1780,6 +1820,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -1930,6 +1974,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -2080,6 +2128,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -2230,6 +2282,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -2380,6 +2436,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -2530,6 +2590,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down Expand Up @@ -2680,6 +2744,10 @@ postsubmits:
repo: test-infra
base_ref: main
workdir: true
- org: aws-controllers-k8s
repo: code-generator
base_ref: main
workdir: false
spec:
serviceAccountName: post-submit-service-account
containers:
Expand Down

0 comments on commit 8dc93e3

Please sign in to comment.