test testing build
This commit is contained in:
parent
b54e3147c3
commit
bbeef23c45
@ -204,6 +204,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: .
|
at: .
|
||||||
|
- run:
|
||||||
|
name: "Export GIT_SHA"
|
||||||
|
command: echo "export GIT_SHA=$(git rev-parse --short HEAD)" >> $BASH_ENV
|
||||||
|
- run:
|
||||||
|
name: "Generate the Target Image Name"
|
||||||
|
command: echo "export IMAGE_NAME=\"${ATAT_DOCKER_REGISTRY_URL}/${PROD_IMAGE_NAME}:${GIT_SHA}\"" >> $BASH_ENV
|
||||||
- run:
|
- run:
|
||||||
name: "Update Kubernetes Deployment"
|
name: "Update Kubernetes Deployment"
|
||||||
command: ./deploy/kubernetes/atst-update-deploy.sh atat-test
|
command: ./deploy/kubernetes/atst-update-deploy.sh atat-test
|
||||||
@ -231,15 +237,31 @@ workflows:
|
|||||||
nightly:
|
nightly:
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
cron: "0 0 * * *"
|
cron: "37 * * * *"
|
||||||
|
# cron: "0 0 * * *"
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- test-env
|
||||||
jobs:
|
jobs:
|
||||||
|
- app_setup
|
||||||
|
- test:
|
||||||
|
requires:
|
||||||
|
- app_setup
|
||||||
|
- build_and_push_image:
|
||||||
|
requires:
|
||||||
|
- test
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
- test-env
|
||||||
- deploy_test:
|
- deploy_test:
|
||||||
requires:
|
requires:
|
||||||
- build_and_push_image
|
- build_and_push_image
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: master
|
only:
|
||||||
|
- master
|
||||||
|
- test-env
|
||||||
|
@ -32,6 +32,9 @@ subjects:
|
|||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: atat-deployer
|
name: atat-deployer
|
||||||
namespace: atat
|
namespace: atat
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: atat-deployer
|
||||||
|
namespace: atat-test
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: Role
|
kind: Role
|
||||||
name: atat-deploy-role
|
name: atat-deploy-role
|
||||||
|
@ -37,7 +37,7 @@ echo "${K8S_CA_CRT}" | base64 -d - > "${HOME}/k8s_ca.crt"
|
|||||||
kubectl config set-context atst-deployer \
|
kubectl config set-context atst-deployer \
|
||||||
--cluster=atat-cluster \
|
--cluster=atat-cluster \
|
||||||
--user=atat-deployer \
|
--user=atat-deployer \
|
||||||
--namespace=atat
|
--namespace=${NAMESPACE}
|
||||||
|
|
||||||
kubectl config set-cluster atat-cluster \
|
kubectl config set-cluster atat-cluster \
|
||||||
--embed-certs=true \
|
--embed-certs=true \
|
||||||
|
18
deploy/kubernetes/test/atat-deploy-role.yml
Normal file
18
deploy/kubernetes/test/atat-deploy-role.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
kind: Role
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
metadata:
|
||||||
|
namespace: atat-test
|
||||||
|
name: atat-deploy-role
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["extensions", "apps"]
|
||||||
|
resources: ["deployments"]
|
||||||
|
verbs: ["get", "watch", "create", "update", "patch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["services"]
|
||||||
|
verbs: ["get", "create", "update", "patch"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["configmaps"]
|
||||||
|
verbs: ["get", "create", "update", "patch"]
|
||||||
|
- apiGroups: ["extensions", "apps"]
|
||||||
|
resources: ["ingresses"]
|
||||||
|
verbs: ["get", "create", "update", "patch"]
|
Loading…
x
Reference in New Issue
Block a user