edgexfoundry / ci-management

Control repo for Jenkins job and build minion definitions | Owner: DevOps WG
Apache License 2.0
10 stars 34 forks source link

first pass at generating multi-architecture docker images #616

Closed hutchic closed 4 years ago

hutchic commented 4 years ago

PR Checklist

Docker image building / creation seems to happen in numerous places. This is a first pass at updating one location to use docker manifests to make multi-architecture images forgoing the buildkit requirement.

pseudocode:

docker tag $(REGISTRY)/$(IMAGE):$(ARCH)-$(VERSION)
docker push $(REGISTRY)/$(IMAGE):$(ARCH)-$(VERSION)
docker manifest create $(REGISTRY)/$(IMAGE):$(VERSION)
docker manifest annotate $(REGISTRY)/$(IMAGE):$(VERSION) $(REGISTRY)/$(IMAGE):$(ARCH)-$(VERSION) --os linux --arch $(ARCH)
docker manifest push $(REGISTRY)/$(IMAGE):$(VERSION)

end result is docker run $(REGISTRY)/$(IMAGE):$(VERSION) will give the proper architecture without needing it explicitly specified

Redis screenshot as an example

image

Issue Number:

Sandbox Testing

Test Links :

Are there any new imports or modules? If so, what are they used for and why?

Are there any specific instructions or things that should be known prior to reviewing?

Other information

hutchic commented 4 years ago

I believe it's being used:

https://github.com/edgexfoundry/edgex-go/blob/e5ebbe2778b17324c446436c8bb6947fa319c3bf/Jenkinsfile#L37 https://github.com/edgexfoundry/edgex-global-pipelines/blob/4882d0745f735dd1a34cd10f5b43bcfbdc552fb4/vars/edgeXGeneric.groovy#L21

hutchic commented 4 years ago

per discussion at security working group although this code path is in use it's deprecated.

eb-oss commented 4 years ago

Just to be clear, edgex-global-pipelines/shell is a symlink to global-jjb/shell. It does not link to ci-management/shell. So adding ANY script to this directory in order to have access to it in pipelines would not work.