primo
This commit is contained in:
36
pipeline/DEV_build_deploy.yaml
Normal file
36
pipeline/DEV_build_deploy.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: POC-Master0
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Harbor
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY }}
|
||||
username: ${{ secrets.HARBOR_USERNAME }}
|
||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||
|
||||
- name: Build container
|
||||
run: /root/work/pipeline/build_container.sh ${{ github.event.repository.name }} ${{ vars.REGISTRY }}
|
||||
|
||||
- name: Create kubeconfig
|
||||
run: |
|
||||
echo "${{ secrets.KUBECONFIG_DEV }}" > ./kubeconfig
|
||||
chmod 600 ./kubeconfig
|
||||
|
||||
- name: variables sustitution
|
||||
run: /root/work/pipeline/customize.sh dev
|
||||
|
||||
- name: k8s deploy
|
||||
run: /root/work/pipeline/deploy.sh
|
||||
|
||||
Reference in New Issue
Block a user