114
									
								
								ci/pipeline.yml
									
									
									
									
									
								
							
							
						
						
									
										114
									
								
								ci/pipeline.yml
									
									
									
									
									
								
							@@ -1,114 +0,0 @@
 | 
			
		||||
resource_types:
 | 
			
		||||
- name: nomad
 | 
			
		||||
  type: registry-image
 | 
			
		||||
  source:
 | 
			
		||||
    repository: natto17/concourse-nomad-resource
 | 
			
		||||
    tag: latest
 | 
			
		||||
 | 
			
		||||
resources:
 | 
			
		||||
- name: image
 | 
			
		||||
  type: registry-image
 | 
			
		||||
  icon: docker
 | 
			
		||||
  source:
 | 
			
		||||
    repository: ((docker.user))/singh4
 | 
			
		||||
    tag: latest
 | 
			
		||||
    username: ((docker.user))
 | 
			
		||||
    password: ((docker.pass))
 | 
			
		||||
 | 
			
		||||
- name: nomad-job
 | 
			
		||||
  type: nomad
 | 
			
		||||
  source:
 | 
			
		||||
    url: https://nomad.weirdnatto.in
 | 
			
		||||
    name: singh4
 | 
			
		||||
    token: ((nomad.token))
 | 
			
		||||
    consul_token: ((nomad.consul))
 | 
			
		||||
    vault_token: ((nomad.vault))
 | 
			
		||||
 | 
			
		||||
- name: repo
 | 
			
		||||
  type: git
 | 
			
		||||
  icon: discord
 | 
			
		||||
  source:
 | 
			
		||||
    uri: https://git.weirdnatto.in/natto1784/singh4.git
 | 
			
		||||
    branch: master
 | 
			
		||||
 | 
			
		||||
- name: rust-image
 | 
			
		||||
  type: registry-image
 | 
			
		||||
  icon: docker
 | 
			
		||||
  source:
 | 
			
		||||
    repository: arm64v8/rust
 | 
			
		||||
    tag: latest
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
- name: configure-self
 | 
			
		||||
  public: true
 | 
			
		||||
  plan:
 | 
			
		||||
  - get: repo
 | 
			
		||||
    trigger: true
 | 
			
		||||
  - set_pipeline: self
 | 
			
		||||
    file: repo/ci/pipeline.yml
 | 
			
		||||
- name: singh4
 | 
			
		||||
  plan:
 | 
			
		||||
  - get: repo
 | 
			
		||||
    trigger: true
 | 
			
		||||
    passed: [configure-self]
 | 
			
		||||
  - get: rust-image
 | 
			
		||||
    trigger: false
 | 
			
		||||
  - task: build
 | 
			
		||||
    image: rust-image
 | 
			
		||||
    config:
 | 
			
		||||
      params:
 | 
			
		||||
        CARGO_HOME: cargo-home
 | 
			
		||||
        CARGO_TARGET_DIR: builddir
 | 
			
		||||
      inputs:
 | 
			
		||||
      - name: repo
 | 
			
		||||
      caches:
 | 
			
		||||
      - path: builddir
 | 
			
		||||
      - path: cargo-home
 | 
			
		||||
      platform: linux
 | 
			
		||||
      run:
 | 
			
		||||
        path: sh
 | 
			
		||||
        args:
 | 
			
		||||
        - -c
 | 
			
		||||
        - |
 | 
			
		||||
          apt-get update
 | 
			
		||||
          apt-get -y install libssl-dev pkg-config
 | 
			
		||||
          cargo build --release --manifest-path repo/Cargo.toml
 | 
			
		||||
          mkdir release
 | 
			
		||||
          mv $CARGO_TARGET_DIR/release/singh4 bin
 | 
			
		||||
      outputs:
 | 
			
		||||
      - name: bin
 | 
			
		||||
  - task: push-image
 | 
			
		||||
    privileged: true
 | 
			
		||||
    config:
 | 
			
		||||
      platform: linux
 | 
			
		||||
      image_resource:
 | 
			
		||||
        type: registry-image
 | 
			
		||||
        source:
 | 
			
		||||
          repository: rdclda/concourse-oci-build-task
 | 
			
		||||
      caches:
 | 
			
		||||
      - path: cache
 | 
			
		||||
      inputs:
 | 
			
		||||
      - name: bin
 | 
			
		||||
      outputs:
 | 
			
		||||
      - name: image
 | 
			
		||||
      run:
 | 
			
		||||
        path: sh
 | 
			
		||||
        args:
 | 
			
		||||
        - -c
 | 
			
		||||
        - |
 | 
			
		||||
          cat <<EOF > Dockerfile
 | 
			
		||||
          FROM arm64v8/ubuntu
 | 
			
		||||
          COPY bin/singh4 /usr/bin/singh4
 | 
			
		||||
          RUN apt-get update
 | 
			
		||||
          RUN apt-get -y install ffmpeg libssl-dev
 | 
			
		||||
          CMD ["singh4"]
 | 
			
		||||
          EOF
 | 
			
		||||
          build
 | 
			
		||||
  - put: image
 | 
			
		||||
    params:
 | 
			
		||||
      image: image/image.tar
 | 
			
		||||
  - put: nomad-job
 | 
			
		||||
    params:
 | 
			
		||||
      job_path: repo/singh4.nomad
 | 
			
		||||
      templating: false
 | 
			
		||||
      restart: true
 | 
			
		||||
		Reference in New Issue
	
	Block a user