diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2021-01-15 09:45:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 09:45:05 -0500 |
commit | 7ffe03690b02ec9961837f09f3c225172fb31fad (patch) | |
tree | 1222fb85762f817af74683a2c0327bc3ab77f010 /.travis.yml | |
parent | 5a898b28c9a82ad39d5442568b71a8306f6d2ae9 (diff) |
Switch to using GitHub Actions for publishing Docker images. (#10365)
* Switch to using GitHub Actions for publishing Docker images.
This simplifies handling of multiarch images and publishing to multiple
registries, and unifies testing with the code actually being used to
build and publish the images.
This also removes a handful of scripts that are no longer needed due to
this change, and switches our Dockerfile to not needing an architecture
to be specified in a build argument, instead relying on proper multiarch
docker image support.
* Fix YAML syntax.
* Add separate tagging for nightly and stable builds.
* Correct YAML syntax errors.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 86 |
1 files changed, 11 insertions, 75 deletions
diff --git a/.travis.yml b/.travis.yml index 677150239c..cb0aa85628 100644 --- a/.travis.yml +++ b/.travis.yml @@ -103,14 +103,6 @@ jobs: env: CFLAGS='-O1 -Wall -Wextra -Wformat-signedness -fstack-protector-all -fno-common -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1' after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)" - - name: Docker container build process (alpine installation) - script: - - "sudo echo '{\"experimental\": true}' > /etc/docker/daemon.json && sudo systemctl restart docker" - - packaging/docker/build.sh - env: - - ARCH=amd64 - after_failure: post_message "TRAVIS_MESSAGE" "Docker build process failed" - - name: Build/Install for ubuntu 20.04 (not containerized) script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on ubuntu 18.04" @@ -353,48 +345,7 @@ jobs: # We only publish if a TAG has been set during packaging - stage: Publish for release - _template: &RELEASE_TEMPLATE - env: - - RELEASE_CHANNEL: stable - git: - depth: false - script: - - echo "GIT Branch:" && git branch - - echo "Last commit:" && git log -1 - - echo "GIT Describe:" && git describe - - echo "packaging/version:" && cat packaging/version - - "sudo echo '{\"experimental\": true}' > /etc/docker/daemon.json && sudo systemctl restart docker" - - packaging/docker/check_login.sh - && echo "Switching to latest master branch, to pick up tagging if any" && git checkout master && git pull - && tick packaging/docker/build.sh - && packaging/docker/publish.sh - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Docker image publishing failed" - - name: Build & Publish docker image for i386 - <<: *RELEASE_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=i386 - - - name: Build & Publish docker image for amd64 - <<: *RELEASE_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=amd64 - - - name: Build & Publish docker image for armhf - <<: *RELEASE_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=armhf - - - name: Build & Publish docker image for aarch64 - <<: *RELEASE_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=aarch64 - - - name: Create release draft + name: Create release draft git: depth: false env: @@ -409,6 +360,10 @@ jobs: - .travis/draft_release.sh after_failure: post_message "TRAVIS_MESSAGE" "<!here> Draft release submission failed" + - name: Trigger Docker image build and publish + script: >- + curl -X POST -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/repos/netdata/netdata/actions/workflows/docker.yml' -d '{"ref": "master", "inputs": {"version": "${build_version}"}}' + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Failed to trigger docker build during release" "${NOTIF_CHANNEL}" - stage: Trigger deb and rpm package build (release) name: Trigger deb and rpm package build @@ -452,31 +407,7 @@ jobs: && packaging/docker/publish.sh after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly docker image publish failed" - name: Build & Publish docker image for i386 - <<: *NIGHTLY_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=i386 - - - name: Build & Publish docker image for amd64 - <<: *NIGHTLY_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=amd64 - - - name: Build & Publish docker image for armhf - <<: *NIGHTLY_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=armhf - - - name: Build & Publish docker image for aarch64 - <<: *NIGHTLY_TEMPLATE - env: - - ALLOW_SOFT_FAILURE_HERE=true - - ARCH=aarch64 - - - name: Create nightly release artifacts, publish to GCS + name: Create nightly release artifacts, publish to GCS script: - echo "GIT Branch:" && git branch - echo "Last commit:" && git log -1 @@ -526,6 +457,11 @@ jobs: condition: -d "artifacts" && ${TRAVIS_REPO_SLUG} = "netdata/netdata" after_deploy: rm -f .travis/gcs-credentials.json + - name: Trigger Docker image build and publish + script: >- + curl -X POST -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/repos/netdata/netdata/actions/workflows/docker.yml' -d '{"ref": "master", "inputs": {"version": "nightly"}}' + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Failed to trigger docker build during nightly release" "${NOTIF_CHANNEL}" + - stage: Trigger deb and rpm package build (nightly release) name: Trigger deb and rpm package build script: .travis/trigger_package_generation.sh "[Build latest]" |