From 9d35149a06750b4939f794af12d76b2055d06ffa Mon Sep 17 00:00:00 2001 From: Barry Matheney Date: Tue, 2 Jul 2024 12:31:56 -0400 Subject: [PATCH] 20240702_123156 --- bitbucket-pipelines.yml | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 154dea343..351347caa 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -1,44 +1,44 @@ -image: atlassian/default-image:4 +# Example +definitions: + services: + docker: # can only be used with a self-hosted runner + image: docker:dind + pipelines: - branches: - master: # Trigger this for any pushes to the master branch. - - step: - name: DockerBuild - size: 2x # Increase memory by using a larger build container - trigger: automatic - # caches: - # - maven # Cache any dependencies we download, speeds up build times. - services: - - docker - caches: - - docker - script: - - ps -p $$ && whoami - - cat /etc/os-release - - echo "$SHELL" - - source scr_scrub_bitbucket_env_vars.sh - - source scr_non_secret_env_vars.sh - - printenv | sort - - source scr_validate_mandatory_variables.sh - - echo "$HARBOR_ACCESS_TOKEN" | docker login "$HARBOR_LOGIN_ADDRESS" -u "$HARBOR_USERNAME" --password-stdin - - docker build -t "${DOCKER_IMAGE_NAME}:${DOCKER_TAG_PIPELINE_UUID}" . - - docker push "${DOCKER_IMAGE_NAME}:${DOCKER_TAG_PIPELINE_UUID}" - # - docker build - - # - source pack_install.sh - # - which pack && pack version - # - bash create-settings.sh # Create our settings.xml file. Will fail if environment variables aren't set properly. - # - mvn -B -s settings.xml verify # Ensure all artifacts build successfully before we attempt deploy in order to prevent partial deploys. - # - mvn -B -s settings.xml deploy # Now that all builds have completed, we can deploy all the artifacts. - # - step: - # name: Create Release Version # This will create a release version and commit it to master. It will then be picked up and deployed in the first step. - # trigger: manual - # caches: - # - maven - # script: - # - bash create-settings.sh # Create our settings.xml file. Will fail if environment variables aren't set properly. - # - bash validate-release-configuration.sh # Do the best we can to ensure we have the SSH keys and env variables in place before we try to prepare a release. - # - git config --global user.email "$GIT_USER_EMAIL" - # - git config --global user.name "$GIT_USER_NAME" - # - mvn -B -s settings.xml -DdryRun=true release:prepare # Ensure that most things will run properly before we do the real work. - # - mvn -B -s settings.xml release:clean release:prepare # This bumps the versions in the poms, creates new commits, which will then get built by the master branch trigger. + default: + - step: + runs-on: + - self.hosted + - linux + - docker + # - bash + services: + - docker + caches: + - docker + script: + - echo "$SHELL" + - printenv | sort + # - source scr_validate_mandatory_variables.sh + - echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USER" --password-stdin + # - docker build -t "${DOCKER_IMAGE_NAME}:${DOCKER_TAG_PIPELINE_UUID}" . + # - docker push "${DOCKER_IMAGE_NAME}:${DOCKER_TAG_PIPELINE_UUID}" + # - docker build - + # - source pack_install.sh + # - which pack && pack version + # - bash create-settings.sh # Create our settings.xml file. Will fail if environment variables aren't set properly. + # - mvn -B -s settings.xml verify # Ensure all artifacts build successfully before we attempt deploy in order to prevent partial deploys. + # - mvn -B -s settings.xml deploy # Now that all builds have completed, we can deploy all the artifacts. + # - step: + # name: Create Release Version # This will create a release version and commit it to master. It will then be picked up and deployed in the first step. + # trigger: manual + # caches: + # - maven + # script: + # - bash create-settings.sh # Create our settings.xml file. Will fail if environment variables aren't set properly. + # - bash validate-release-configuration.sh # Do the best we can to ensure we have the SSH keys and env variables in place before we try to prepare a release. + # - git config --global user.email "$GIT_USER_EMAIL" + # - git config --global user.name "$GIT_USER_NAME" + # - mvn -B -s settings.xml -DdryRun=true release:prepare # Ensure that most things will run properly before we do the real work. + # - mvn -B -s settings.xml release:clean release:prepare # This bumps the versions in the poms, creates new commits, which will then get built by the master branch trigger.