-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathworkflow_appcustomization.yml
More file actions
59 lines (54 loc) · 2.05 KB
/
workflow_appcustomization.yml
File metadata and controls
59 lines (54 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: ServiceNow GitHub Actions Demo
on:
pull_request:
push:
branches:
- master
jobs:
publish:
# Purpose of this job is to demonstrate publishing an Application Customization
name: Publish from Dev
runs-on: ubuntu-latest
steps:
- name: ServiceNow CI/CD Publish App
id: publish_app
uses: ServiceNow/sncicd-publish-app@2.0.1
with:
versionTemplate: 1.1
versionFormat: template
incrementBy: 1
isAppCustomization: true
env:
nowUsername: ${{ secrets.SN_USERNAME }}
nowPassword: ${{ secrets.SN_PASSWORD }}
nowSourceInstance: ${{ secrets.SN_DEV_INSTANCE }}
appSysID: ${{ secrets.SN_APP_SYSID }}
# This is required to pass the version number output from Publish App
# to the input for Install App in the next job! This is because the jobs
# run on different Linux instances, so without this Install App won't know
# what to install.
outputs:
publishversion: ${{ steps.publish_app.outputs.newVersion }}
install:
# Purpose of this job is to demonstrate installing an Application Customization
needs: publish
name: Deploy to Prod
runs-on: ubuntu-latest
steps:
- name: ServiceNow CI/CD Install App
id: install_app_prod
uses: ServiceNow/sncicd-install-app@1.0.0
with:
version: ${{ needs.publish.outputs.publishversion }}
# Only applicable if Application Customization is active.
# Version of the base application on which to apply the customizations
baseAppVersion: '1.2.3'
# Only applicable if Application Customization is active and the associated
# application is a higher version than the currently installed version
# Default: false
autoUpgradeBaseApp: true
env:
nowUsername: ${{ secrets.SN_USERNAME }}
nowPassword: ${{ secrets.SN_PASSWORD }}
nowInstallInstance: ${{ secrets.SN_PROD_INSTANCE }}
appSysID: ${{ secrets.SN_APP_SYSID }}