-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #916 from rnc/BR1
- Loading branch information
Showing
7 changed files
with
79 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,34 +17,37 @@ fi | |
DIR=`dirname $0` | ||
kubectl apply -f $DIR/namespace.yaml | ||
kubectl config set-context --current --namespace=test-jvm-namespace | ||
kubectl delete --ignore-not-found secret jvm-build-image-secrets jvm-build-git-secrets jvm-build-maven-repo-secrets jvm-build-maven-repo-aws-secrets jvm-build-s3-secrets jvm-build-git-repo-secrets | ||
|
||
if [ -n "$QUAY_ORG" ] && [ -n "$QUAY_TOKEN" ]; then | ||
kubectl delete --ignore-not-found secret -n image-controller quaytoken | ||
kubectl create secret generic -n image-controller quaytoken --from-literal "quaytoken=$QUAY_TOKEN" --from-literal "organization=$QUAY_ORG" | ||
fi | ||
kubectl create secret generic jvm-build-image-secrets --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson | ||
kubectl create secret generic jvm-build-git-secrets --from-literal .git-credentials=" | ||
|
||
echo -e "\033[0;32mSecrets...\033[0m" | ||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-image-secrets --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson | kubectl apply -f - | ||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-git-secrets --from-literal .git-credentials=" | ||
https://$GITHUB_E2E_ORGANIZATION:$GITHUB_TOKEN@github.com | ||
https://test:[email protected] | ||
" | ||
" | kubectl apply -f - | ||
if [ -n "$GIT_DEPLOY_TOKEN" ]; then | ||
kubectl create secret generic jvm-build-git-repo-secrets --from-literal gitdeploytoken="$GIT_DEPLOY_TOKEN" | ||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-git-repo-secrets --from-literal gitdeploytoken="$GIT_DEPLOY_TOKEN" | kubectl apply -f - | ||
fi | ||
if [ -n "$MAVEN_PASSWORD" ]; then | ||
kubectl create secret generic jvm-build-maven-repo-secrets --from-literal mavenpassword="$MAVEN_PASSWORD" | ||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-maven-repo-secrets --from-literal mavenpassword="$MAVEN_PASSWORD" | kubectl apply -f - | ||
fi | ||
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ]; then | ||
if [ -n "$AWS_PROFILE" ]; then | ||
PROFILE="--from-literal awsprofile=$AWS_PROFILE" | ||
fi | ||
kubectl create secret generic jvm-build-maven-repo-aws-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" $PROFILE | ||
kubectl create secret generic jvm-build-s3-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" --from-literal awsregion=us-east-1 | ||
|
||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-maven-repo-aws-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" $PROFILE | kubectl apply -f - | ||
kubectl create --dry-run=client -o=yaml secret generic jvm-build-s3-secrets --from-literal=awsaccesskey=$AWS_ACCESS_KEY_ID --from-literal awssecretkey="$AWS_SECRET_ACCESS_KEY" --from-literal awsregion=us-east-1 | kubectl apply -f - | ||
fi | ||
|
||
echo -e "\033[0;32mPatching...\033[0m" | ||
JVM_BUILD_SERVICE_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-controller \ | ||
JVM_BUILD_SERVICE_CACHE_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-cache \ | ||
JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE=quay.io/$QUAY_USERNAME/hacbs-jvm-build-request-processor:dev \ | ||
JVM_BUILD_SERVICE_CONSOLE_IMAGE=quay.io/$QUAY_USERNAME/jbs-management-console \ | ||
$DIR/patch-yaml.sh | ||
echo -e "\033[0;32mRunning kubectl...\033[0m" | ||
kubectl apply -k $DIR/overlays/development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
commonLabels: | ||
app: hacbs-jvm-operator | ||
resources: | ||
- system-config.yaml | ||
- system-config.yaml | ||
|
||
patchesStrategicMerge: | ||
#note that when updating the ref here you must also update system-config.yaml | ||
- https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service-builder-images/bd8e505b3082a03c030b36868a3753df9db15f97/image-config.yaml | ||
labels: | ||
- includeSelectors: true | ||
pairs: | ||
app: hacbs-jvm-operator | ||
|
||
#note that when updating the ref here you must also update system-config.yaml | ||
patches: | ||
- path: https://raw.githubusercontent.com/redhat-appstudio/jvm-build-service-builder-images/bd8e505b3082a03c030b36868a3753df9db15f97/image-config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
bases: | ||
- "../../base" | ||
|
||
patchesStrategicMerge: | ||
- config.yaml | ||
resources: | ||
- ../../base | ||
patches: | ||
- path: config.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,36 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
bases: | ||
- "../../crds/base" | ||
- "../../base" | ||
- "../../operator/config" | ||
- "../../operator/overlays/dev-template" | ||
# - "../../console/overlays/dev-template" | ||
resources: | ||
- ../../crds/base | ||
- ../../base | ||
- ../../operator/config | ||
- ../../operator/overlays/dev-template | ||
# - ../../console/overlays/dev-template | ||
|
||
patches: | ||
- patch: |- | ||
- op: replace | ||
path: /spec/steps/2/image | ||
value: jvm-build-service-reqprocessor-image | ||
target: | ||
kind: Task | ||
name: maven | ||
- patch: |- | ||
- op: add | ||
path: "/spec/template/spec/containers/0/env" | ||
value: | ||
- name: S3_SYNC_ENABLED | ||
value: "true" | ||
target: | ||
kind: Deployment | ||
name: hacbs-jvm-operator | ||
patchesStrategicMerge: | ||
- config.yaml | ||
- system-config.yaml | ||
- patch: |- | ||
- op: replace | ||
path: /spec/steps/2/image | ||
value: jvm-build-service-reqprocessor-image | ||
target: | ||
kind: Task | ||
name: maven | ||
- patch: |- | ||
- op: replace | ||
path: /spec/steps/2/image | ||
value: jvm-build-service-reqprocessor-image | ||
target: | ||
kind: Task | ||
name: gradle | ||
- patch: |- | ||
- op: add | ||
path: "/spec/template/spec/containers/0/env" | ||
value: | ||
- name: S3_SYNC_ENABLED | ||
value: "true" | ||
target: | ||
kind: Deployment | ||
name: hacbs-jvm-operator | ||
- path: config.yaml | ||
- path: system-config.yaml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters