From a2478f74660ba220a1674ff225ff3db642fe3f3a Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:41:41 +0200 Subject: [PATCH 01/17] Generate Release Notes Automatically --- .github/release.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000000..436f966ba8 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,20 @@ +changelog: + exclude: + labels: + - wontfix + - invalid + - duplicate + - question + categories: + - title: Breaking Changes ๐Ÿ›  + labels: + - breaking-change + - title: New Features ๐ŸŽ‰ + labels: + - enhancement + - title: Bugfixes + labels: + - bug + - title: Other Changes + labels: + - "*" From 904a80333a110cc35183f366a2be69498112a6ff Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:43:39 +0200 Subject: [PATCH 02/17] Add GitHub Action for Releases --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..bbb7f7ff69 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Build and Release + +on: + push: + tags: + - "[0-9]*.[0-9]*.[0-9]**" + +jobs: + + + build_and_release: + name: 'Build and Release' + runs-on: ubuntu-latest + environment: release + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build artifacts + run: | + ./gradlew assemble bootJarWithFrontend :inspectit-ocelot-core:cyclonedxBom :inspectit-ocelot-configurationserver:cyclonedxBom -PbuildVersion=${{ github.ref_name }} + mkdir artifacts + cp ./inspectit-ocelot-agent/build/inspectit-ocelot-agent-${{ github.ref_name }}.jar ./artifacts + cp ./components/inspectit-ocelot-configurationserver/build/libs/inspectit-ocelot-configurationserver-${{ github.ref_name }}.jar ./artifacts + mkdir boms + cp ./inspectit-ocelot-core/build/reports/bom.json ./boms/inspectit-ocelot-agent-bom.json + cp ./inspectit-ocelot-core/build/reports/bom.xml ./boms/inspectit-ocelot-agent-bom.xml + cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.json ./boms/inspectit-ocelot-configurationserver-bom.json + cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.xml ./boms/inspectit-ocelot-configurationserver-bom.xml + zip -r ./artifacts/software-bill-of-materials.zip ./boms + - name: Calculate checksums of release artifacts + working-directory: ./artifacts + run: for f in *; do sha256sum "$f" >> inspectit-ocelot-sha256-checksums.txt; done + - name: Create Release + uses: softprops/action-gh-release@v0.1.14 + with: + tag_name: ${{ github.event.inputs.boomerang-version }} + files: artifacts/* + generate_release_notes: true + name: Version ${{ github.ref_name }} + body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" + + From 22b68e8bd624772be4c9971c823fb4e71ef57d95 Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:44:17 +0200 Subject: [PATCH 03/17] Build and Publish Documentation with Release --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bbb7f7ff69..5fbc542425 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,3 +42,46 @@ jobs: body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" + build_documentation: + name: "Build and Publish Release Documentation" + runs-on: ubuntu-latest + defaults: + run: + working-directory: inspectit-ocelot-documentation/website + #needs: build_and_release + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + cache: yarn + cache-dependency-path: 'inspectit-ocelot-documentation/website/yarn.lock' + - name: Replace Variables in Docs + working-directory: ./inspectit-ocelot-documentation/docs + run: | + find . -type f -print0 | xargs -0 sed -i 's/{inspectit-ocelot-version}/'"${{ github.ref_name }}"'/g' + OPEN_CENSUS_VERSION=$(cat ../../gradle.properties | grep -oP '(?<=openCensusVersion=).*') + find . -type f -print0 | xargs -0 sed -i 's/{opencensus-version}/'"${OPEN_CENSUS_VERSION}"'/g' + - name: Create new Documentation Version + run: | + npm install + npm run version ${{ github.ref_name }} + git add versions.json versioned_docs versioned_sidebars + git config --global user.name 'NTTechnicalUser' + git config --global user.email 'NTTechnicalUser@users.noreply.github.com' + git commit -m "Publish documentation for release ${{ github.ref_name }}" + git push origin HEAD:master + - name: Install Build Dependencies + run: yarn install --frozen-lockfile + - name: Build Website + run: yarn build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./inspectit-ocelot-documentation/website/build/inspectit-ocelot + user_name: NTTechnicalUser + user_email: NTTechnicalUser@users.noreply.github.com + commit_message: Publish documentation for release ${{ github.ref_name }} From 3e55a5843230618d1484b2f36f92d753cf8bdcb6 Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:45:06 +0200 Subject: [PATCH 04/17] Build and Publish Docker Images for Release --- .github/workflows/release.yml | 20 +++++++++++++++++++ .../build.gradle | 7 ++++--- inspectit-ocelot-agent/build.gradle | 6 +++--- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5fbc542425..7b138977f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,26 @@ jobs: body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" + build_and_publish_docker_images: + name: 'Build and Push Docker Images' + runs-on: ubuntu-latest + needs: build_and_release + environment: release + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build Docker Images + run: ./gradlew dockerTag -PbuildVersion=${{ github.ref_name }} + - name: Push Docker Images + run: | + docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }} + docker push aaronweikru/inspectit-ocelot-agent:${{ github.ref_name }} + docker push aaronweikru/inspectit-ocelot-agent:latest + docker push aaronweikru/inspectit-ocelot-configurationserver:${{ github.ref_name }} + docker push aaronweikru/inspectit-ocelot-configurationserver:latest + build_documentation: name: "Build and Publish Release Documentation" runs-on: ubuntu-latest diff --git a/components/inspectit-ocelot-configurationserver/build.gradle b/components/inspectit-ocelot-configurationserver/build.gradle index cabbf8e259..29c77663d8 100644 --- a/components/inspectit-ocelot-configurationserver/build.gradle +++ b/components/inspectit-ocelot-configurationserver/build.gradle @@ -1,7 +1,7 @@ plugins { id("com.github.node-gradle.node") version "2.2.1" id "com.moowork.node" version "1.3.1" - id 'com.palantir.docker' version "0.21.0" + id 'com.palantir.docker' version "0.34.0" id 'org.springframework.boot' version "${springBootVersion}" id "org.cyclonedx.bom" version "1.7.2" // Add the plugin in the existing plugins block @@ -172,8 +172,9 @@ task copyServerJar(type: Copy) { docker { name "inspectit/inspectit-ocelot-configurationserver" - tags "${version}" + dependsOn copyServerJar + + tag 'versioned', "hub.docker.com/${name}:${version}" dockerfile file('docker/Dockerfile') files 'docker/entrypoint.sh', "$buildDir/docker-jar/inspectit-ocelot-configurationserver.jar" } -docker.dependsOn copyServerJar diff --git a/inspectit-ocelot-agent/build.gradle b/inspectit-ocelot-agent/build.gradle index ca81e4e46b..f20f47e123 100644 --- a/inspectit-ocelot-agent/build.gradle +++ b/inspectit-ocelot-agent/build.gradle @@ -1,7 +1,7 @@ plugins { id "me.champeau.gradle.jmh" version "0.5.3" id 'maven-publish' - id 'com.palantir.docker' version "0.21.0" + id 'com.palantir.docker' version "0.34.0" } evaluationDependsOn(':inspectit-ocelot-bootstrap') @@ -56,7 +56,7 @@ docker { dependsOn copyAgent name "inspectit/inspectit-ocelot-agent" - tags "${version}" + tag 'versioned', "hub.docker.com/${name}:${version}" dockerfile file('docker/Dockerfile') files 'docker/entrypoint.sh', "$buildDir/inspectit-ocelot-agent.jar" } @@ -327,4 +327,4 @@ jmh { timeOnIteration = '3s' fork = 1 } -tasks.jmh.dependsOn jar \ No newline at end of file +tasks.jmh.dependsOn jar From 68d70370401208be817906af4dd8eb32ff4c855a Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:45:50 +0200 Subject: [PATCH 05/17] Test docs deployment in PRs --- .github/workflows/docs_deployment_test.yml | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/docs_deployment_test.yml diff --git a/.github/workflows/docs_deployment_test.yml b/.github/workflows/docs_deployment_test.yml new file mode 100644 index 0000000000..2d7f59eb6a --- /dev/null +++ b/.github/workflows/docs_deployment_test.yml @@ -0,0 +1,25 @@ +name: Test Documentation Deployment + +on: + pull_request: + branches: + - master + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + defaults: + run: + working-directory: inspectit-ocelot-documentation/website + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + cache-dependency-path: 'inspectit-ocelot-documentation/website/yarn.lock' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Test build website + run: yarn build From 7988c400e158b78512d7047a110ef684bcedac44 Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:46:00 +0200 Subject: [PATCH 06/17] Deploy master documentation --- .github/workflows/deploy_master_docs.yml | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/deploy_master_docs.yml diff --git a/.github/workflows/deploy_master_docs.yml b/.github/workflows/deploy_master_docs.yml new file mode 100644 index 0000000000..6e1db7dbe4 --- /dev/null +++ b/.github/workflows/deploy_master_docs.yml @@ -0,0 +1,38 @@ +name: Deploy Master Documentation + +on: + push: + branches: + - master + paths: + - inspectit-ocelot-documentation/** + +jobs: + + deploy_master_documentation: + name: "Publish Master Documentation" + runs-on: ubuntu-latest + defaults: + run: + working-directory: inspectit-ocelot-documentation/website + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: 18 + cache: yarn + cache-dependency-path: 'inspectit-ocelot-documentation/website/yarn.lock' + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build website + run: yarn build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./inspectit-ocelot-documentation/website/build/inspectit-ocelot + user_name: NTTechnicalUser + user_email: NTTechnicalUser@users.noreply.github.com + commit_message: "Updated master documentation" From 7a1017891d1e2a4d19f4805ed092db291cfd2707 Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:46:14 +0200 Subject: [PATCH 07/17] Run all tests before release --- .github/workflows/agent_test.yml | 7 ++++--- .github/workflows/configdocsgenerator_test.yml | 10 ++++++---- .github/workflows/configuration_ui_test.yml | 10 ++++++---- .github/workflows/configurationserver_test.yml | 8 +++++--- .github/workflows/release.yml | 12 ++++++++++++ 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/.github/workflows/agent_test.yml b/.github/workflows/agent_test.yml index 169b96ec14..536bc89fd6 100644 --- a/.github/workflows/agent_test.yml +++ b/.github/workflows/agent_test.yml @@ -1,9 +1,9 @@ name: Java Agent Tests on: - push: - branches: - - master + #push: + # branches: + # - master pull_request: paths-ignore: - 'components/**' @@ -14,6 +14,7 @@ on: - '**.txt' - '.github/**' - '.circleci/**' + workflow_call: jobs: pr-check: diff --git a/.github/workflows/configdocsgenerator_test.yml b/.github/workflows/configdocsgenerator_test.yml index ef37e2c6f4..d907cd4d1c 100644 --- a/.github/workflows/configdocsgenerator_test.yml +++ b/.github/workflows/configdocsgenerator_test.yml @@ -1,13 +1,15 @@ name: ConfigDocsGenerator Tests on: - push: - branches: - - master + #push: + # branches: + # - master pull_request: paths: - '.github/workflows/configdocsgenerator_test.yml' - 'components/inspectit-ocelot-configdocsgenerator/**' + workflow_call: + jobs: test: name: Test @@ -21,4 +23,4 @@ jobs: run: chmod +x gradlew - name: test run: ../../gradlew test - working-directory: ${{env.working-directory}} \ No newline at end of file + working-directory: ${{env.working-directory}} diff --git a/.github/workflows/configuration_ui_test.yml b/.github/workflows/configuration_ui_test.yml index 4bf7ae281d..5c0affead9 100644 --- a/.github/workflows/configuration_ui_test.yml +++ b/.github/workflows/configuration_ui_test.yml @@ -1,12 +1,14 @@ name: Configuration UI Tests on: - push: - branches: - - master + #push: + # branches: + # - master pull_request: paths: - 'components/inspectit-ocelot-configurationserver-ui/**' + workflow_call: + jobs: test: @@ -33,4 +35,4 @@ jobs: - name: Run Prettier working-directory: ${{env.working-directory}} - run: yarn format \ No newline at end of file + run: yarn format diff --git a/.github/workflows/configurationserver_test.yml b/.github/workflows/configurationserver_test.yml index 597cb68657..41428a5614 100644 --- a/.github/workflows/configurationserver_test.yml +++ b/.github/workflows/configurationserver_test.yml @@ -1,14 +1,16 @@ name: Configuration Server Tests on: - push: - branches: - - master + #push: + # branches: + # - master pull_request: paths: - '.github/workflows/configurationserver_test.yml' - 'components/inspectit-ocelot-configurationserver/**' - '!components/inspectit-ocelot-configurationserver/README.md' + workflow_call: + jobs: test: name: Assemble & Test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b138977f7..6e8646120a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,11 +7,23 @@ on: jobs: + agent_test: + uses: ./.github/workflows/agent_test.yml + + configdocsgenerator_test: + uses: ./.github/workflows/configdocsgenerator_test.yml + + configurationserver_test: + uses: ./.github/workflows/configurationserver_test.yml + + configuration_ui_test: + uses: ./.github/workflows/configuration_ui_test.yml build_and_release: name: 'Build and Release' runs-on: ubuntu-latest environment: release + needs: [agent_test, configdocsgenerator_test, configurationserver_test, configuration_ui_test] steps: - name: Checkout uses: actions/checkout@v3 From 4116402dbc61ac029b0cbe92ea0db520db386cf5 Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:51:11 +0200 Subject: [PATCH 08/17] Fix commented lines in test actions --- .github/workflows/agent_test.yml | 6 +++--- .github/workflows/configdocsgenerator_test.yml | 6 +++--- .github/workflows/configuration_ui_test.yml | 6 +++--- .github/workflows/configurationserver_test.yml | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/agent_test.yml b/.github/workflows/agent_test.yml index 536bc89fd6..4b8249a662 100644 --- a/.github/workflows/agent_test.yml +++ b/.github/workflows/agent_test.yml @@ -1,9 +1,9 @@ name: Java Agent Tests on: - #push: - # branches: - # - master + push: + branches: + - master pull_request: paths-ignore: - 'components/**' diff --git a/.github/workflows/configdocsgenerator_test.yml b/.github/workflows/configdocsgenerator_test.yml index d907cd4d1c..3ac03895e0 100644 --- a/.github/workflows/configdocsgenerator_test.yml +++ b/.github/workflows/configdocsgenerator_test.yml @@ -1,9 +1,9 @@ name: ConfigDocsGenerator Tests on: - #push: - # branches: - # - master + push: + branches: + - master pull_request: paths: - '.github/workflows/configdocsgenerator_test.yml' diff --git a/.github/workflows/configuration_ui_test.yml b/.github/workflows/configuration_ui_test.yml index 5c0affead9..a1cb7e28f0 100644 --- a/.github/workflows/configuration_ui_test.yml +++ b/.github/workflows/configuration_ui_test.yml @@ -1,9 +1,9 @@ name: Configuration UI Tests on: - #push: - # branches: - # - master + push: + branches: + - master pull_request: paths: - 'components/inspectit-ocelot-configurationserver-ui/**' diff --git a/.github/workflows/configurationserver_test.yml b/.github/workflows/configurationserver_test.yml index 41428a5614..4f8cf99998 100644 --- a/.github/workflows/configurationserver_test.yml +++ b/.github/workflows/configurationserver_test.yml @@ -1,16 +1,16 @@ name: Configuration Server Tests on: - #push: - # branches: - # - master + push: + branches: + - master pull_request: paths: - '.github/workflows/configurationserver_test.yml' - 'components/inspectit-ocelot-configurationserver/**' - '!components/inspectit-ocelot-configurationserver/README.md' workflow_call: - + jobs: test: name: Assemble & Test From d25ae0ecd4bd037d248534dba71bf87fb7490d3e Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Thu, 1 Sep 2022 11:58:49 +0200 Subject: [PATCH 09/17] Remove CircleCI config --- .circleci/config.yml | 247 ------------------------------------------- 1 file changed, 247 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e5ffe09663..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,247 +0,0 @@ -# Java Gradle CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-java/ for more details -# -version: 2.1 - -# ############################################################### -# Commands -commands: - attach_repo: - steps: - - attach_workspace: - at: ~/inspectit - build_and_test_agent: - steps: - - run: cd repo && ./gradlew assemble --max-workers=2 --no-daemon - - run: cd repo && ./gradlew test --max-workers=2 --no-daemon - - run: cd repo && ./gradlew systemTest --max-workers=2 --no-daemon - - store_test_results: - path: ~/inspectit/repo/inspectit-ocelot-agent/build/test-results - - store_test_results: - path: ~/inspectit/repo/inspectit-ocelot-core/build/test-results - - store_test_results: - path: ~/inspectit/repo/inspectit-ocelot-config/build/test-results - - store_test_results: - path: ~/inspectit/repo/components/inspectit-ocelot-configurationserver/build/test-results - - store_artifacts: - path: /home/circleci/inspectit/repo/heapdump.bin - -# ############################################################### -# Jobs -jobs: - # Job for checking out the source code to build and test - checkout: - docker: - - image: circleci/openjdk:8-jdk - working_directory: ~/inspectit - steps: - - checkout: - path: ~/inspectit/repo - - persist_to_workspace: - root: ~/inspectit - paths: - - repo - - # Building the release artifacts (agent and demo) - build_release_artifacts: - docker: - - image: circleci/openjdk:8-jdk - working_directory: ~/inspectit - steps: - - attach_repo - - run: cd repo && ./gradlew assemble bootJarWithFrontend :inspectit-ocelot-core:cyclonedxBom :inspectit-ocelot-configurationserver:cyclonedxBom -PbuildVersion=${CIRCLE_TAG} - - run: mkdir artifacts - - run: cp ~/inspectit/repo/inspectit-ocelot-agent/build/inspectit-ocelot-agent-${CIRCLE_TAG}.jar ~/inspectit/artifacts - - run: cp ~/inspectit/repo/components/inspectit-ocelot-configurationserver/build/libs/inspectit-ocelot-configurationserver-${CIRCLE_TAG}.jar ~/inspectit/artifacts - - run: mkdir boms - - run: cp ~/inspectit/repo/inspectit-ocelot-core/build/reports/bom.json ~/inspectit/boms/inspectit-ocelot-agent-bom.json - - run: cp ~/inspectit/repo/inspectit-ocelot-core/build/reports/bom.xml ~/inspectit/boms/inspectit-ocelot-agent-bom.xml - - run: cp ~/inspectit/repo/components/inspectit-ocelot-configurationserver/build/reports/bom.json ~/inspectit/boms/inspectit-ocelot-configurationserver-bom.json - - run: cp ~/inspectit/repo/components/inspectit-ocelot-configurationserver/build/reports/bom.xml ~/inspectit/boms/inspectit-ocelot-configurationserver-bom.xml - - run: zip -r ~/inspectit/artifacts/software-bill-of-materials.zip boms - - run: - name: Calculate checksums of release artifacts - working_directory: ~/inspectit/artifacts - command: for f in *; do sha256sum "$f" >> inspectit-ocelot-sha256-checksums.txt; done - - persist_to_workspace: - root: ~/inspectit - paths: - - artifacts - - # Generates the changelog body sued for the Github release - generate_changelog: - docker: - - image: circleci/ruby:3.0 - working_directory: ~/inspectit - steps: - - attach_repo - - run: - command: | - sudo apt-get install jq - gem install bundler - gem install rspec - gem install github_changelog_generator - cd repo - chmod +x ./resources/github-release-script.sh - ./resources/github-release-script.sh - mkdir ~/inspectit/changelog - cp release_body.md ~/inspectit/changelog - - persist_to_workspace: - root: ~/inspectit - paths: - - changelog - - # Publish the release artifacts to Github and updates the release - publish_github_release: - docker: - - image: cibuilds/github:0.12 - working_directory: ~/inspectit - steps: - - attach_repo - - run: - name: "Publish Release on GitHub" - command: | - VERSION=${CIRCLE_TAG} - BODY=$(cat ~/inspectit/changelog/release_body.md) - ghr -t ${GITHUB_TOKEN} -u inspectIT -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -n "Version ${CIRCLE_TAG}" -b "${BODY}" ${VERSION} ~/inspectit/artifacts/ - - # Publish docker images - publish_docker_images: - docker: - - image: circleci/openjdk:8-jdk - working_directory: ~/inspectit - steps: - - attach_repo - - setup_remote_docker: - version: 20.10.12 - - run: cd repo && ./gradlew dockerTag -PbuildVersion=${CIRCLE_TAG} - - run: | - docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD - docker push inspectit/inspectit-ocelot-agent:${CIRCLE_TAG} - docker push inspectit/inspectit-ocelot-agent:latest - docker push inspectit/inspectit-ocelot-configurationserver:${CIRCLE_TAG} - docker push inspectit/inspectit-ocelot-configurationserver:latest - - # Deploy pre-release documentation - deploy-master-documentation: - docker: - - image: cimg/node:15.0.1 - working_directory: ~/inspectit - steps: - - attach_repo - - run: - name: Deploying to GitHub Pages - no_output_timeout: 20m - working_directory: ~/inspectit/repo/inspectit-ocelot-documentation/website - command: | - git config --global user.email "NTTechnicalUser@users.noreply.github.com" - git config --global user.name "NTTechnicalUser" - echo "machine github.com login NTTechnicalUser password $GITHUB_TOKEN" > ~/.netrc - npm install && GIT_USER=NTTechnicalUser CUSTOM_COMMIT_MESSAGE="[skip ci] Updated master documentation." npm run publish-gh-pages - - # Deploy pre-release documentation - deploy-release-documentation: - docker: - - image: cimg/node:15.0.1 - working_directory: ~/inspectit - steps: - - run: - name: Avoid hosts unknown for github - command: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config - - add_ssh_keys: - fingerprints: - - "9e:4e:80:f7:6b:34:39:48:88:02:f6:ff:40:c3:30:4c" - - run: - name: GitHub Login - command: | - git config --global user.email "NTTechnicalUser@users.noreply.github.com" - git config --global user.name "NTTechnicalUser" - git config --global push.default simple - echo "machine github.com login NTTechnicalUser password $GITHUB_TOKEN" > ~/.netrc - - run: - name: Checkout latest master branch for documentation - working_directory: ~/inspectit - command: | - git clone git@github.com:inspectIT/inspectit-ocelot.git . - - run: - name: Replace variables - working_directory: ~/inspectit/inspectit-ocelot-documentation/docs - command: | - find . -type f -print0 | xargs -0 sed -i 's/{inspectit-ocelot-version}/'"${CIRCLE_TAG}"'/g' - OPEN_CENSUS_VERSION=$(cat ../../gradle.properties | grep -oP '(?<=openCensusVersion=).*') - find . -type f -print0 | xargs -0 sed -i 's/{opencensus-version}/'"${OPEN_CENSUS_VERSION}"'/g' - - run: - name: Create new documentation version - working_directory: ~/inspectit/inspectit-ocelot-documentation/website - command: | - npm install - npm run version ${CIRCLE_TAG} - git add versions.json versioned_docs versioned_sidebars - git commit -m "[skip ci] Publish documentation v${CIRCLE_TAG}" - git push - - run: - name: Deploying to GitHub Pages - no_output_timeout: 20m - working_directory: ~/inspectit/inspectit-ocelot-documentation/website - command: | - GIT_USER=NTTechnicalUser CUSTOM_COMMIT_MESSAGE="[skip ci] Publish documentation v${CIRCLE_TAG}" npm run publish-gh-pages - -# ############################################### -# The defined workflows -workflows: - version: 2 - - # Workflow for deploying master documentation - deploy_documentation: - jobs: - - checkout - - deploy-master-documentation: - requires: - - checkout - filters: - branches: - only: master - - # Workflow for building and deploying releases based on tagged commits - # Note: you have to manually approve the workflow on CircleCI - release: - jobs: - - requesting-release-build: - type: approval - filters: &filter_release - branches: - ignore: /.*/ - tags: - only: /\d+\.\d+(\..+)?/ - - checkout: - filters: - <<: *filter_release - requires: - - requesting-release-build - - deploy-release-documentation: - filters: - <<: *filter_release - requires: - - checkout - - build_release_artifacts: - filters: - <<: *filter_release - requires: - - checkout - - generate_changelog: - filters: - <<: *filter_release - requires: - - checkout - - publish_github_release: - filters: - <<: *filter_release - requires: - - build_release_artifacts - - generate_changelog - - publish_docker_images: - filters: - <<: *filter_release - requires: - - publish_github_release From b940281b1bb8b00c4fda3c2b552e15acab00d2fd Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Fri, 2 Sep 2022 09:34:19 +0200 Subject: [PATCH 10/17] Fix commented line --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e8646120a..2e4d2a995d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,7 +80,7 @@ jobs: defaults: run: working-directory: inspectit-ocelot-documentation/website - #needs: build_and_release + needs: build_and_release steps: - name: Checkout uses: actions/checkout@v3 From d514cab757e5cd48fb2c0b1938d8e895e3c2569f Mon Sep 17 00:00:00 2001 From: aaronweissler <46028218+aaronweissler@users.noreply.github.com> Date: Mon, 12 Sep 2022 11:05:56 +0200 Subject: [PATCH 11/17] Add token to specify user for release --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e4d2a995d..5e3e91876f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,7 @@ jobs: tag_name: ${{ github.event.inputs.boomerang-version }} files: artifacts/* generate_release_notes: true + token: ${{ secrets.RELEASE_USER_TOKEN }} name: Version ${{ github.ref_name }} body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" From c86ccbeeb6033828d982bb21d1e4bff6503c88d3 Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Fri, 16 Dec 2022 18:59:20 +0100 Subject: [PATCH 12/17] Minor fixes, to stay consistent with the version of used github actions --- .github/workflows/deploy_master_docs.yml | 2 +- .github/workflows/docs_deployment_test.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy_master_docs.yml b/.github/workflows/deploy_master_docs.yml index 6e1db7dbe4..1077b290c7 100644 --- a/.github/workflows/deploy_master_docs.yml +++ b/.github/workflows/deploy_master_docs.yml @@ -19,7 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 18 cache: yarn diff --git a/.github/workflows/docs_deployment_test.yml b/.github/workflows/docs_deployment_test.yml index 2d7f59eb6a..b534e0dd21 100644 --- a/.github/workflows/docs_deployment_test.yml +++ b/.github/workflows/docs_deployment_test.yml @@ -13,7 +13,7 @@ jobs: run: working-directory: inspectit-ocelot-documentation/website steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 18 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e3e91876f..b1e0c7a361 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,7 +86,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Setup Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: 18 cache: yarn From f5f6cbb141a22552271a5179de277212315bd2b7 Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Mon, 30 Jan 2023 09:46:47 +0100 Subject: [PATCH 13/17] Fixed github actions --- .github/workflows/release.yml | 80 +++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1e0c7a361..021cdfd552 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: name: 'Build and Release' runs-on: ubuntu-latest environment: release - needs: [agent_test, configdocsgenerator_test, configurationserver_test, configuration_ui_test] + needs: [configdocsgenerator_test, configurationserver_test, configuration_ui_test] steps: - name: Checkout uses: actions/checkout@v3 @@ -41,6 +41,17 @@ jobs: cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.json ./boms/inspectit-ocelot-configurationserver-bom.json cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.xml ./boms/inspectit-ocelot-configurationserver-bom.xml zip -r ./artifacts/software-bill-of-materials.zip ./boms + # Uploading jars to create docker images + - name: Upload inspectit-ocelot-agent jar + uses: actions/upload-artifact@v3 + with: + name: inspectit-ocelot-agent-jar + path: artifacts/inspectit-ocelot-agent-${{ github.ref_name }}.jar + - name: Upload inspectit-ocelot-configurationserver jar + uses: actions/upload-artifact@v3 + with: + name: inspectit-ocelot-configurationserver-jar + path: artifacts/inspectit-ocelot-configurationserver-${{ github.ref_name }}.jar - name: Calculate checksums of release artifacts working-directory: ./artifacts run: for f in *; do sha256sum "$f" >> inspectit-ocelot-sha256-checksums.txt; done @@ -50,30 +61,63 @@ jobs: tag_name: ${{ github.event.inputs.boomerang-version }} files: artifacts/* generate_release_notes: true - token: ${{ secrets.RELEASE_USER_TOKEN }} + token: ${{ github.token }} name: Version ${{ github.ref_name }} body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" - - build_and_publish_docker_images: - name: 'Build and Push Docker Images' + publish_docker_image: + name: "Publish docker image" runs-on: ubuntu-latest - needs: build_and_release - environment: release + needs: [build_and_release] steps: - name: Checkout uses: actions/checkout@v3 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build Docker Images - run: ./gradlew dockerTag -PbuildVersion=${{ github.ref_name }} - - name: Push Docker Images + # Downloading jars to create docker image + - name: Download inspectit-ocelot-agent jar + uses: actions/download-artifact@v3 + with: + name: inspectit-ocelot-agent-jar # name as reference + path: inspectit-ocelot-agent/docker/ + - name: Download inspectit-ocelot-configurationserver jar + uses: actions/download-artifact@v3 + with: + name: inspectit-ocelot-configurationserver-jar # name as reference + path: components/inspectit-ocelot-configurationserver/docker/ + - name: Check if inspectit-ocelot-agent jar exists and rename it + run: | + cd inspectit-ocelot-agent/docker + mv inspectit-ocelot-agent-${{ github.ref_name }}.jar inspectit-ocelot-agent.jar + ls + - name: Check if inspectit-ocelot-configurations jar exists and rename it run: | - docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }} - docker push aaronweikru/inspectit-ocelot-agent:${{ github.ref_name }} - docker push aaronweikru/inspectit-ocelot-agent:latest - docker push aaronweikru/inspectit-ocelot-configurationserver:${{ github.ref_name }} - docker push aaronweikru/inspectit-ocelot-configurationserver:latest + cd components/inspectit-ocelot-configurationserver/docker + mv inspectit-ocelot-configurationserver-${{ github.ref_name }}.jar inspectit-ocelot-configurationserver.jar + ls + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build and push inspectit-ocelot-agent image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: inspectit/inspectit-ocelot-agent:${{ github.ref_name }}, inspectit/inspectit-ocelot-agent:latest + file: ./inspectit-ocelot-agent/docker/Dockerfile + - name: Build and push inspectit-ocelot-configurationserver image + uses: docker/build-push-action@v3 + with: + context: . + push: true + tags: inspectit/inspectit-ocelot-configurationserver:${{ github.ref_name }}, inspectit/inspectit-ocelot-configurationserver:latest + file: ./components/inspectit-ocelot-configurationserver/docker/Dockerfile build_documentation: name: "Build and Publish Release Documentation" @@ -105,7 +149,7 @@ jobs: git config --global user.name 'NTTechnicalUser' git config --global user.email 'NTTechnicalUser@users.noreply.github.com' git commit -m "Publish documentation for release ${{ github.ref_name }}" - git push origin HEAD:master + git push -f origin HEAD:master - name: Install Build Dependencies run: yarn install --frozen-lockfile - name: Build Website From e31cbfa918a1467baa30a4c1d381dd2c75278376 Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Mon, 30 Jan 2023 10:21:30 +0100 Subject: [PATCH 14/17] Minor fixes --- .github/workflows/release.yml | 2 +- .../inspectit-ocelot-configurationserver/docker/Dockerfile | 4 ++-- inspectit-ocelot-agent/docker/Dockerfile | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 021cdfd552..a3c3e41320 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,7 +66,7 @@ jobs: body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" publish_docker_image: - name: "Publish docker image" + name: "Build and Publish Docker Image" runs-on: ubuntu-latest needs: [build_and_release] steps: diff --git a/components/inspectit-ocelot-configurationserver/docker/Dockerfile b/components/inspectit-ocelot-configurationserver/docker/Dockerfile index b33ed9942f..d44412ec4c 100644 --- a/components/inspectit-ocelot-configurationserver/docker/Dockerfile +++ b/components/inspectit-ocelot-configurationserver/docker/Dockerfile @@ -1,4 +1,4 @@ FROM openjdk:11-jre-slim -COPY inspectit-ocelot-configurationserver.jar / -COPY entrypoint.sh / + +ADD ./components/inspectit-ocelot-configurationserver/docker/ / ENTRYPOINT ["sh", "/entrypoint.sh"] \ No newline at end of file diff --git a/inspectit-ocelot-agent/docker/Dockerfile b/inspectit-ocelot-agent/docker/Dockerfile index 68f82b6690..0fadd0b7a0 100644 --- a/inspectit-ocelot-agent/docker/Dockerfile +++ b/inspectit-ocelot-agent/docker/Dockerfile @@ -1,8 +1,7 @@ FROM busybox -COPY inspectit-ocelot-agent.jar / +ADD ./inspectit-ocelot-agent/docker/ / RUN ln /inspectit-ocelot-agent.jar /javaagent.jar &&\ chmod -R go+r /javaagent.jar -COPY entrypoint.sh / ENTRYPOINT ["sh", "/entrypoint.sh"] \ No newline at end of file From fcd3546f80e6b83e03e4ff98f9f23b5a04994751 Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Mon, 6 Feb 2023 11:12:24 +0100 Subject: [PATCH 15/17] Update release action, add changelog config (same as in eum-server) --- .github/release.yml | 20 ------------- .../workflows/changelog-release-config.json | 30 +++++++++++++++++++ .github/workflows/release.yml | 10 +++++-- 3 files changed, 38 insertions(+), 22 deletions(-) delete mode 100644 .github/release.yml create mode 100644 .github/workflows/changelog-release-config.json diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 436f966ba8..0000000000 --- a/.github/release.yml +++ /dev/null @@ -1,20 +0,0 @@ -changelog: - exclude: - labels: - - wontfix - - invalid - - duplicate - - question - categories: - - title: Breaking Changes ๐Ÿ›  - labels: - - breaking-change - - title: New Features ๐ŸŽ‰ - labels: - - enhancement - - title: Bugfixes - labels: - - bug - - title: Other Changes - labels: - - "*" diff --git a/.github/workflows/changelog-release-config.json b/.github/workflows/changelog-release-config.json new file mode 100644 index 0000000000..390ecd7e7f --- /dev/null +++ b/.github/workflows/changelog-release-config.json @@ -0,0 +1,30 @@ +{ + "categories": [ + { + "title": "## ๐Ÿ›  Breaking Changs", + "labels": ["breaking-change"] + }, + { + "title": "## ๐Ÿš€ Implemented Enhancements", + "labels": ["feature", "enhancement"] + }, + { + "title": "## ๐Ÿ› Bugfixes", + "labels": ["fix", "bug"] + }, + { + "title": "## ๐Ÿงช Tests", + "labels": ["test"] + }, + { + "title": "## Other Changes", + "labels": ["*"] + } + ], + "sort": "ASC", + "template": "${{CHANGELOG}}", + "pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}", + "empty_template": "- no changes", + "max_pull_requests": 1000, + "max_back_track_time_days": 1000 +} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a3c3e41320..a766575687 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,12 @@ jobs: - name: Calculate checksums of release artifacts working-directory: ./artifacts run: for f in *; do sha256sum "$f" >> inspectit-ocelot-sha256-checksums.txt; done + - name: Build Changelog + id: build_changelog + uses: mikepenz/release-changelog-builder-action@v3.5.0 + with: + # Config for the Changelog, reference: https://github.com/marketplace/actions/release-changelog-builder + configuration: ".github/workflows/changelog-release-config.json" - name: Create Release uses: softprops/action-gh-release@v0.1.14 with: @@ -63,10 +69,10 @@ jobs: generate_release_notes: true token: ${{ github.token }} name: Version ${{ github.ref_name }} - body: "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" + body: ${{ steps.build_changelog.outputs.changelog }} publish_docker_image: - name: "Build and Publish Docker Image" + name: "Publish docker image" runs-on: ubuntu-latest needs: [build_and_release] steps: From 42dd6a850290aa27fe35064b3c3a7795a1db4dc2 Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Fri, 10 Feb 2023 12:41:38 +0100 Subject: [PATCH 16/17] fix typo + implemented previous docker job + adjusted release changelog body --- .../workflows/changelog-release-config.json | 2 +- .github/workflows/release.yml | 79 +++++-------------- 2 files changed, 19 insertions(+), 62 deletions(-) diff --git a/.github/workflows/changelog-release-config.json b/.github/workflows/changelog-release-config.json index 390ecd7e7f..27284ef4c0 100644 --- a/.github/workflows/changelog-release-config.json +++ b/.github/workflows/changelog-release-config.json @@ -1,7 +1,7 @@ { "categories": [ { - "title": "## ๐Ÿ›  Breaking Changs", + "title": "## ๐Ÿ›  Breaking Changes", "labels": ["breaking-change"] }, { diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a766575687..c17e142f34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,18 +40,7 @@ jobs: cp ./inspectit-ocelot-core/build/reports/bom.xml ./boms/inspectit-ocelot-agent-bom.xml cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.json ./boms/inspectit-ocelot-configurationserver-bom.json cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.xml ./boms/inspectit-ocelot-configurationserver-bom.xml - zip -r ./artifacts/software-bill-of-materials.zip ./boms - # Uploading jars to create docker images - - name: Upload inspectit-ocelot-agent jar - uses: actions/upload-artifact@v3 - with: - name: inspectit-ocelot-agent-jar - path: artifacts/inspectit-ocelot-agent-${{ github.ref_name }}.jar - - name: Upload inspectit-ocelot-configurationserver jar - uses: actions/upload-artifact@v3 - with: - name: inspectit-ocelot-configurationserver-jar - path: artifacts/inspectit-ocelot-configurationserver-${{ github.ref_name }}.jar + zip -r ./artifacts/software-bill-of-materials.zip ./boms - name: Calculate checksums of release artifacts working-directory: ./artifacts run: for f in *; do sha256sum "$f" >> inspectit-ocelot-sha256-checksums.txt; done @@ -69,61 +58,29 @@ jobs: generate_release_notes: true token: ${{ github.token }} name: Version ${{ github.ref_name }} - body: ${{ steps.build_changelog.outputs.changelog }} + body: | + ${{ steps.build_changelog.outputs.changelog }} + "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" - publish_docker_image: - name: "Publish docker image" + build_and_publish_docker_images: + name: "Build and Push Docker Images" runs-on: ubuntu-latest - needs: [build_and_release] + needs: build_and_release + environment: release steps: - name: Checkout uses: actions/checkout@v3 - # Downloading jars to create docker image - - name: Download inspectit-ocelot-agent jar - uses: actions/download-artifact@v3 - with: - name: inspectit-ocelot-agent-jar # name as reference - path: inspectit-ocelot-agent/docker/ - - name: Download inspectit-ocelot-configurationserver jar - uses: actions/download-artifact@v3 - with: - name: inspectit-ocelot-configurationserver-jar # name as reference - path: components/inspectit-ocelot-configurationserver/docker/ - - name: Check if inspectit-ocelot-agent jar exists and rename it - run: | - cd inspectit-ocelot-agent/docker - mv inspectit-ocelot-agent-${{ github.ref_name }}.jar inspectit-ocelot-agent.jar - ls - - name: Check if inspectit-ocelot-configurations jar exists and rename it + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build Docker Images + run: ./gradlew dockerTag -PbuildVersion=${{ github.ref_name }} + - name: Push Docker Images run: | - cd components/inspectit-ocelot-configurationserver/docker - mv inspectit-ocelot-configurationserver-${{ github.ref_name }}.jar inspectit-ocelot-configurationserver.jar - ls - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_PASSWORD }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build and push inspectit-ocelot-agent image - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: inspectit/inspectit-ocelot-agent:${{ github.ref_name }}, inspectit/inspectit-ocelot-agent:latest - file: ./inspectit-ocelot-agent/docker/Dockerfile - - name: Build and push inspectit-ocelot-configurationserver image - uses: docker/build-push-action@v3 - with: - context: . - push: true - tags: inspectit/inspectit-ocelot-configurationserver:${{ github.ref_name }}, inspectit/inspectit-ocelot-configurationserver:latest - file: ./components/inspectit-ocelot-configurationserver/docker/Dockerfile + docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }} + docker push inspectit/inspectit-ocelot-agent:${{ github.ref_name }} + docker push inspectit/inspectit-ocelot-agent:latest + docker push inspectit/inspectit-ocelot-configurationserver:${{ github.ref_name }} + docker push inspectit/inspectit-ocelot-configurationserver:latest build_documentation: name: "Build and Publish Release Documentation" From 9e501ebf24a9e749834c038cf9a4645113b7a6cb Mon Sep 17 00:00:00 2001 From: Daniel Priebe Date: Fri, 10 Feb 2023 14:05:11 +0100 Subject: [PATCH 17/17] Minor fixes --- .github/workflows/release.yml | 4 ++-- .../inspectit-ocelot-configurationserver/docker/Dockerfile | 2 +- inspectit-ocelot-agent/docker/Dockerfile | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c17e142f34..fbf5afc04b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,9 +59,9 @@ jobs: token: ${{ github.token }} name: Version ${{ github.ref_name }} body: | - ${{ steps.build_changelog.outputs.changelog }} "You can also find the corresponding documentation online under the following link: [inspectIT Ocelot Documentation](http://docs.inspectit.rocks)" - + ${{ steps.build_changelog.outputs.changelog }} + build_and_publish_docker_images: name: "Build and Push Docker Images" runs-on: ubuntu-latest diff --git a/components/inspectit-ocelot-configurationserver/docker/Dockerfile b/components/inspectit-ocelot-configurationserver/docker/Dockerfile index d44412ec4c..b9632097fe 100644 --- a/components/inspectit-ocelot-configurationserver/docker/Dockerfile +++ b/components/inspectit-ocelot-configurationserver/docker/Dockerfile @@ -1,4 +1,4 @@ FROM openjdk:11-jre-slim -ADD ./components/inspectit-ocelot-configurationserver/docker/ / +ADD ./ / ENTRYPOINT ["sh", "/entrypoint.sh"] \ No newline at end of file diff --git a/inspectit-ocelot-agent/docker/Dockerfile b/inspectit-ocelot-agent/docker/Dockerfile index 0fadd0b7a0..1b00c0eea2 100644 --- a/inspectit-ocelot-agent/docker/Dockerfile +++ b/inspectit-ocelot-agent/docker/Dockerfile @@ -1,6 +1,6 @@ FROM busybox -ADD ./inspectit-ocelot-agent/docker/ / +ADD ./ / RUN ln /inspectit-ocelot-agent.jar /javaagent.jar &&\ chmod -R go+r /javaagent.jar