Skip to content
Snippets Groups Projects
Select Git revision
  • 879ec4dcb1ad22b7e491a1c9593286dbb65f8c45
  • main default protected
2 results

instructions.draft.md

Blame
  • instructions.draft.md 1.43 KiB

    WIP

    GitLab

    Voraussetzung

    Ref: GitLab CI mit git und VSCode

    • Git initialisiert
    • GitLab als remote eingerichtet

    Vorgehen

    1. CI/CD Settings
    2. .gitlab-ci.yml erstellen
      create-file:
        stage: build
        image: python
        tags:
          - gpu
        script:
          - |
            cat <<EOF > test.py
            with open('output.txt', 'w') as f:
              f.write('hello world!\\n')
            EOF
          - python test.py
        artifacts:
          paths:
            - output.txt
      
      test-file-output:
        stage: test
        script:
          - grep -q "hello world!" output.txt
        dependencies:
          - create-file
      
      deploy-output:
        stage: deploy
        script:
          - cp output.txt release.txt
        artifacts:
          paths:
            - release.txt
        dependencies:
          - create-file
    3. $ git add <files>
    4. $ git push
    5. Pipelines beobachten
      • pipeline_badge
    6. Artifacts abrufen

    JupyterHub

    SSH