This commit is contained in:
60
.github/workflows/build.yaml
vendored
60
.github/workflows/build.yaml
vendored
@ -25,24 +25,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ./version
|
path: ./version
|
||||||
### off-test ###
|
### off-test ###
|
||||||
# - name: Install Docker // Docker 설치
|
- name: Install Docker // Docker 설치
|
||||||
# run: |
|
run: |
|
||||||
# curl -fsSL https://get.docker.com -o get-docker.sh
|
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||||
# sh get-docker.sh
|
sh get-docker.sh
|
||||||
# if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
|
||||||
# - name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
# # uses: https://github.com/docker/setup-buildx-action@v1
|
# uses: https://github.com/docker/setup-buildx-action@v1
|
||||||
# uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
# - name: Login to Registry
|
- name: Login to Registry
|
||||||
# run: docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PW }} https://harbor.icurfer.com
|
run: docker login -u ${{ secrets.DOCKER_ID }} -p ${{ secrets.DOCKER_PW }} https://harbor.icurfer.com
|
||||||
|
|
||||||
# - name: build
|
- name: build
|
||||||
# run: docker build -t harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }} .
|
run: docker build -t harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }} .
|
||||||
|
|
||||||
# - name: Push to Docker
|
- name: Push to Docker
|
||||||
# run: docker push harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
run: docker push harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
||||||
### off-test ###
|
### off-test ###
|
||||||
## pre cd
|
## pre cd
|
||||||
- name: Setup Kustomize
|
- name: Setup Kustomize
|
||||||
@ -58,30 +58,30 @@ jobs:
|
|||||||
token: ${{ secrets.ACTION_TOKEN }}
|
token: ${{ secrets.ACTION_TOKEN }}
|
||||||
path: cd-msa-django-ansible
|
path: cd-msa-django-ansible
|
||||||
|
|
||||||
# - name: Update Kubernetes resources
|
|
||||||
# run: |
|
|
||||||
# cd cd-msa-django-ansible/overlays/dev/
|
|
||||||
# kustomize edit set image harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
|
||||||
# cat kustomization.yaml
|
|
||||||
- name: Update Kubernetes resources
|
- name: Update Kubernetes resources
|
||||||
run: |
|
run: |
|
||||||
cd cd-msa-django-ansible/overlays/dev/
|
cd cd-msa-django-ansible/overlays/dev/
|
||||||
|
|
||||||
echo "✅ Updating image tag..."
|
|
||||||
kustomize edit set image harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
kustomize edit set image harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
||||||
|
cat kustomization.yaml
|
||||||
|
# - name: Update Kubernetes resources
|
||||||
|
# run: |
|
||||||
|
# cd cd-msa-django-ansible/overlays/dev/
|
||||||
|
|
||||||
echo "✅ Installing yq..."
|
# echo "✅ Updating image tag..."
|
||||||
wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64
|
# kustomize edit set image harbor.icurfer.com/msa-demo/msa-django-ansible:${{ steps.img-ver.outputs.content }}
|
||||||
chmod +x /usr/local/bin/yq
|
|
||||||
|
|
||||||
echo "✅ Updating container name in patch-deployment.yaml..."
|
# echo "✅ Installing yq..."
|
||||||
yq e -i '.spec.template.spec.containers[0].name = "msa-django-ansible-${{ steps.img-ver.outputs.content }}"' patch-deployment.yaml
|
# wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64
|
||||||
|
# chmod +x /usr/local/bin/yq
|
||||||
|
|
||||||
echo "✅ Final patch-deployment.yaml content:"
|
# echo "✅ Updating container name in patch-deployment.yaml..."
|
||||||
cat patch-deployment.yaml
|
# yq e -i '.spec.template.spec.containers[0].name = "msa-django-ansible-${{ steps.img-ver.outputs.content }}"' patch-deployment.yaml
|
||||||
|
|
||||||
echo "✅ Final kustomization.yaml content:"
|
# echo "✅ Final patch-deployment.yaml content:"
|
||||||
cat kustomization.yaml
|
# cat patch-deployment.yaml
|
||||||
|
|
||||||
|
# echo "✅ Final kustomization.yaml content:"
|
||||||
|
# cat kustomization.yaml
|
||||||
|
|
||||||
|
|
||||||
## cd commit
|
## cd commit
|
||||||
|
|||||||
Reference in New Issue
Block a user