---
sourceDocument: Yokohama IT-Servicemanagement
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/yokohama/it-service-management

 Release :

    - yokohama

ft:locale :

    - de-DE

ft:publication_title :

    - Yokohama IT-Servicemanagement

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# GitHub Pipeline-Aktionen

# GitHub Pipeline-Aktionen {#ariaid-title1}

* Freigeben Version: Yokohama
* 
* Aktualisiert 30. Januar 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 Minuten Lesedauer

Verwenden Sie diese Aktionen in GitHubPipeline, die mit interagiert werden soll DevOps ConfigDatenmodell.  
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 ServiceNowDevOps-Konfigurationsvalidierung (servicenow-devops-config-validieren) und DevOps-Konfigurationsexport (servicenow-devops-config-Export) GitHubAktionen werden bereitgestellt, um eine bestimmte Pipeline-Definition zu erstellen.

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

Laden Sie Konfigurationsdaten in ein hoch, und validieren Sie sie ServiceNowInstanz.

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

    | Argument | Beschreibung |
    |-|-|
    | Instanz-url | ServiceNow Instanz-URL. |
    | devops-Integration-username | DevOps Config Integrationsanwendername. |
    | devops-Integration-user-password | DevOps Config Passwort des Integrationsanwenders. |
    | Anwendungsname | DevOps Config Anwendungsname. |
    | Ziel | Datenmodellziel, in das Konfigurationsdateien hochgeladen werden. Beispiel für Datenmodellziele: * `Komponente` * `Sammlung` * `bereitstellbar` {#devops-config-github-integration__ul_yrv_h34_tzb} |
    | Bereitstellbarer Name | Name des bereitstellbaren Elements in DevOps ConfigDatenmodell. |
    | Sammlungsname | (Optional) Sammlungsname im Datenmodell. Erforderlich, wenn das Ziel „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-Stil-Muster beim Hochladen mehrerer Dateien in das Datenmodell. Siehe [Verzeichnisbasierte Aufgaben](https://ant.apache.org/manual/dirtasks.html)Für Informationen zu Ant-Stilmustern in ApacheANT.1.10.14 Manuelle Dokumentation. |
    | Datenformat | Datenformat der Konfigurationsdateien. Beispieldatenformate sind: * `CSV` * `INI` * `JSON` * `Eigenschaften` * `RAW` * `XML` * `YAML` {#devops-config-github-integration__ul_vpc_rg4_tzb} |
    | Datenformat-Attribut | (Optional) erweiterte Datenformatattribute zum Analysieren von Konfigurationsdaten. |
    | automatische Commit | Boolesche Eingabe (wahr oder falsch) zum Commit von Konfigurationsdaten nach erfolgreichem Upload. Standardwert: `Wahr ` |
    | automatisch validieren | Boolesche Eingabe (wahr oder falsch) zur Validierung der Konfigurationsdaten nach erfolgreichem Commit. Standardwert: `Wahr ` |
    | automatische Veröffentlichung | Boolesche Eingabe (wahr oder falsch) zum Veröffentlichen von Konfigurationsdaten nach erfolgreicher Validierung. Standardwert: `Wahr ` |
    | änderungssatz | (Optional) Öffnen Sie das Changeset, das der Upload-Aktion zugeordnet ist. Wenn nicht angegeben, wird ein neues Changeset erstellt. |
    | Snapshot-Validation-timeout | (Optional) maximale Zeit in Minuten, bis die Validierung abgeschlossen ist, bevor die Aktion fehlschlägt. Standardwert: `60 ` |
    | Beenden-bei-Richtlinie-Validierungsfehler | (Optional) boolesche Eingabe (wahr oder falsch) zum Beenden von GitHubWorkflow nach Fehlern bei der Richtlinienvalidierung. Standardwert: `Falsch ` |
    [ ]

    {#devops-config-github-integration__table_k3q_bf4_tzb}

Ausgaben
:

    änderungssatznummer

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

    Snapshot-Name

    :   Name des neuesten Snapshots des bereitstellbaren Elements.

    Validierungsstatus

    :   Validierungsstatus des Snapshots. Beispiel: `Bestanden `, `Pass_with_Exception `, `Fehlgeschlagen `, `Execution_error `, `Not_validated `

    Validierungsergebnisse

    :   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 in einem einzigen Commit werden 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 Integrationsanwendername. |
    | devops-Integration-user-password | DevOps Config Passwort des Integrationsanwenders. |
    | Anwendungsname | DevOps Config Anwendungsname. |
    | Bereitstellbarer Name | Name des bereitstellbaren Elements in DevOps ConfigDatenmodell. |
    | exporteur-Name | Exporteur-Name, der Konfigurationsdaten aus exportiert DevOps ConfigDatenmodell. |
    | 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. |
    | exporteur-Datenformat | (Optional) Format zum Exportieren der Snapshot-Daten. Beispieldatenformate sind: * `CSV` * `INI` * `JSON` * `Eigenschaften` * `RAW` * `XML` * `YAML` {#devops-config-github-integration__ul_srz_khv_11c} |
    | exporteur-Argumente | (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
:

    exporteur-Inhalt

    :   Konfigurationsdaten, die der Exporter exportiert.

Beispiel -- bestimmten Snapshot exportieren
:

        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 -- Exportieren Sie den zuletzt 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


