forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
argocd-extension-installer.yaml
67 lines (62 loc) · 2.37 KB
/
argocd-extension-installer.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package:
name: argocd-extension-installer
# they started to create new releases for this project by following the semver rules
# in the beginning there were no releases, so we were using the commit hash as the version
# now we are using the latest release version
version: 0.0.8
epoch: 0
description: Install Argo CD extensions using init-containers
copyright:
- license: Apache-2.0
dependencies:
runtime:
- busybox
- curl
- file
environment:
contents:
packages:
- busybox
- ca-certificates-bundle
- git
- jq
pipeline:
- uses: git-checkout
with:
repository: https://github.com/argoproj-labs/argocd-extension-installer
tag: v${{package.version}}
expected-commit: 44a5ab8e6998df0beb6f293b3607262db53aa8c7
- runs: |
# https://github.com/argoproj-labs/argocd-extension-installer/blob/880f978f59bd6434202504355c62c12e251e327a/Dockerfile#L14
# we are going to call the script from /home/ext-installer to be able to use it as `./install.sh` in the entrypoint of the container image
mkdir -p "${{targets.destdir}}"/home/ext-installer
install -Dm755 install.sh "${{targets.destdir}}"/home/ext-installer/install.sh
# Upstream repo doesn't provide any tags or releases
update:
enabled: true
github:
identifier: argoproj-labs/argocd-extension-installer
strip-prefix: v
use-tag: true
# https://raw.githubusercontent.com/argoproj/argo-helm/main/charts/argo-cd/values.yaml
test:
environment:
contents:
packages:
- bash
- jq
environment:
EXTENSION_URL: https://github.com/argoproj-labs/argocd-extension-metrics/releases/download/v1.0.0/extension.tar.gz
EXTENSION_CHECKSUM_URL: https://github.com/argoproj-labs/argocd-extension-metrics/releases/download/v1.0.0/extension_checksums.txt
EXTENSION_JS_VARS: '{"key1": "value1", "key2": "value2"}'
pipeline:
- runs: |
/home/ext-installer/install.sh
# check if there is any extension installed in /tmp/extensions/resources/ folder
# file `extension-Metrics.js` should be present in /tmp/extensions/resources/ folder
if [ ! -f /tmp/extensions/resources/extension-Metrics.js/extensions-Metrics.js ]; then
echo "extension-Metrics.js not found"
exit 1
fi
echo "Extensions installed"
find /tmp/extensions/resources/ -type f