Update pipeline to include integrationtest.

This commit is contained in:
redxef 2022-11-21 21:40:49 +01:00
parent f2faa76459
commit 60d235765d
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -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:
- name: source
type: git
@ -10,9 +27,25 @@ resources:
type: registry-image
source:
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:
- name: build-push
- name: build-push-edge
plan:
- get: source
trigger: true
@ -51,17 +84,76 @@ jobs:
inputs:
- name: source
path: .
- name: docker-tags
outputs:
- name: build-output
params:
username: ((docker.username))
password: ((docker.password))
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
dest: build-output/image.tar
platform: aarch64,arm,i386,ppc64le,s390x,x86_64
run:
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