@@ -19,89 +19,104 @@ jobs:
1919 runs-on : ubuntu-latest
2020 if : github.ref == 'refs/heads/develop'
2121 steps :
22- - uses : actions/checkout@v2
23- with :
24- ref : main
25- - name : Reset main branch
26- run : |
27- git fetch origin develop:develop
28- git reset --hard develop
29- - name : Dotenv Action
30- id : dotenv
31- uses : falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
32- - name : Create Pull Request
33- uses :
peter-evans/[email protected] 34- with :
35- branch : " promote-develop-to-main-${{ github.event.inputs.release_version }}"
36- base : " main"
37- title : " Promote Develop to main for Splunk Operator Release ${{ github.event.inputs.release_version }}"
38- reviewers : " ${{ steps.dotenv.outputs.REVIEWERS }}"
39- body : |
40- Automated Pull Request To Merge Develop To Main For Release Version ${{ github.event.inputs.release_version }}
22+ - uses : actions/checkout@v2
23+ with :
24+ ref : main
25+ - name : Reset main branch
26+ run : |
27+ git fetch origin develop:develop
28+ git reset --hard develop
29+ - name : Dotenv Action
30+ id : dotenv
31+ uses : falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
32+ - name : Create Pull Request
33+ uses :
peter-evans/[email protected] 34+ with :
35+ branch : " promote-develop-to-main-${{ github.event.inputs.release_version }}"
36+ base : " main"
37+ title : " Promote Develop to main for Splunk Operator Release ${{ github.event.inputs.release_version }}"
38+ reviewers : " ${{ steps.dotenv.outputs.REVIEWERS }}"
39+ body : |
40+ Automated Pull Request To Merge Develop To Main For Release Version ${{ github.event.inputs.release_version }}
4141
4242 rc-release :
4343 runs-on : ubuntu-latest
4444 needs : pull-request
4545 if : github.ref == 'refs/heads/develop'
4646 steps :
47- - name : Checkout code
48- uses : actions/checkout@v2
49- with :
50- ref : " promote-develop-to-main-${{ github.event.inputs.release_version }}"
47+ - name : Checkout code
48+ uses : actions/checkout@v2
49+ with :
50+ ref : " promote-develop-to-main-${{ github.event.inputs.release_version }}"
5151
52- - name : Deep Fetch
53- run : |
54- git fetch --prune --unshallow
52+ - name : Deep Fetch
53+ run : |
54+ git fetch --prune --unshallow
5555
56- - name : Dotenv Action
57- id : dotenv
58- uses : falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
59- - name : Set up Docker Buildx
60- 56+ - name : Dotenv Action
57+ id : dotenv
58+ uses : falti/dotenv-action@d4d12eaa0e1dd06d5bdc3d7af3bf4c8c93cb5359
59+ - name : Set up Docker Buildx
60+ 6161
62- - name : Configure Docker Credentials
63- uses : docker/login-action@v1
64- with :
65- username : ${{ secrets.DOCKERHUB_USERNAME }}
66- password : ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
62+ - name : Configure Docker Credentials
63+ uses : docker/login-action@v1
64+ with :
65+ username : ${{ secrets.DOCKERHUB_USERNAME }}
66+ password : ${{ secrets.DOCKERHUB_PUSH_TOKEN}}
6767
68- - name : Setup Go
69- uses : actions/setup-go@v2
70- with :
71- go-version : ${{ steps.dotenv.outputs.GO_VERSION }}
68+ - name : Setup Go
69+ uses : actions/setup-go@v2
70+ with :
71+ go-version : ${{ steps.dotenv.outputs.GO_VERSION }}
7272
73- - name : Install goveralls
74- run : |
75- go get github.com/mattn/goveralls@latest
73+ - name : Install goveralls
74+ run : |
75+ go get github.com/mattn/goveralls@latest
7676
77- - name : Install Operator SDK
78- run : |
79- export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
80- export OS=$(uname | awk '{print tolower($0)}')
81- export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}
82- sudo curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
83- sudo chmod +x operator-sdk_${OS}_${ARCH}
84- sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
77+ - name : Install Operator SDK
78+ run : |
79+ export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
80+ export OS=$(uname | awk '{print tolower($0)}')
81+ export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/${{ steps.dotenv.outputs.OPERATOR_SDK_VERSION }}
82+ sudo curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
83+ sudo chmod +x operator-sdk_${OS}_${ARCH}
84+ sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
8585
86- - name : Build Splunk Operator Image
87- run : |
88- make docker-build IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }}
86+ # Build and push UBI image
87+ - name : Build UBI Image
88+ run : |
89+ make docker-build IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} BASE_IMAGE=ubi8/ubi BASE_IMAGE_VERSION=latest
8990
90- - name : Generate Release Artifacts
91- run : |
92- make generate-artifacts IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} VERSION=${{ github.event.inputs.release_version }} SPLUNK_ENTERPRISE_IMAGE=splunk/splunk:${{ github.event.inputs.enterprise_version }}
91+ - name : Push UBI Image
92+ run : |
93+ make docker-push IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }}
9394
94- - name : Push release RC Versioned Image
95- run : |
96- make docker-push IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }}
95+ # Build and push Distroless image
96+ - name : Build Distroless Image
97+ run : |
98+ make docker-build IMG=splunk/splunk-operator:${{ github.event.inputs.release_version }}-distroless-RC${{ github.event.inputs.release_candiate_version }} BASE_IMAGE=gcr.io/distroless/static BASE_IMAGE_VERSION=latest
9799
98- - name : Tag default Release Candidate Image and Push
99- run : |
100- docker tag splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC
101- docker push splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC
100+ - name : Push Distroless Image
101+ run : |
102+ make docker-push IMG=splunk/splunk-operator:${{ github.event.inputs.release_version }}-distroless-RC${{ github.event.inputs.release_candiate_version }}
102103
103- - name : Upload Release Artifacts
104- 105- with :
106- name : " release-artifacts-${{ github.event.inputs.release_version }}-RC"
107- path : " release-**"
104+ - name : Tag and Push Default UBI RC Image
105+ run : |
106+ docker tag splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC
107+ docker push splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC
108+
109+ - name : Tag and Push Default Distroless RC Image
110+ run : |
111+ docker tag splunk/splunk-operator:${{ github.event.inputs.release_version }}-distroless-RC${{ github.event.inputs.release_candiate_version }} splunk/splunk-operator:${{ github.event.inputs.release_version }}-distroless-RC
112+ docker push splunk/splunk-operator:${{ github.event.inputs.release_version }}-distroless-RC
113+
114+ - name : Generate Release Artifacts
115+ run : |
116+ make generate-artifacts IMG=splunk/splunk-operator-rc:${{ github.event.inputs.release_version }}-RC${{ github.event.inputs.release_candiate_version }} VERSION=${{ github.event.inputs.release_version }} SPLUNK_ENTERPRISE_IMAGE=splunk/splunk:${{ github.event.inputs.enterprise_version }}
117+
118+ - name : Upload Release Artifacts
119+ 120+ with :
121+ name : " release-artifacts-${{ github.event.inputs.release_version }}-RC"
122+ path : " release-**"
0 commit comments