Update pipeline to include integrationtest.
This commit is contained in:
parent
f2faa76459
commit
60d235765d
1 changed files with 103 additions and 11 deletions
114
ci/pipeline.yml
114
ci/pipeline.yml
|
@ -1,4 +1,21 @@
|
||||||
---
|
---
|
||||||
|
resource_types:
|
||||||
|
- name: ssh-edge
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: redxef/concourse-ssh-resource
|
||||||
|
tag: edge
|
||||||
|
- name: ssh
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: redxef/concourse-ssh-resource
|
||||||
|
tag: latest
|
||||||
|
- name: oci-image
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: redxef/concourse-oci-resource
|
||||||
|
tag: latest
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: source
|
- name: source
|
||||||
type: git
|
type: git
|
||||||
|
@ -10,9 +27,25 @@ resources:
|
||||||
type: registry-image
|
type: registry-image
|
||||||
source:
|
source:
|
||||||
repository: alpine
|
repository: alpine
|
||||||
|
- name: image
|
||||||
|
type: oci-image
|
||||||
|
source:
|
||||||
|
repository: redxef/concourse-ssh-resource
|
||||||
|
tag: edge
|
||||||
|
username: ((docker.username))
|
||||||
|
password: ((docker.password))
|
||||||
|
- name: test-server
|
||||||
|
type: ssh-edge
|
||||||
|
source:
|
||||||
|
hostname: ((test-server.hostname))
|
||||||
|
user: ((test-server.user))
|
||||||
|
identity: ((test-server.identity))
|
||||||
|
hostkey: ((test-server.hostkey))
|
||||||
|
files:
|
||||||
|
- file/hello.txt
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- name: build-push
|
- name: build-push-edge
|
||||||
plan:
|
plan:
|
||||||
- get: source
|
- get: source
|
||||||
trigger: true
|
trigger: true
|
||||||
|
@ -51,17 +84,76 @@ jobs:
|
||||||
inputs:
|
inputs:
|
||||||
- name: source
|
- name: source
|
||||||
path: .
|
path: .
|
||||||
- name: docker-tags
|
outputs:
|
||||||
|
- name: build-output
|
||||||
params:
|
params:
|
||||||
username: ((docker.username))
|
dest: build-output/image.tar
|
||||||
password: ((docker.password))
|
platform: aarch64,arm,i386,ppc64le,s390x,x86_64
|
||||||
repository: docker.io/redxef/concourse-ssh-resource
|
|
||||||
tag: edge
|
|
||||||
additional_tags: docker-tags/tags.txt
|
|
||||||
push: true
|
|
||||||
platform: amd64,i386,aarch64,arm,ppc64le,s390x
|
|
||||||
context: .
|
|
||||||
manual: false
|
|
||||||
run:
|
run:
|
||||||
path: build
|
path: build
|
||||||
|
- put: image
|
||||||
|
inputs:
|
||||||
|
- build-output
|
||||||
|
- docker-tags
|
||||||
|
params:
|
||||||
|
image: build-output/image.tar
|
||||||
|
additional_tags: docker-tags/tags.txt
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
plan:
|
||||||
|
- get: image
|
||||||
|
trigger: true
|
||||||
|
passed:
|
||||||
|
- build-push-edge
|
||||||
|
- task: create-put-file
|
||||||
|
config:
|
||||||
|
platform: linux
|
||||||
|
image_resource:
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: alpine
|
||||||
|
outputs:
|
||||||
|
- name: file
|
||||||
|
run:
|
||||||
|
path: sh
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
echo Hello > file/hello.txt
|
||||||
|
- put: test-server
|
||||||
|
inputs:
|
||||||
|
- file
|
||||||
|
params:
|
||||||
|
command:
|
||||||
|
- ls
|
||||||
|
- -la
|
||||||
|
|
||||||
|
- name: tag-latest
|
||||||
|
plan:
|
||||||
|
- get: image
|
||||||
|
trigger: true
|
||||||
|
passed:
|
||||||
|
- test
|
||||||
|
- task: write-latest-file
|
||||||
|
config:
|
||||||
|
platform: linux
|
||||||
|
image_resource:
|
||||||
|
type: registry-image
|
||||||
|
source:
|
||||||
|
repository: alpine
|
||||||
|
outputs:
|
||||||
|
- name: latest-tag
|
||||||
|
run:
|
||||||
|
path: sh
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
echo latest > latest-tag/tags.txt
|
||||||
|
- put: image
|
||||||
|
inputs:
|
||||||
|
- image
|
||||||
|
- latest-tag
|
||||||
|
params:
|
||||||
|
image: image/image.tar
|
||||||
|
additional_tags: latest-tag/tags.txt
|
||||||
|
|
Loading…
Reference in a new issue