Skip to content
Open

Test #17

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ServiceNow GitHub Actions Demo

on:
pull_request:
push:
branches:
- master

jobs:
build:
# Purpose of this job is to Apply Remote Changes for the branch triggering
# the pipeline build to the Dev instance, then publish the application to
# app repo using the template versioning format.
name: Publish from Dev
runs-on: ubuntu-latest
# Below line can be used to set conditionals for modifying your pipeline as needed.
# if: ${{ github.event_name == 'pull_request'}}

steps:

- name: ServiceNow CI/CD Apply Changes
uses: ServiceNow/[email protected]
env:
nowUsername: ${{ secrets.NOW_USERNAME }}
nowPassword: ${{ secrets.NOW_PASSWORD }}
nowSourceInstance: ${{ secrets.NOW_SOURCE_INSTANCE }}
appSysID: ${{ secrets.APP_SYS_ID }}
- name: ServiceNow CI/CD Publish App
id: publish_app
uses: ServiceNow/[email protected]
with:
versionTemplate: 1.1
versionFormat: template
# Optional, add +X to version number. Default: 1
# incrementBy: X
env:
nowUsername: ${{ secrets.NOW_USERNAME }}
nowPassword: ${{ secrets.NOW_PASSWORD }}
nowSourceInstance: ${{ secrets.NOW_SOURCE_INSTANCE }}
appSysID: ${{ secrets.APP_SYS_ID }}

# 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 }}

#test again