Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Craft Setup Deploy.pipeline 4.4 KB
Newer Older
1 2 3 4
// First we'll update Builder 1....
node( "Windows Builder 1" ) {
	// We want Timestamps on everything
	timestamps {
5 6 7 8 9 10 11 12 13 14 15 16 17 18
		// First things first, grab the Craft management tooling, and update our Craft checkouts
		stage('Preparing Craft') {
			// Make sure we start with a clean slate
			deleteDir()

			// Grab our tooling which we will need in a few moments
			checkout changelog: false, poll: false, scm: [
				$class: 'GitSCM',
				branches: [[name: 'master']],
				extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'bf-tooling/']],
				userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/binary-factory-tooling']]
			]

			// Make sure that Craftmaster and the CI Tooling is up to date
19
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
20 21
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/craftmaster --into "C:/Craft/CI-Qt511/" --branch stable
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/sysadmin/ci-tooling --into "C:/Craft/CI-Qt511/" --branch master
22 23 24 25 26 27
			"""
		}

		// Now that is done, it's time to rebuild the Craft Cache!
		stage('Update Craft Setup') {
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
28
				cd C:\\Craft\\CI-Qt511\\craftmaster\\
Ben Cooksley's avatar
Ben Cooksley committed
29 30
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c -i --no-cache craft
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c --list-file ../ci-tooling/craftmaster/packages.list
31 32 33 34 35
			"""
		}
	}
}

36
// Then we'll update Builder 2
37 38 39
node( "Windows Builder 2" ) {
	// We want Timestamps on everything
	timestamps {
40 41 42 43 44 45 46 47 48 49 50 51 52 53
		// First things first, grab the Craft management tooling, and update our Craft checkouts
		stage('Preparing Craft') {
			// Make sure we start with a clean slate
			deleteDir()

			// Grab our tooling which we will need in a few moments
			checkout changelog: false, poll: false, scm: [
				$class: 'GitSCM',
				branches: [[name: 'master']],
				extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'bf-tooling/']],
				userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/binary-factory-tooling']]
			]

			// Make sure that Craftmaster and the CI Tooling is up to date
54
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
55 56
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/craftmaster --into "C:/Craft/CI-Qt511/" --branch stable
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/sysadmin/ci-tooling --into "C:/Craft/CI-Qt511/" --branch master
57 58 59 60 61 62
			"""
		}

		// Now that is done, it's time to rebuild the Craft Cache!
		stage('Update Craft Setup') {
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
63
				cd C:\\Craft\\CI-Qt511\\craftmaster\\
Ben Cooksley's avatar
Ben Cooksley committed
64 65
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c -i --no-cache craft
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c --list-file ../ci-tooling/craftmaster/packages.list
66 67 68 69
			"""
		}
	}
}
70

71
// Finally we'll update Builder 3
72 73 74
node( "Windows Builder 3" ) {
	// We want Timestamps on everything
	timestamps {
75 76 77 78 79 80 81 82 83 84 85 86 87 88
		// First things first, grab the Craft management tooling, and update our Craft checkouts
		stage('Preparing Craft') {
			// Make sure we start with a clean slate
			deleteDir()

			// Grab our tooling which we will need in a few moments
			checkout changelog: false, poll: false, scm: [
				$class: 'GitSCM',
				branches: [[name: 'master']],
				extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'bf-tooling/']],
				userRemoteConfigs: [[url: 'https://anongit.kde.org/sysadmin/binary-factory-tooling']]
			]

			// Make sure that Craftmaster and the CI Tooling is up to date
89
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
90 91
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/craftmaster --into "C:/Craft/CI-Qt511/" --branch stable
				python "%WORKSPACE%\\bf-tooling\\craft\\checkout-repository.py" --repository git://anongit.kde.org/sysadmin/ci-tooling --into "C:/Craft/CI-Qt511/" --branch master
92 93 94 95 96 97
			"""
		}

		// Now that is done, it's time to rebuild the Craft Cache!
		stage('Update Craft Setup') {
			bat """
Ben Cooksley's avatar
Ben Cooksley committed
98
				cd C:\\Craft\\CI-Qt511\\craftmaster\\
Ben Cooksley's avatar
Ben Cooksley committed
99 100
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c -i --no-cache craft
				python Craftmaster.py --config config/CraftBinaryCache.ini --target=windows-msvc2017_64-cl-debug -c --list-file ../ci-tooling/craftmaster/packages.list
101 102 103 104
			"""
		}
	}
}