美文网首页
在cricle CI中上传云编译的文件

在cricle CI中上传云编译的文件

作者: 小沙盒工作室 | 来源:发表于2022-03-31 19:21 被阅读0次

    直接上完整yml配置代码:

    # Java Gradle CircleCI 2.0 configuration file
    # See: https://circleci.com/docs/2.0/language-java/
    version: 2
    
    # Define a job to be invoked later in a workflow.
    # See: https://circleci.com/docs/2.0/configuration-reference/#jobs
    jobs:
      build:
        # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
        # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
        docker:
          # specify the version you desire here
          - image: circleci/openjdk:8-jdk
            auth:
              username: mydockerhub-user
              password: $DOCKERHUB_PASSWORD  # context / project UI env-var re
          # Specify service dependencies here if necessary
          # CircleCI maintains a library of pre-built images
          # documented at https://circleci.com/docs/2.0/circleci-images/
          # - image: circleci/postgres:9.4
    
        working_directory: ~/repo#~/repo
        #working_directory: /tmp
    
        environment:
          # Customize the JVM maximum heap limit
          JVM_OPTS: -Xmx3200m
          TERM: dumb
        # Add steps to the job
        # See: https://circleci.com/docs/2.0/configuration-reference/#steps
        steps:
          - checkout
    
          - run:
              name: complie
              command: |
                javac Test.java
                ls 
                pwd
          - store_artifacts:
              path: /home/circleci/repo#~/repo/Test.class
    

    其中 - store_artifacts是关键,是用上传的代码

    path: /home/circleci/repo#~/repo/你编译后的文件

    成功上传的话时这样的: image.png
    image.png

    相关文章

      网友评论

          本文标题:在cricle CI中上传云编译的文件

          本文链接:https://www.haomeiwen.com/subject/yxinjrtx.html