1
0
Fork 0

configure part of a multi-arch pipeline

This commit is contained in:
Massaki Archambault 2021-12-24 12:53:46 -05:00
parent 9501dc9dc0
commit a11c005492
2 changed files with 26 additions and 4 deletions

View File

@ -1,15 +1,38 @@
# kind: pipeline
# type: kubernetes
# name: build-amd64
# node_selector:
# kubernetes.io/arch: amd64
# steps:
# - name: docker
# image: plugins/docker
# settings:
# repo: badjware/helium-blockchain-exporter
# # docker use a mtu of 1500 by default, which may cause packet drop in k8s
# mtu: 1450
# auto_tag: true
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
---
kind: pipeline kind: pipeline
type: kubernetes type: kubernetes
name: arm64 name: build-arm64
node_selector: node_selector:
beta.kubernetes.io/arch: arm64 kubernetes.io/arch: arm64
steps: steps:
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:
repo: badjware/helium-blockchain-exporter repo: badjware/helium-blockchain-exporter
# docker use a mtu of 1500 by default, which may cause packet drop in k8s
mtu: 1450
auto_tag: true auto_tag: true
username: username:
from_secret: docker_username from_secret: docker_username

View File

@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"log"
"net/http" "net/http"
"time" "time"
@ -125,7 +124,7 @@ func getHeliumApiWithCursor(path string, params *map[string]string) ([][]byte, e
defer resp.Body.Close() defer resp.Body.Close()
// read the response body and add it to the result array // read the response body and add it to the result array
log.Printf("querying %v", req.URL.String()) // log.Printf("querying %v", req.URL.String())
body, err := ioutil.ReadAll(resp.Body) body, err := ioutil.ReadAll(resp.Body)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to read response body of %v: %v", req.URL.String(), err) return nil, fmt.Errorf("failed to read response body of %v: %v", req.URL.String(), err)