Permalink
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (86 sloc) 2.59 KB
#language: none
#
#runtime:
# # Allow cross platform builds
# nodePool: shippable_shared_aarch64
# #nodePool: default_node_pool
#
#env:
# #- ca=--external-ca privileged=--privileged
# - privileged=--privileged
# #arch=$(lscpu | grep Arch | awk '{ print $2 }')
#
#build:
#
# ci:
# - arch: $(lscpu | grep Arch | awk '{ print $2 }')
# - echo $arch
# - sed -i 's|registry.fedoraproject.org/||' Dockerfile.fedora-27
# - sed -i 's/^# debug:\s*//' Dockerfile.fedora-27
# - docker build -t local/freeipa-server -f Dockerfile.fedora-27 .
# - tests/run-master-and-replica.sh local/freeipa-server
#
# post_ci:
# - docker tag local/freeipa-server jmreicha/freeipa-server:arm64
# - docker push jmreicha/freeipa-server:arm64
#
#integrations:
# hub:
# - integrationName: dockerhub
# type: dockerRegistryLogin
templates: &build-test-push
- export HUB_USERNAME=$(shipctl get_integration_field "dockerhub" "username")
- export HUB_PASSWORD=$(shipctl get_integration_field "dockerhub" "password")
- docker login --username $HUB_USERNAME --password $HUB_PASSWORD
- cd $(shipctl get_resource_state "freeipa-container-gitRepo")
- sed -i 's|registry.fedoraproject.org/||' Dockerfile.fedora-27
- sed -i 's/^# debug:\s*//' Dockerfile.fedora-27
- docker build -t local/freeipa-server -f Dockerfile.fedora-27 .
- tests/run-master-and-replica.sh local/freeipa-server
- docker tag local/freeipa-server jmreicha/freeipa-server:$arch
- docker push jmreicha/freeipa-server:$arch
resources:
- name: freeipa-container-gitRepo
type: gitRepo
integration: freeipa-container-gitRepo
versionTemplate:
sourceName: jmreicha/freeipa-container
branch: master
jobs:
- name: build_amd64
type: runSh
runtime:
nodePool: default_node_pool
container: true
integrations:
- dockerhub
steps:
- IN: freeipa-container-gitRepo
- TASK:
runtime:
options:
env:
- privileged: --privileged
# Hardcode this for now
# Also look at using SHIPPABLE_NODE_ARCHITECTURE
- arch: amd64
script:
- *build-test-push
- name: build_arm64
type: runSh
runtime:
nodePool: shippable_shared_aarch64
container: true
integrations:
- dockerhub
steps:
- IN: freeipa-container-gitRepo
- TASK:
runtime:
options:
env:
- privileged: --privileged
# Hardcode this for now
- arch: arm64
script:
- *build-test-push