2023-01-26 12:26:36 +03:00
|
|
|
# Connect to github container registry
|
|
|
|
|
|
|
|
```
|
|
|
|
echo <hurl-bot github token> | docker login ghcr.io --username hurl-bot --password-stdin
|
|
|
|
```
|
|
|
|
|
2021-12-11 21:23:30 +03:00
|
|
|
# Build image
|
|
|
|
|
|
|
|
```
|
2021-12-15 16:22:29 +03:00
|
|
|
hurl_latest_version=$(curl --silent "https://api.github.com/repos/Orange-OpenSource/hurl/releases/latest" | jq -r .tag_name)
|
|
|
|
docker_build_date=$(date "+%Y-%m-%d %H-%M-%S")
|
2023-01-26 12:26:36 +03:00
|
|
|
docker builder prune --all
|
|
|
|
docker build --build-arg docker_build_date="${docker_build_date}" --build-arg hurl_latest_version=${hurl_latest_version} --tag ghcr.io/orange-opensource/hurl:latest --tag ghcr.io/orange-opensource/hurl:${hurl_latest_version} .
|
2021-12-11 21:23:30 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
# Get docker hurl version
|
|
|
|
|
|
|
|
```
|
2023-02-02 15:24:57 +03:00
|
|
|
docker run --rm ghcr.io/orange-opensource/hurl:latest --version
|
2021-12-11 21:23:30 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
# Run docker hurl from STDIN
|
|
|
|
|
|
|
|
```
|
2023-06-02 09:41:12 +03:00
|
|
|
echo -e "GET https://hurl.dev\n\nHTTP 200" | docker run --rm ghcr.io/orange-opensource/hurl:latest --test --color
|
2021-12-11 21:23:30 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
# Run docker hurl from FILE
|
|
|
|
|
|
|
|
```
|
2023-05-05 10:08:45 +03:00
|
|
|
echo -e "GET https://hurl.dev\n\nHTTP 200" > /tmp/test.hurl
|
2023-02-02 15:24:57 +03:00
|
|
|
docker run --rm -v /tmp/test.hurl:/tmp/test.hurl ghcr.io/orange-opensource/hurl:latest --test --color /tmp/test.hurl
|
2021-12-11 21:23:30 +03:00
|
|
|
```
|
2023-01-26 12:26:36 +03:00
|
|
|
|
|
|
|
# Push to github container registry
|
|
|
|
|
|
|
|
```
|
|
|
|
docker push ghcr.io/orange-opensource/hurl:${hurl_latest_version}
|
|
|
|
docker push ghcr.io/orange-opensource/hurl:latest
|
|
|
|
```
|