This commit is contained in:
12 changed files with 14 additions and 14 deletions

View File

@@ -11,7 +11,7 @@ spec:
source: source:
repoURL: git@github.com:antonputra/lesson-158-private.git repoURL: git@github.com:antonputra/lesson-158-private.git
targetRevision: HEAD targetRevision: HEAD
path: my-app path: deploy/my-app
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
syncPolicy: syncPolicy:

View File

@@ -11,7 +11,7 @@ spec:
source: source:
repoURL: git@github.com:antonputra/lesson-158-private.git repoURL: git@github.com:antonputra/lesson-158-private.git
targetRevision: HEAD targetRevision: HEAD
path: environments/dev/my-app path: deploy-pr/environments/dev/my-app
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
syncPolicy: syncPolicy:

View File

@@ -1,7 +1,7 @@
--- ---
namespace: staging namespace: staging
images: images:
- name: aputra/nginx - name: benadis/nginx
newTag: v0.1.0 newTag: v0.1.0
resources: resources:
- ../../../my-app-base - ../../../my-app-base

View File

@@ -16,6 +16,6 @@ spec:
containers: containers:
- name: nginx - name: nginx
imagePullPolicy: Always imagePullPolicy: Always
image: aputra/nginx image: benadis/nginx
ports: ports:
- containerPort: 80 - containerPort: 80

View File

@@ -19,7 +19,7 @@ spec:
containers: containers:
- name: nginx - name: nginx
imagePullPolicy: Always imagePullPolicy: Always
image: aputra/nginx-private:v0.1.0 image: benadis/nginx:v0.1.0
ports: ports:
- containerPort: 80 - containerPort: 80
imagePullSecrets: imagePullSecrets:

View File

@@ -18,6 +18,6 @@ spec:
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: aputra/nginx:v0.1.3 image: benadis/nginx:v0.1.0
ports: ports:
- containerPort: 80 - containerPort: 80

View File

@@ -1,7 +1,7 @@
--- ---
namespace: staging namespace: staging
images: images:
- name: aputra/nginx - name: benadis/nginx
newTag: v0.1.0 newTag: v0.1.0
resources: resources:
- ../../../my-app-base - ../../../my-app-base

View File

@@ -16,6 +16,6 @@ spec:
containers: containers:
- name: nginx - name: nginx
imagePullPolicy: Always imagePullPolicy: Always
image: aputra/nginx image: benadis/nginx
ports: ports:
- containerPort: 80 - containerPort: 80

View File

@@ -19,7 +19,7 @@ spec:
containers: containers:
- name: nginx - name: nginx
imagePullPolicy: Always imagePullPolicy: Always
image: aputra/nginx-private:v0.1.0 image: benadis/nginx:v0.1.0
ports: ports:
- containerPort: 80 - containerPort: 80
imagePullSecrets: imagePullSecrets:

View File

@@ -18,6 +18,6 @@ spec:
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: aputra/nginx:v0.1.3 image: benadis/nginx:v0.1.0
ports: ports:
- containerPort: 80 - containerPort: 80

View File

@@ -18,6 +18,6 @@ spec:
spec: spec:
containers: containers:
- name: nginx - name: nginx
image: aputra/nginx:v0.1.3 image: benadis/nginx:v0.1.0
ports: ports:
- containerPort: 80 - containerPort: 80

View File

@@ -8,10 +8,10 @@ new_ver=$1
echo "new version: $new_ver" echo "new version: $new_ver"
# Simulate release of the new docker images # Simulate release of the new docker images
docker tag nginx:1.23.3 aputra/nginx:$new_ver docker tag nginx:1.23.3 benadis/nginx:$new_ver
# Push new version to dockerhub # Push new version to dockerhub
docker push aputra/nginx:$new_ver docker push benadis/nginx:$new_ver
# Create temporary folder # Create temporary folder
tmp_dir=$(mktemp -d) tmp_dir=$(mktemp -d)
@@ -21,7 +21,7 @@ echo $tmp_dir
git clone git@github.com:antonputra/lesson-158.git $tmp_dir git clone git@github.com:antonputra/lesson-158.git $tmp_dir
# Update image tag # Update image tag
sed -i '' -e "s/aputra\/nginx:.*/aputra\/nginx:$new_ver/g" $tmp_dir/my-app/1-deployment.yaml sed -i '' -e "s/benadis\/nginx:.*/benadis\/nginx:$new_ver/g" $tmp_dir/my-app/1-deployment.yaml
# Commit and push # Commit and push
cd $tmp_dir cd $tmp_dir