Simple #176
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Simple | |
on: | |
# push: | |
# branches: ['master'] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/[email protected] | |
# - name: Try to Fail | |
# run: exit 1 | |
- name: Setup JDK 11 for Sonar Cloud | |
uses: actions/[email protected] | |
with: | |
java-version: 11 | |
- name: Maven Build | |
run: mvn clean install -DskipTests=true | |
- name: Run JUnit Tests | |
run: mvn test -Dmaven.test.failure.ignore=true surefire-report:report | |
test: | |
name: Test | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/[email protected] | |
# - name: Try to Fail | |
# run: exit 1 | |
- name: Setup JDK 11 for Sonar Cloud | |
uses: actions/[email protected] | |
with: | |
java-version: 11 | |
- name: Run JUnit Tests | |
run: mvn test -Dmaven.test.failure.ignore=true surefire-report:report | |
deploy: | |
needs: test | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Custom Change | |
uses: ServiceNow/[email protected] | |
with: | |
devops-integration-user-name: ${{ secrets.SN_DEVOPS_USER }} | |
devops-integration-user-password: ${{ secrets.SN_DEVOPS_PASSWORD }} | |
instance-url: ${{ secrets.SN_INSTANCE_URL }} | |
tool-id: ${{ secrets.SN_ORCHESTRATION_TOOL_ID }} | |
context-github: ${{ toJSON(github) }} | |
job-name: 'Deploy' | |
change-request: '{"setCloseCode":"true","attributes":{"short_description":"Automated Software Deployment","description":"Automated Software Deployment.","assignment_group":"a715cd759f2002002920bde8132e7018"}}' | |
interval: '100' | |
timeout: '3600' | |
- name: Run deployment scripts | |
run: echo Completed Deployment. |