Skip to content

Commit

Permalink
Re-generate pipeline from latest template
Browse files Browse the repository at this point in the history
  • Loading branch information
bgandon committed Dec 17, 2021
1 parent 5867533 commit f111c32
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 36 deletions.
47 changes: 23 additions & 24 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ jobs:
privileged: true
config:
platform: linux
inputs: [ { name: git, path: "." } ]
outputs: [ name: image ]
caches: [ path: cache ]
run: { path: build }
inputs: [ { name: git, path: "." } ]
outputs: [ name: image ]
caches: [ path: cache ]
run: { path: build }

- put: edge
inputs: [ image ]
Expand Down Expand Up @@ -123,10 +123,10 @@ jobs:
privileged: true
config:
platform: linux
inputs: [ { name: git-pull-requests, path: "." } ]
outputs: [ name: image ]
caches: [ path: cache ]
run: { path: build }
inputs: [ { name: git-pull-requests, path: "." } ]
outputs: [ name: image ]
caches: [ path: cache ]
run: { path: build }
on_success:
put: git-pull-requests
params:
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
plan:
- in_parallel:
- { get: edge, trigger: true, passed: [ build ] }
- { get: git, passed: [ build ] }
- { get: git, trigger: true, passed: [ build ] }
- { get: version, trigger: true }
- { get: image }
- task: release-notes
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
plan:
- in_parallel:
- { get: edge, trigger: true, passed: [ pre ] }
- { get: git, passed: [ pre ] }
- { get: git, trigger: true, passed: [ pre ] }
- { get: version, params: { pre: rc } }
- put: version
params: {file: version/number}
Expand Down Expand Up @@ -288,13 +288,25 @@ jobs:

- load_var: version
file: version/number

- put: latest
inputs: [ edge ]
params:
image: edge/image.tar
version: ((.:version))
bump_aliases: true
- task: update-dockerhub-readme
image: image
config:
platform: linux
inputs:
- name: git
- name: dockerhub
run:
path: ./git/ci/scripts/update-dockerhub-readme
params:
DOCKERHUB_USERNAME: (( grab meta.dockerhub.username ))
DOCKERHUB_PASSWORD: (( grab meta.dockerhub.password ))
DOCKERHUB_REPOSITORY: (( grab meta.dockerhub.repository ))

- put: version
params:
Expand All @@ -308,19 +320,6 @@ jobs:
name: gh/name
tag: gh/tag
body: gh/notes.md

- task: update-dockerhub-readme
image: image
config:
platform: linux
inputs:
- name: dockerhub
run:
path: ./git/ci/scripts/update-dockerhub-readme
params:
DOCKERHUB_USERNAME: (( grab meta.dockerhub.username ))
DOCKERHUB_PASSWORD: (( grab meta.dockerhub.password ))
DOCKERHUB_REPOSITORY: (( grab meta.dockerhub.repository ))
on_failure:
put: notify
params:
Expand Down
18 changes: 9 additions & 9 deletions ci/scripts/update-dockerhub-readme
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ payload=$(jq --null-input \
'{ "username": $username, "password": $password }')

curl --silent --fail --show-error --location \
--request="POST" \
--url="https://hub.docker.com/v2/users/login" \
--header="Content-Type: application/json" \
--data-raw="${payload}" \
--request "POST" \
--url "https://hub.docker.com/v2/users/login" \
--header "Content-Type: application/json" \
--data-raw "${payload}" \
> ./token.json

payload=$(jq --null-input \
--arg "full_description" "$(cat dockerhub/README.md)" \
'{ "full_description": $full_description }')

curl --silent --fail --show-error --location --include \
--request="PATCH" \
--url="https://hub.docker.com/v2/repositories/${DOCKERHUB_REPOSITORY}" \
--header="Content-Type: application/json" \
--header="Authorization: JWT $(jq --raw-output '.token' ./token.json)" \
--data-raw="${payload}"
--request "PATCH" \
--url "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPOSITORY}" \
--header "Content-Type: application/json" \
--header "Authorization: JWT $(jq --raw-output '.token' ./token.json)" \
--data-raw "${payload}"
3 changes: 0 additions & 3 deletions ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ jobs:
- {} # task: release
- {} # load_var: version
- {} # put: latest
- {} # put: version
- {} # put: git
- {} # put: github

- task: update-dockerhub-readme
params:
Expand Down

0 comments on commit f111c32

Please sign in to comment.