---
sourceDocument: Xanadu IT Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/xanadu/it-service-management

 Release :

    - xanadu

ft:locale :

    - de-DE

ft:publication_title :

    - Xanadu IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# GitHub Pipeline-Aktionen

# GitHub Pipeline-Aktionen {#ariaid-title1}

* Freigeben Version: Xanadu
* 
* Aktualisiert 1. August 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 Minuten Lesedauer

Verwenden Sie diese Aktionen in Ihrer Pipeline GitHub, um mit dem Datenmodell DevOps Config \] zu interagieren.  
Wichtig:  
Ab dem Release Washington DC wird DevOps Config auf den Übergang in den Zustand „Veraltet" vorbereitet. Es wird ausgeblendet und in neuen Instanzen nicht mehr installiert, aber weiterhin unterstützt. Weitere Informationen finden Sie im Artikel [Deprecation Process \[KB0867184\]](https://support.servicenow.com/kb_view.do?sysparm_article=KB0867184) (Abkündigungsprozess) in der Now Support Knowledge Base.

GitHub geskriptete und deklarative Pipelines werden unterstützt.

Die Aktionen ServiceNow DevOps Config Validate (servicenow-devops-config-validate) und DevOps Config Export (servicenow-devops-config-export) GitHub werden bereitgestellt, um eine bestimmte Pipeline-Definition zu erstellen.

## DevOps-Konfiguration validieren (servicenow-devops-config-validate) {#devops-config-github-integration__section_rsc_wdj_psb}

Konfigurationsdaten in einer ServiceNow -Instanz hochladen und validieren

Eingabeargumente
:   {#devops-config-github-integration__table_k3q_bf4_tzb__entry__2}

    | Argument | Beschreibung |
    |-|-|
    | Instanz-URL | ServiceNow Instanz-URL. |
    | devops-integration-username | DevOps Config Anwendername für die Integration |
    | devops-integration-user-password | DevOps Config Passwort des Integrationsbenutzers. |
    | Anwendungsname | DevOps Config Anwendungsname. |
    | Ziel | Datenmodellziel, in das Konfigurationsdateien hochgeladen werden. Beispiele für Datenmodellziele sind: * `Komponente` * `Sammlung` * `bereitstellbar` {#devops-config-github-integration__ul_yrv_h34_tzb} |
    | Name des bereitstellbaren Elements | Name des bereitstellbaren Elements im Datenmodell DevOps Config. |
    | Sammlungsname | (Optional) Sammlungsname im Datenmodell. Erforderlich, wenn das Ziel eine Sammlung ist. |
    | Namenspfad | (Optional) Namenspfad des Knotens im Datenmodell, in den die Konfigurationsdateien hochgeladen werden. |
    | Konfigurationsdateipfad | Dateipfad beim Hochladen einer einzelnen Datei oder Dateipfadmuster basierend auf dem Ant-Stilmuster beim Hochladen mehrerer Dateien in das Datenmodell. Informationen zu Ant-Stilmustern finden Sie unter [Verzeichnisbasierte Aufgaben](https://ant.apache.org/manual/dirtasks.html) in der Dokumentation Apache Ant.1.10.14 Manuelle Dokumentation. |
    | Datenformat | Datenformat der Konfigurationsdateien. Beispiele für Datenformate sind: * `CSV` * `INI` * `JSON` * `Eigenschaften` * `RAW` * `XML` * `YAML` {#devops-config-github-integration__ul_vpc_rg4_tzb} |
    | Datenformat-Attribut | (Optional) Attribute für erweiterte Datenformate zum Analysieren von Konfigurationsdaten. |
    | automatisch festlegen | Boolesche Eingabe (wahr oder falsch) zum Committen von Konfigurationsdaten nach dem erfolgreichen Upload. Standardwert: `true` |
    | automatische Validierung | Boolesche Eingabe (wahr oder falsch) zur Validierung von Konfigurationsdaten nach einem erfolgreichen Commit. Standardwert: `true` |
    | automatisch veröffentlichen | Boolesche Eingabe (wahr oder falsch) zur Veröffentlichung von Konfigurationsdaten nach erfolgreicher Validierung. Standardwert: `true` |
    | Changeset | (Optional) Öffnen Sie das Changeset, das der Upload-Aktion zugeordnet ist. Wenn nicht angegeben, wird ein neues Changeset erstellt. |
    | Snapshot-Validierung -- Zeitüberschreitung | (Optional) Maximale Zeit in Minuten für den Abschluss der Validierung, bevor die Aktion fehlschlägt. Standardwert: `60` |
    | „terminate-on-policy-validation-failure" | (Optional) Boolesche Eingabe (wahr oder falsch) zum Beenden des GitHub -Workflows nach Fehlern bei der Richtlinienvalidierung. Standardwert: `false` |
    [ ]

    {#devops-config-github-integration__table_k3q_bf4_tzb}

Ausgaben
:

    Nummer des Changesets

    :   Changeset-Nummer, die der Upload-Aktion zugeordnet ist.

    Snapshot-Name

    :   Name des neuesten Snapshots des bereitstellbaren Elements.

    validation-status

    :   Validierungsstatus des Snapshots. Beispiel: „ `passed`", `„passed_with_exception"`, „ `failed`", „ `execution_error`", `„not_validated".`

    validation-results

    :   Die Validierungsergebnisse im JSON-Format für den Snapshot.

Beispiel: Konfigurationsdateien werden in ein bereitstellbares Element hochgeladen{#devops-config-github-integration__example-snapshot}
:

        upload_and_validate_job:
            name: Upload and validate
            needs: <upstream job>
            runs-on: ubuntu-latest
            steps:     
              - name: ServiceNow Devops Config Validate
                uses: ServiceNow/servicenow-devops-config-validate@v1.0.0-beta
                with:
                  instance-url: ${{ secrets.SN_INSTANCE_URL }}
                  devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                  devops-integration-user-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                  application-name: PaymentDemo
                  target: deployable
                  deployable-name: Production
                  name-path: web-api-v1.0
                  auto-commit: true
                  auto-validate: true
                  auto-publish: true
                  config-file-path: data/k8s/helm/*.yml
                  data-format: yaml
                  snapshot-validation-timeout: 60
                  terminate-on-policy-validation-failures: true

Beispiel: Konfigurationsdateien werden in eine Sammlung hochgeladen
:

        upload_and_validate_job:
            name: Upload and validate
            needs: <upstream job>
            runs-on: ubuntu-latest
            steps:     
              - name: ServiceNow Devops Config Validate
                uses: ServiceNow/servicenow-devops-config-validate@v1.0.0-beta
                with:
                  instance-url: ${{ secrets.SN_INSTANCE_URL }}
                  devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                  devops-integration-user-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                  application-name: PaymentDemo
                  target: collection
                  deployable-name: Production
                  collection-name: release-1.0
                  name-path: web-api-v1.0
                  auto-commit: true
                  auto-validate: true
                  auto-publish: true
                  config-file-path: data/k8s/helm/*.yml
                  data-format: yaml
                  snapshot-validation-timeout: 60
                  terminate-on-policy-validation-failures: true

Beispiel: Konfigurationsdateien werden in eine Komponente hochgeladen
:

        upload_and_validate_job:
            name: Upload and validate
            needs: <upstream job>
            runs-on: ubuntu-latest
            steps:     
              - name: ServiceNow Devops Config Validate
                uses: ServiceNow/servicenow-devops-config-validate@v1.0.0-beta
                with:
                  instance-url: ${{ secrets.SN_INSTANCE_URL }}
                  devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                  devops-integration-user-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                  application-name: PaymentDemo
                  target: component
                  deployable-name: Production
                  name-path: web-api-v1.0
                  auto-commit: true
                  auto-validate: true
                  auto-publish: true
                  config-file-path: data/k8s/helm/*.yml
                  data-format: yaml
                  snapshot-validation-timeout: 60
                  terminate-on-policy-validation-failures: true

Beispiel: Mehrere Konfigurationsdateien werden in einem einzigen Commit hochgeladen
:

        upload_and_validate_job:
            name: Upload and validate
            
            needs: <upstream job>
            runs-on: ubuntu-latest
            # Upload an XML file to a component
            steps:     
              - name: ServiceNow Devops Config Validate
                id: upload_and_validate_xml
                uses: ServiceNow/servicenow-devops-config-validate@v1.0.0-beta
                with:
                  instance-url: ${{ secrets.SN_INSTANCE_URL }}
                  devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                  devops-integration-user-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                  application-name: PaymentDemo
                  target: component
                  deployable-name: Production
                  name-path: web-api-v1.0
                  auto-commit: false
                  auto-validate: true
                  auto-publish: true
                  config-file-path: data/infra/v1/*.xml
                  data-format: xml
                  snapshot-validation-timeout: 60
                  terminate-on-policy-validation-failures: true

            # Upload a JSON file to the vars folder of a deployable
            steps:     
              - name: ServiceNow Devops Config Validate
                id: upload_and_validate_json
                uses: ServiceNow/servicenow-devops-config-validate@v1.0.0-beta
                with:
                  instance-url: ${{ secrets.SN_INSTANCE_URL }}
                  devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                  devops-integration-user-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                  application-name: PaymentDemo
                  target: component
                  deployable-name: Production
                  name-path: web-api-v1.0
                  auto-commit: true
                  auto-validate: true
                  auto-publish: true
                  config-file-path: data/infra/prod/*.json
                  data-format: json
                  snapshot-validation-timeout: 60
                  terminate-on-policy-validation-failures: true
                  changeset : ${{ steps.upload_and_validate_xml.outputs.changeset-number }}

## DevOps-Konfigurationsexport (servicenow-devops-config-export) {#devops-config-github-integration__section_ynh_3nq_11c}

Exportieren Sie Konfigurationsdaten mit ServiceNow DevOps Config.

Eingabeargumente
:   {#devops-config-github-integration__table_znh_3nq_11c__entry__2}

    | Argument | Beschreibung |
    |-|-|
    | Instanz-URL | ServiceNow Instanz-URL. |
    | devops-integration-username | DevOps Config Anwendername für die Integration |
    | devops-integration-user-password | DevOps Config Passwort des Integrationsbenutzers. |
    | Anwendungsname | DevOps Config Anwendungsname. |
    | Name des bereitstellbaren Elements | Name des bereitstellbaren Elements im Datenmodell DevOps Config. |
    | Exporter-Name | Name des Exporters, der Konfigurationsdaten aus dem Datenmodell DevOps Config exportiert. |
    | Snapshot-Name | (Optional) Snapshot, aus dem Daten exportiert werden sollen. Wenn kein Snapshot angegeben ist, wird der neueste Snapshot für das bereitstellbare Element verwendet. |
    | Datenexporteur-Format | (Optional) Format zum Exportieren der Snapshot-Daten. Beispiele für Datenformate sind: * `CSV` * `INI` * `JSON` * `Eigenschaften` * `RAW` * `XML` * `YAML` {#devops-config-github-integration__ul_srz_khv_11c} |
    | exporter-arguments | (Optional) Argumente, die zusammen mit dem Exporter verwendet werden sollen. Der Wert muss ein JSON-Objekt sein, das als Zeichenfolge dargestellt wird. |
    [ ]

    {#devops-config-github-integration__table_znh_3nq_11c}

Ausgabe
:

    exporter-content

    :   Konfigurationsdaten, die der Exporter exportiert.

Beispiel: Exportspezifischer Snapshot
:

        export:
            name: Export config
            needs: <upstream job>
            runs-on: ubuntu-latest
            steps:
            - name: ServiceNow DevOps Config Export
              uses: ServiceNow/servicenow-devops-config-export@v1.0.0-beta
              with:
                instance-url: ${{ secrets.SN_INSTANCE_URL }}
                devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                devops-integration-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                application-name: PaymentDemo
                deployable-name: Production
                exporter-name: returnDataforNodeName-now
                snapshot-name: Production-v1.dpl
                exporter-arguments: '{ "nodeName": "node1" }'

Beispiel: Exportiert den neuesten bereitgestellten Snapshot mit zusätzlichen Parametern
:

        export:
            name: Export config
            needs: <upstream job>
            runs-on: ubuntu-latest
            steps:
            - name: ServiceNow DevOps Config Export
              uses: ServiceNow/servicenow-devops-config-export@v1.0.0-beta
              with:
                instance-url: ${{ secrets.SN_INSTANCE_URL }}
                devops-integration-username: ${{ secrets.SN_DEVOPS_CONFIG_USERNAME }}
                devops-integration-password: ${{ secrets.SN_DEVOPS_CONFIG_PASSWORD }}
                application-name: PaymentDemo
                deployable-name: Production
                exporter-name: returnDataforNodeName-now
                exporter-arguments: '{ "nodeName": "node1" }'
                exporter-data-format: XML


