Computer Data Systems Inc., a Bethesda-based data processing firm, has signed a partnership agreement with a local development firm, Mulligan/Griffin Associates Inc., to construct its new corporate headquarters in Rockville. The three-story, 130,000-square-foot office building will be located on a 7.7-acre parcel of land on Fields Road, adjacent to the Shady Grove exit of Route 270. Completion of the construction and occupancy are anticipated for the spring of 1984.

Under the terms of the partnership agreement, Computer Data Systems has a limited partnership interest in the property. The partnership agreement provides CDSI with an option to purchase the developers' general partnership interest in 1987 at fair market value. The general partners, Mulligan/Griffin and Associates, are arranging construction and permanent financing.

CDSI signed a 10-year lease for approximately 86,000 square feet of space in the building with three five-year renewal options. The lease provides a base rent to cover a proportionate share of debt service and operating expenses. Mulligan/Griffin is also serving as property manager and broker for the building.

Other recent developments in commercial leasing in the Washington metropolitan area:

McCormick Properties Inc. has announced the completion of the second phase of a $16.75 million agreement to sell five buildings over four years to Westinghouse Electric Co.

McCormick Properties, the real estate development subsidiary of Baltimore's MCCormick & Co., had agreed last year to sell five buildings located in the Hunt Valley business community to Westinghouse, which had leased the properties for a number of years.

The sale of the second and third buildings, totalling 58,600 square feet, for $3.75 million will add $2.2 million in income, or 18 cents per share to final quarter and 1982 earnings of the parent company, the compnay said. Last year's fourth-quarter sale of a 150,000-square-foot building and related land to Westinghouse for $6.5 million resulted in income of $3.7 million, adding 30 cents to McCormick's 1981 per-share earnings.