1
1
name : 1 DEV - Deploy Dynamics API
2
2
3
3
env :
4
- # 🖊️ EDIT your repository secrets to log into your OpenShift cluster and set up the context.
4
+ # EDIT your repository secrets to log into your OpenShift cluster and set up the context.
5
5
# See https://github.com/redhat-actions/oc-login#readme for how to retrieve these values.
6
6
# To get a permanent token, refer to https://github.com/redhat-actions/oc-login/wiki/Using-a-Service-Account-for-GitHub-Actions
7
7
OPENSHIFT_SERVER : ${{ secrets.OPENSHIFT_SERVER }}
8
8
OPENSHIFT_TOKEN : ${{ secrets.OPENSHIFT_TOKEN }}
9
- # 🖊️ EDIT to set the kube context's namespace after login. Leave blank to use your user's default namespace.
9
+ # EDIT to set the kube context's namespace after login. Leave blank to use your user's default namespace.
10
10
OPENSHIFT_NAMESPACE : ${{ secrets.OFM_NAMESPACE_NO_ENV }}-dev
11
11
12
12
# SPLUNK_TOKEN: ${{ secrets.SPLUNK_TOKEN }}
13
13
14
- # 🖊️ EDIT to change the image registry settings.
14
+ # EDIT to change the image registry settings.
15
15
# Registries such as GHCR, Quay.io, and Docker Hub are supported.
16
16
IMAGE_REGISTRY : ghcr.io/${{ github.repository_owner }}
17
17
IMAGE_REGISTRY_USER : ${{ github.actor }}
@@ -80,19 +80,19 @@ jobs:
80
80
core.error(`Secret "${name}" is not set`);
81
81
return true;
82
82
}
83
- core.info(`✔️ Secret "${name}" is set`);
83
+ core.info(`Secret "${name}" is set`);
84
84
return false;
85
85
});
86
86
87
87
if (missingSecrets.length > 0) {
88
- core.setFailed(`❌ At least one required secret is not set in the repository. \n` +
88
+ core.setFailed(`At least one required secret is not set in the repository. \n` +
89
89
"You can add it using:\n" +
90
90
"GitHub UI: https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository \n" +
91
91
"GitHub CLI: https://cli.github.com/manual/gh_secret_set \n" +
92
92
"Also, refer to https://github.com/redhat-actions/oc-login#getting-started-with-the-action-or-see-example");
93
93
}
94
94
else {
95
- core.info(`✅ All the required secrets are set`);
95
+ core.info(`All the required secrets are set`);
96
96
}
97
97
98
98
- name : Check out repository
@@ -146,7 +146,7 @@ jobs:
146
146
oc login --token=${{ env.OPENSHIFT_TOKEN }} --server=${{ env.OPENSHIFT_SERVER }}
147
147
oc project ${{ env.OPENSHIFT_NAMESPACE }}
148
148
# Cancel any rollouts in progress
149
- oc rollout cancel dc /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
149
+ oc rollout cancel deployment /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
150
150
|| true && echo "No rollout in progress"
151
151
152
152
# Create the image stream if it doesn't exist
@@ -156,7 +156,7 @@ jobs:
156
156
157
157
# Process and apply deployment template
158
158
oc process \
159
- -f tools/openshift/d365api.dc .yaml \
159
+ -f tools/openshift/d365api.deployment .yaml \
160
160
-p APP_NAME=${{ env.APP_NAME }} \
161
161
-p REPO_NAME=${{ env.REPO_NAME }} \
162
162
-p BRANCH=${{ env.BRANCH }} \
@@ -205,11 +205,11 @@ jobs:
205
205
${{ secrets.D365_INVOICE_LINES_DISTRIBUTION_ACK }}
206
206
207
207
# Start rollout (if necessary) and follow it
208
- oc rollout latest dc /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
208
+ oc rollout restart deployment /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }} 2> /dev/null \
209
209
|| true && echo "Rollout in progress"
210
210
211
211
# Get status, returns 0 if rollout is successful
212
- oc rollout status dc /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }}
212
+ oc rollout status deployment /${{ env.APP_NAME }}-${{ env.APP_NAME_BACKEND }}-${{ env.APP_ENVIRONMENT }}
213
213
214
214
- name : ZAP Scan
215
215
uses : zaproxy/action-full-scan@v0.8.0
0 commit comments